Commit graph android_kernel_sony_sdm845/drivers/char/drm/drmP.h
Message SHA1
Revert "drm/vbl rework: rework how the drm deals with vblank."
This reverts commit ac741ab71b.

Okay this looks like wasn't as fully baked as I'd led myself to believe.

Revert for now for further baking.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie   commited 2008-05-07 12:15:39 +10:00
af6061af0d
drivers/char: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Harvey Harrison   authored and   Linus Torvalds   commited 2008-04-30 08:29:54 -07:00
bf9d892952
drm/vbl rework: rework how the drm deals with vblank.
Other Authors: Michel Dänzer <michel@tungstengraphics.com>
mga: Ian Romanick <idr@us.ibm.com>
via: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>

This re-works the DRM internals to provide a better interface for drivers
to expose vblank on multiple crtcs.

It also includes work done by Michel on making i915 triple buffering and pageflipping work properly.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Jesse Barnes   authored and   Dave Airlie   commited 2008-04-26 18:01:07 +10:00
ac741ab71b
drm: reorganise minor number handling using backported modesetting code.
rips out the head crap and replaces it with an idr and drm_minor structure

Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie   commited 2008-04-26 17:55:07 +10:00
2c14f28be2
DRM: remove unused dev_class
The struct class_device *dev_class is not used in the struct drm_head
structure at all, so remove it as class_device is being removed entirely
from the kernel.


Cc: David Airlie <airlied@linux.ie>
Cc: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Greg Kroah-Hartman   commited 2008-04-19 19:10:32 -07:00
56d110e852
drm/ati_pcigart: fix the PCIGART to use drm_pci to allocate GART table.
This fixes a problem on 64-bit with 4GB with ATI RS690 chipsets. It
makes sure the pcigart table is allocated in coherent memory for DMA operations.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie   commited 2008-03-17 10:24:24 +10:00
b05c23851a
drm: add support for passing state into the suspend hooks.
fix i915 driver to use state for hibernate save avoidance.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie   commited 2008-02-20 10:05:12 +10:00
b932ccb567
drm: update DRM sysfs support
Make DRM devices use real Linux devices instead of class devices, which are
going away.  While we're at it, clean up some of the interfaces to take
struct drm_device * or struct device * and use the global drm_class where
needed instead of passing it around.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Jesse Barnes   authored and   Dave Airlie   commited 2008-02-07 15:09:38 +10:00
e8b962b6df
drm: move two function extern into the correct block
Dave Airlie   commited 2008-02-07 15:09:38 +10:00
ded23359cc
drm: some minor cleanups and changes to make memory manager merging easier.
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2008-02-07 15:09:38 +10:00
8562b3f25d
drm: remove second forward decleration of drm device struct.
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-11-06 10:11:12 +10:00
f9618ac08b
drm: 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 t
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 DR
is lost.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Eric Anholt   authored and   Dave Airlie   commited 2007-10-15 10:38:20 +10:00
c153f45f9b
drm: 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 everyth
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct
went the other direction.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Eric Anholt   authored and   Dave Airlie   commited 2007-10-15 10:38:20 +10:00
6c340eac02
drm: convert drawable code to using idr
This converts the code for allocating drawables to the Linux idr,

Fixes from: Michel Dänzer <michel@tungstengraphics.com>, Kristian Høgsberg <krh@redhat.com>

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-17 11:04:33 +10:00
d4e2cbe9cb
drm: convert drm context code to use Linux idr
This converts the drm context allocator to an idr, using the new idr
interface features from Kristian.

Fixes from Kristian Hoegsberg <krh@redhat.com>

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-17 11:04:33 +10:00
62968144e6
drm: detypedef the hashtab and more of sman
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-12 10:26:44 +10:00
e0be428e66
drm: detypedeffing continues...
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:53:40 +10:00
55910517af
drm: detypef waitlist/freelist/buf_entry/device_dma/drm_queue structs
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:32:08 +10:00
cdd55a294c
drm: drop drm_vma_entry_t, drm_magic_entry_t
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:21:47 +10:00
8fc2fdf4c9
drm: drop drm_buf_t typedef
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:17:42 +10:00
056219e2fa
drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 15:53:27 +10:00
84b1fd103d
drm: remove a bunch of typedefs on the userspace interface
This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace
API compatiblity, it changes all internal usages to structs/enum/unions.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 15:27:12 +10:00
c60ce623bd
drm: remove DRM_GETSAREA and replace with drm_getsarea function
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 11:58:02 +10:00
da509d7a02
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>

Dave Airlie   commited 2007-07-11 11:58:02 +10:00
bd1b331fae
drm/radeon: upgrade to 1.27 - make PCI GART more flexible
radeon: make PCI GART aperture size variable, but making table size variable
    This is precursor to getting a TTM backend for this stuff, and also
    allows the PCI table to be allocated at fb 0
radeon: add support for reverse engineered xpress200m

    The IGPGART setup code was traced using mmio-trace on fglrx by myself
    and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.

    This code doesn't let the 3D driver work properly as the card has no
    vertex shader support.

    Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
    work on.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-05-08 15:19:23 +10:00
