Commit graph

23 commits

Author SHA1 Message Date
Dave Airlie
7c158acef8 drm: cleanup list initialisation
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11 12:05:36 +10:00
Dave Airlie
bd1b331fae 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 and uses them
in some more places.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11 11:58:02 +10:00
Thomas Hellstrom
040ac32048 drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
Bugzilla Bug #9457

Add refcounting of user waiters to the DRM hardware lock, so that we can use
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

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-23 13:28:33 +11:00
Jeff Garzik
2c3f0eddfb DRM: handle pci_enable_device failure
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-11 18:28:52 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?=
8163e418f7 drm: Make locked tasklet handling more robust.
Initialize the spinlock unconditionally when struct drm_device is filled in,
and return early in drm_locked_tasklet() if the driver doesn't support IRQs.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?=
bea5679f9c drm: Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.

Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.

hook up drm ioctl update draw
export drm_get_drawable_info symbol

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
Eric Anholt
2f02cc3fb8 drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:34 +10:00
Thomas Hellstrom
8d153f7107 drm: update user token hashing and map handles
Keep hashed user tokens, with the following changes:
32-bit physical device addresses are mapped directly to user-tokens. No
    duplicate maps are allowed, and the addresses are assumed to be outside
    of the range 0x10000000 through 0x30000000. The user-token is identical
    to the 32-bit physical start-address of the map.
64-bit physical device addressed are mapped to user-tokens in the range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.
Other map types, like upcoming TTM maps are mapped to user-tokens in the
    range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.

Implement hashed map lookups.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Dave Airlie
332296016e drm: remove the DRM pci domain
This patch removes the pci_domain from the DRM device structure, and
gets it via a macro that either asks the platform or does the alpha special
case. jgarzik asked for this to just use the platform magic, but I've no
alpha experience and I'd rather not just break it and wait for someone to
give out.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Dave
242ef0e1e7 drm: remove local copies of pci bus/slot/func
The drm keeps a local copy of these for little use.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Dave Airlie
5d23fafb1b drm: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global function static:
 - drm_bufs.c: drm_addbufs_fb()
- remove the following unused EXPORT_SYMBOL's:
 - drm_agpsupport.c: drm_agp_bind_memory
 - drm_bufs.c: drm_rmmap_locked
 - drm_bufs.c: drm_rmmap
 - drm_stub.c: drm_get_dev

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-04-23 18:26:40 +10:00
Greg Kroah-Hartman
0650fd5824 [PATCH] DRM: fix up classdev interface for drm core
Current drm code doesn't work with userspace programs that listen only
to the kernel event netlink socket as it is trying to create its own dev
interface.  Turns out lots of code can just be deleted as the driver
core can do all of this work automatically for you.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06 12:17:17 -08:00
Dave Airlie
30e2fb1881 sem2mutex: drivers/char/drm/
From: Arjan van de Ven <arjan@infradead.org>

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-02 19:37:46 +11:00
Dave Airlie
d985c10881 drm: major update from CVS for radeon and core
This patch pull in a lot of changes from CVS to the main core DRM,
and updates the radeon driver to 1.21.0 that supports r300 texrect
and radeon card type ioctl.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-01-02 21:32:48 +11:00
Dave Airlie
732052ed3e drm: simplify sysfs code for drm
This simplifies the sysfs code for the drm and add a dri_library_name
attribute which can be used by a userspace app to figure out which
library to load.

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 22:07:35 +11:00
Dave Airlie
22eae947bf drm: rename driver hooks more understandably
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)

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-10 22:16:34 +11:00
Dave Airlie
312f572605 merge Linus head tree into my drm tree and fix up conflicts 2005-10-20 18:21:33 +10:00
Dave Jones
c0758146ad [PATCH] Fix drm 'debug' sysfs permissions
Just enables some extra printk's, but still..  Only the sysadmin should
be able to do that.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-05 07:38:28 -07:00
Dave Airlie
b5e89ed53e drm: lindent the drm directory.
I've been threatening this for a while, so no point hanging around.
This lindents the DRM code which was always really bad in tabbing department.
I've also fixed some misnamed files in comments and removed some trailing
whitespace.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25 14:28:13 +10:00
Dave Airlie
836cf0465c drm: cleanup buffer/map code
This is a patch from DRM CVS that cleans up some code that was in CVS
that I never moved to the kernel, this patch produces the result of the
cleanups and puts it into the kernel drm.

From: Eric Anholt <anholt@freebsd.org>, Jon Smirl, Dave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-07-10 19:27:04 +10:00
Dave Airlie
cda1738066 drm: add test for AGP devices and driver override for it.
Added device_is_agp callback to drm_driver.  This function is called by the
platform-specific drm_device_is_agp function.  Added implementation of this
function the the Linux-specific portion of the MGA driver to detect PCI G450
cards.  Added code to the Linux-specific portion of the generic DRM layer to
not initialize AGP infrastructure if the card is not AGP (this matches what
already existed in BSD).

Fix up i810/i830 and i915 drivers to always return AGP as they don't always
report the capability.

Fix the MGA to not report AGP for a card that has an AGP chip behind a PCI
bridge.

From: Ian Romanick, Dave Airlie, Alan Hourihane
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-07-10 17:31:26 +10:00
Dave Airlie
c94f702985 drm: misc cleanup
This patch contains the following cleanups:
- make needlessly global functions static
- remove the following unused global functions:
 - drm_fops.c: drm_read
 - i915_dma.c: i915_do_cleanup_pageflip

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-07-07 21:03:38 +10:00
Linus Torvalds
1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00