summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_drv.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-141-540/+0
| | | | | | | | | | | | | | With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: only trust core drm ioctls - driver ioctls are a mess.Dave Airlie2008-06-201-4/+3
| | | | | | So driver ioctls need a full auditing before we can make this change. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: use drms ioctl cmd not what we get passed from userspace.Johannes Weiner2008-06-131-0/+2
| | | | | | | | | | | This enforces us to use the drm ioctl types so read/write works correctly and not believe what userspace tells us. It does this hopefully without breaking the drm api. Fixes bug from thread: BUG: unable to handle kernel NULL pointer dereference (drm_getunique) Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: reorganise minor number handling using backported modesetting code.Dave Airlie2008-04-261-32/+28
| | | | | | rips out the head crap and replaces it with an idr and drm_minor structure Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fixup some of the ioctl function exit pathsDave Airlie2008-02-071-5/+7
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add _DRM_DRIVER flag, and re-order unload.Dave Airlie2008-02-071-6/+7
| | | | | | | | Allow drivers to addmaps that won't be removed by lastclose or unload. The unload needs to be re-ordered to avoid removing the hashs before the driver has removed the final maps. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: move drm_mem_init to proper place in startup sequenceDave Airlie2008-02-071-2/+2
| | | | | | For TTM this needs to be called later. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update DRM sysfs supportJesse Barnes2008-02-071-5/+5
| | | | | | | | | 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>
* Use helpers to obtain task pid in printksPavel Emelyanov2007-10-191-1/+1
| | | | | | | | | | | | | | | | The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. [akpm@linux-foundation.org: git-drm went and changed lots of stuff] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt2007-10-151-75/+92
| | | | | | | | | 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>
* drm: Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt2007-10-151-14/+13
| | | | | | | | | | 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>
* drm: convert drawable code to using idrDave Airlie2007-07-171-12/+3
| | | | | | | | 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>
* drm: detypedeffing continues...Dave Airlie2007-07-111-3/+3
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: drop drm_vma_entry_t, drm_magic_entry_tDave Airlie2007-07-111-2/+2
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove drm_file_t, drm_device_t and drm_head_t typedefsDave Airlie2007-07-111-8/+8
| | | | | | some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a bunch of typedefs on the userspace interfaceDave Airlie2007-07-111-4/+4
| | | | | | | 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>
* drm: fix typo on code drm getsareaDave Airlie2007-07-111-1/+1
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove DRM_GETSAREA and replace with drm_getsarea functionDave Airlie2007-07-111-0/+14
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanup use of Linux list handling macrosDave Airlie2007-07-111-24/+12
| | | | | | | | 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>
* drm: rename badly named define and cleanup ioctl code spacingDave Airlie2007-05-081-6/+4
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: allow for more generic drm ioctlsThomas Hellstrom2007-03-191-3/+6
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* [PATCH] mark struct file_operations const 3Arjan van de Ven2007-02-121-1/+1
| | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm: Change first valid DRM drawable ID to be 1 instead of 0.=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-071-0/+12
| | | | | | | | This makes it easier for userspace to know when it needs to allocate an ID. Also free drawable information memory when it's no longer needed. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Add support for tracking drawable information to core=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-071-0/+2
| | | | | | | | | | | | | | 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>
* drm: remove hash tables on drm exitThomas Hellstrom2006-09-221-0/+2
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: avoid kernel oops in some error paths calling drm_lastcloseThomas Hellstrom2006-09-221-4/+6
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: move drm authentication to new generic hash table.Thomas Hellstrom2006-09-221-6/+4
| | | | | | | 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>
* drm: cleanup old compat code and DRM fns from Linux only codeDave Airlie2006-09-221-1/+1
| | | | | | | 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>
* drm: remove master setting from add/remove contextDave Airlie2006-04-051-2/+2
| | | | | | Clients can do this in the miniglx setups. Signed-off-by: Dave Airlie <airlied@linux.ie>
* sem2mutex: drivers/char/drm/Dave Airlie2006-02-021-2/+2
| | | | | | | | | | | | | | 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>
* drm: cleanup properly on drm module unloadDave Airlie2006-01-111-6/+6
| | | | | | Cleanup multiple cards properly Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: move ioctl flags to a bit field of flagsDave Airlie2006-01-021-55/+56
| | | | | | From: Dave Airlie Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add in-kernel entry points for rest of AGP ioctlsDave Airlie2005-11-111-4/+4
| | | | | | | Allow DRM modules to call AGP internally in the kernel. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: rename driver hooks more understandablyDave Airlie2005-11-101-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* merge Linus head tree into my drm tree and fix up conflictsDave Airlie2005-10-201-1/+1
|\
| * [PATCH] proc_mkdir() should be used to create procfs directoriesAl Viro2005-09-291-1/+1
| | | | | | | | | | | | | | | | A bunch of create_proc_dir_entry() calls creating directories had crept in since the last sweep; converted to proc_mkdir(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | drm: lindent the drm directory.Dave Airlie2005-09-251-179/+182
|/ | | | | | | | | 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>
* drm: cleanup buffer/map codeDave Airlie2005-07-101-52/+16
| | | | | | | | | 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>
* drm: fix minor function header issueDave Airlie2005-07-101-2/+2
| | | | | From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update some function so a driver can call themDave Airlie2005-07-101-7/+8
| | | | | | | | This patch splits some ioctl functions so that they can be called in-kernel by a DRM driver. The driver will use them later. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update support for drm pci buffersDave Airlie2005-07-101-2/+6
| | | | | | | | The DRM needs to change the drm_pci interface for FreeBSD compatiblity, this patch introduces the drm_dma_handle_t and uses it in the Linux code. From: Tonnerre Lombard, Eric Anholt, and Sergey Vlasov Signed-off-by: David Airlie <airlied@linux.ie>
* drm: add _DRM_CONSISTENT map typeDave Airlie2005-07-101-0/+4
| | | | | | | | Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It uses drm_pci_alloc/free for allocating/freeing the memory. From: Felix Kuhling <fxkuehl@gmx.de> Signed-off-by: David Airlie <airlied@linux.ie>
* drm: misc cleanupDave Airlie2005-07-071-3/+6
| | | | | | | | | | | 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>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+531
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!
OpenPOWER on IntegriCloud