Commit Graph

69 Commits (0774090d5b7d3eba734086b437021039bc19c365)

Author SHA1 Message Date
Pekka Paalanen 0844c46759 Fix misc ioctl issues, makes Nouveau run.
Debug print fix in drm_release().
Forgotten local variable init in drm_setversion().
Unnecessary put_user() in drm_addmap_ioctl().
ioctl->cmd check broken in drm_ioctl(); workaround.
2007-07-21 23:13:25 +03:00
Eric Anholt 5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07:00
Eric Anholt c1119b1b09 Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Dave Airlie a64b5d8d37 fix some missing whitespace/tab 2007-07-18 15:49:45 +10:00
Dave Airlie 6dce9e0735 drm: remove hashtab/sman and object typedefs 2007-07-16 12:48:44 +10:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie 638c8087de drm: fixup initialisation of list heads and idr 2007-06-01 19:00:24 +10:00
Dave Airlie f64674743a drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-27 07:26:52 +10:00
Dave Airlie 7b48f0022a drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
2007-05-26 04:26:24 +10:00
Dave Airlie 72a1190f6d drm/ttm: make sure dev_mapping is set-up for the first opener of the drm
This was causing an oops in my miniglx code to try and use a TTM-only setup.
2007-03-27 17:59:30 +10:00
Dave Airlie 2463b03cb4 whitespace cleanup pending a kernel merge 2007-03-19 08:23:43 +11:00
Thomas Hellstrom e1460426b8 Bugzilla Bug #9457
Add refcounting of user waiters to the DRM hardware lock, so that we can use the
DRM_LOCK_CONT flag more conservatively.

Also add a kernel waiter refcount that if nonzero transfers the lock for the kernel context,
when it is released. This is useful when waiting for idle and can be used
for very simple fence object driver implementations for the new memory manager.

It also resolves the AIGLX startup deadlock for the sis and the via drivers.
i810, i830 still require that the hardware lock is really taken so the deadlock remains
for those two. I'm not sure about ffb. Anyone familiar with that code?
2007-02-13 20:47:30 +01:00
Dave Airlie e5c4a26a29 Merge branch 'nouveau-1' 2006-12-20 10:30:16 +11:00
Thomas Hellstrom 81251bf78f Reclaim buffers locked fixup.
Avoid calling reclaim_buffers_locked if we don't have a
hardware lock.

Improve reclaim_buffers_locked deadlock error formatting.
2006-12-19 23:14:11 +01:00
Dave Airlie f7affda35b drm: fixup page alignment on SAREA map on ppc64 2006-11-06 11:44:36 +11:00
Thomas Hellstrom cee659afb5 Get rid of all ugly PTE hacks. 2006-10-03 12:08:07 +02:00
Thomas Hellstrom 418b81c65c Add a comment to previos commit. 2006-10-02 13:37:54 +02:00
Thomas Hellstrom c6be27401f Trap and be verbose about a deadlock that occurs with AIGLX and drivers that
use drm_reclaim_buffers_locked().
2006-10-02 13:34:30 +02:00
Thomas Hellstrom 4ddabd1562 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
2006-08-28 09:28:10 +02:00
Dave Airlie 9b984b34e9 drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
2006-08-28 11:31:43 +10:00
Dave Airlie 3586ecd060 fix const pointer warnings with file_operations 2006-08-28 11:27:13 +10:00
Dave Airlie b4feb2c04e remove some DRM_ARRAY_SIZE from linux core code 2006-08-28 11:27:05 +10:00
Thomas Hellstrom 42c2cfcf7d Generic DRM support base-class support for user-space objects, like
fence objects and buffer objects:
Refcounting,
Inter-process sharing,
Synchronization
Destruction.
2006-08-21 20:30:19 +02:00
Thomas Hellstrom 0316f93d51 Remove hash tables on DRM exit. 2006-08-16 16:36:56 +02:00
Dave Airlie 5cfbd5dbab switch drm to use Linux mutexes instead of semaphore.
I hope the fallback compat code works if not shout at me.
2006-07-24 10:51:27 +10:00
Thomas Hellstrom 1a9e5bae10 Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.
2006-06-06 17:46:17 +00:00
Dave Airlie 4791dc8856 major realigment of DRM CVS with kernel code, makes integration much easier 2006-02-18 02:53:36 +00:00
Dave Airlie 92150972e5 use drm_cards_limit instead of cards_limit 2006-01-02 05:54:10 +00:00
Dave Airlie ea07fefcbf convert to use __set_current_state, align some header includes 2005-11-11 08:42:36 +00:00
Dave Airlie bcbf5ff797 we don't use this stuff anymore .. remove 1k buffer from driver .. 2005-10-23 04:07:50 +00:00
Dave Airlie cd16d96856 remove pci_find_class use for alpha 2005-09-18 09:31:06 +00:00
Eric Anholt c789ea1521 Rename the driver hooks in the DRM to something a little more
understandable: preinit -> load postinit -> (removed) presetup ->
    firstopen postsetup -> (removed) open_helper -> open prerelease ->
    preclose free_filp_priv -> postclose pretakedown -> lastclose
    postcleanup -> unload release -> reclaim_buffers_locked version ->
    (removed)
