Commit Graph

84 Commits (219ba5cd9aff2dc79e414bbe2e9f90406f7543df)

Author SHA1 Message Date
Dave Airlie a19e0efb0e lockdep warned about a possible locking dependency 2007-12-18 19:17:11 +11:00
Dave Airlie a20587e395 Merge branch 'origin' into modesetting-101
Conflicts:

	linux-core/drmP.h
	shared-core/i915_dma.c
	shared-core/i915_drm.h
	shared-core/radeon_drv.h
2007-11-22 17:17:06 +11:00
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Jerome Glisse 09e51db77b drm: don't reset to 0 irq_enabled when client open file descriptor 2007-11-21 18:58:29 +01:00
Jerome Glisse 8fd8bf599b drm: don't reset to 0 irq_enabled when client open file descriptor 2007-11-21 18:58:03 +01:00
Thomas Hellstrom 5ce43a346c Merge branch 'master' into modesetting-101
Conflicts:

	linux-core/drm_bufs.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2007-11-05 13:46:06 +01:00
Dave Airlie 82ffcbbd62 drm: more kernel coding style cleanups 2007-11-05 19:14:23 +10:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Alan Hourihane 90bfc8e611 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_bo.c
	linux-core/drm_objects.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
2007-10-16 15:28:33 +01:00
Kristian Høgsberg a69c85fec8 Drop destroy ioctls for fences and buffer objects.
We now always create a drm_ref_object for user objects and this is then the only
things that holds a reference to the user object.  This way unreference on will
destroy the user object when the last drm_ref_object goes way.
2007-10-16 22:03:05 +11:00
Jesse Barnes 5cc3083179 Merge branch 'master' into modesetting-101 - TTM & typedef removal
Conflicts:

	linux-core/drmP.h
	linux-core/drm_bo.c
	linux-core/drm_drv.c
	linux-core/drm_objects.h
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c

Mostly removing typedefs that snuck into the modesetting code and
updating to the latest TTM APIs.  As of today, the i915 driver builds,
but there are likely to be problems, so debugging and bugfixes will
come next.
2007-09-24 14:41:46 -07:00
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
Alan Hourihane 8a78dead29 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_drv.c
	linux-core/drm_fops.c
	linux-core/drm_objects.h
	linux-core/drm_stub.c
	shared-core/i915_dma.c
2007-06-29 20:09:44 +01: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 79aa1d5474 another large overhaul of interactions with userspace...
We need to keep a list of user created fbs to nuke on master exit.
We also need to use the bo properly.
2007-04-17 18:16:38 +10:00
Jesse Barnes f2e3d790ac Revert "Export drm_setup for use by new driver init code.", we don't really want to use this function
This reverts commit e114b981bc.
2007-04-12 08:53:03 -07:00
Jesse Barnes e114b981bc Export drm_setup for use by new driver init code. 2007-04-10 10:31:58 -07: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