f2b04cd219
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>

Thomas Hellstrom   authored and   Dave Airlie   commited 2007-03-23 13:28:33 +11:00
040ac32048
drm: fix alpha domain handling
Signed-off-by: Dave Airlie <airlied@linux.ie>

Jay Estabrook   authored and   Dave Airlie   commited 2007-03-11 12:08:21 +11:00
6244270ef6
drm: update core memory manager from git drm tree
Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Fix buggy aligned allocations.
Remove the stupid root_node field from the core memory manager.
Support multi-page buffer offset alignments
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Thomas Hellstrom   authored and   Dave Airlie   commited 2007-02-08 13:24:26 +11:00
1d58420bad
drm: remove drm_ioremap and drm_ioremapfree
hch originally submitted this for paravirt ops work, airlied took it
and cleaned up a lot of unused code caused by using this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Christoph Hellwig   authored and   Dave Airlie   commited 2007-02-08 13:24:26 +11:00
004a772742
drm: Stop defining pci_pretty_name
drm drivers no longer use pci_pretty_name so we can stop defining it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Jean Delvare   authored and   Dave Airlie   commited 2006-12-19 18:04:33 +11:00
f9841a8d60
drm: make kernel context switch same as for drm git tree.
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-12-19 17:49:44 +11:00
0c4dd906a2
drm: add flag for mapping PCI DMA buffers read-only.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.

Signed-off-by: Dave Airlie <airlied@linux.ie>

George Sapountzis   authored and   airlied   commited 2006-12-07 15:53:31 +11:00
3417f33e76
drm: Add support for interrupt triggered driver callback with lock held to DRM core.
Signed-off-by: Dave Airlie <airlied@linux.ie>

=?utf-8?q?Michel_D=C3=A4nzer?=   authored and   airlied   commited 2006-12-07 15:53:28 +11:00
2e54a00762
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>

=?utf-8?q?Michel_D=C3=A4nzer?=   authored and   airlied   commited 2006-12-07 15:53:28 +11:00
bea5679f9c
drm: add support for secondary vertical blank interrupt to DRM core
Signed-off-by: Dave Airlie <airlied@linux.ie>

=?utf-8?q?Michel_D=C3=A4nzer?=   authored and   airlied   commited 2006-12-07 15:53:28 +11:00
776c9443e2
drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
Signed-off-by: Dave Airlie <airlied@linux.ie>

Eric Anholt   authored and   Dave Airlie   commited 2006-09-22 05:32:34 +10:00
2f02cc3fb8
drm: domain changes broke ppc r200
Freedesktop.org bug #8246

The domain changes regressed on PPC, go back to just using 0,
as X.org's domain support is crap

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-09-22 05:32:33 +10:00
9b1a51b69c
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>

Thomas Hellstrom   authored and   Dave Airlie   commited 2006-09-22 05:32:31 +10:00
8d153f7107
drm: move drm authentication to new generic hash table.
Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Thomas Hellstrom   authored and   Dave Airlie   commited 2006-09-22 05:32:31 +10:00
8669cbc5e6
drm: add simple DRM memory manager, and hash table
This adds the DRM hashtable and simple memory manager implementations from
Tungsten Graphics, this is NOT the new memory manager, this is a replacement
for the SIS and VIA memory managers.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Thomas Hellstrom   authored and   Dave Airlie   commited 2006-09-22 05:32:31 +10:00
3a1bd924f3
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>

Dave Airlie   commited 2006-09-22 05:32:30 +10:00
332296016e
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>

Dave   authored and   Dave Airlie   commited 2006-09-22 05:32:30 +10:00
242ef0e1e7
drm: cleanup old compat code and DRM fns from Linux only code
This patch removes some of the old compatibility macros from the DRM,
and removes use of DRM wrappers from Linux specific code.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-09-22 05:32:30 +10:00
3d77461ecd
Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

Jörn Engel   authored and   Adrian Bunk   commited 2006-06-30 19:25:36 +02:00
6ab3d5624e
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>

Dave Airlie   commited 2006-04-23 18:26:40 +10:00
5d23fafb1b
drivers/char/drm/drm_memory.c: possible cleanups
- #if 0 the following unused global function:
  - drm_ioremap_nocache()

- make the following needlessly global functions static:
  - agp_remap()
  - drm_lookup_map()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>

Adrian Bunk   authored and   Dave Airlie   commited 2006-04-18 21:03:51 +10:00
031de96af0
drm: remove drm_{alloc,free}_pages
drm_alloc_pages and drm_free_pages can now be removed.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-03-29 08:16:12 +10:00
55eb061326
drm: fixup PCI DMA support
This patch makes the PCI support use the correct Linux interfaces finally.
Tested in DRM CVS on PCI MGA card.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-03-19 18:56:12 +11:00
ddf19b973b
[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>

Greg Kroah-Hartman   commited 2006-02-06 12:17:17 -08:00
0650fd5824
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>

Dave Airlie   commited 2006-02-02 19:37:46 +11:00
30e2fb1881