postinit and version were replaced with generic code in the Linux DRM
    (drivers now set their version numbers and description in the driver
    structure, like on BSD). postsetup wasn't used at all. Fixes the savage
    hooks for initializing and tearing down mappings at the right times.
    Testing involved at least starting X, running glxgears, killing
    glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)
2005-08-05 03:50:23 +00:00
Jon Smirl 143622a987 Implement permanent sarea maps 2005-08-04 14:48:43 +00:00
Jon Smirl ea2c7a895d Split the control of master vs root priv. Everything is still marked as
needing root.
2005-08-04 13:15:27 +00:00
Jon Smirl e2ba08d283 release can happen before dev->ctxlist is allocated 2005-06-30 16:00:35 +00:00
Dave Airlie 2ce5ddec83 Bug in conversion from old DRM to core DRM.... 2005-06-29 02:57:18 +00:00
Dave Airlie 805a07714f misc cleanup patch from Adrian Bunk 2005-06-04 06:18:11 +00:00
Felix Kuehling 5128542814 Allow drivers to override reclaim_buffers in an OS-independent way by
passing drm_device_t* as first parameter, like in the BSD version.
2004-10-31 15:16:44 +00:00
Jon Smirl b974e2cd68 Break poll() to make it match the Xserver's broken expectations. 2004-10-28 15:52:31 +00:00
Jose Fonseca 0d89b19325 Update Doxygen configuration & comments. 2004-10-18 14:16:41 +00:00
Jon Smirl 91aa32742c Move drm_cpu_valid out of drm_init. drm_init is empty now. 2004-10-15 20:36:15 +00:00
Jon Smirl 5e8838fd11 Add a poll function that alternates between zero and normal poll return to
bring DRM into conformance with normal poll().
2004-10-13 16:40:53 +00:00
Jon Smirl ad70dc676e Breakout heads into their own data structures. 2004-10-12 03:59:17 +00:00
Jon Smirl ad549c5ae6 Rename fn_tbl to driver. Core driver now uses pci_driver name which
reflects the personality name.
2004-10-10 22:54:55 +00:00
Jon Smirl 9f9a8f1382 Lindent of core build. Drivers checked for no binary diffs. A few files
weren't Lindent's because their comments didn't convert very well. A
    bunch of other minor clean up with no code implact included.
2004-09-30 21:12:10 +00:00
Jon Smirl 1c0a437fa2 Move things around to reduce public symbols and even out files. Switch to
get_order from drm_order.
2004-09-30 19:26:35 +00:00
Jon Smirl 3aef3841d0 Make fops per driver instead of global, remove default flush, poll, read
functions
2004-09-30 18:13:33 +00:00
Jon Smirl fa6b1d129e First check in for DRM that splits core from personality modules 2004-09-27 19:51:38 +00:00
Dave Airlie eeae6a0a38 merge back bunch of whitespace and misc changes from kernel 2004-09-05 10:54:59 +00:00
Dave Airlie 019fd38a3c __NO_VERSION__ hasn't been needed since 2.3 days ditch it... 2004-08-27 09:11:07 +00:00