aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_bufs.c
Commit message (Collapse)AuthorAge
* drm: fd.o bug #11895: Only add the AGP base to map offset if the caller didn't.Eric Anholt2008-02-07
| | | | | | | | | The i830 and newer intel 2D code adds the AGP base to map offsets already, because it wasn't doing the AGP enable which used to set dev->agp->base. Credit goes to Zhenyu for finding the issue. Signed-off-by: Dave Airlie <airlied@linux.ie>
* i915: add suspend/resume supportJesse Barnes2008-02-07
| | | | | | | | | Add suspend/resume support to the i915 driver. Moves some of the initialization into the driver load routine, and fixes up places where we assumed no dev_private existed in some of the cleanup paths. This allows us to suspend/resume properly even if X isn't running. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: run cleanfile across drm treeDave Airlie2008-02-07
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* Use helpers to obtain task pid in printksPavel Emelyanov2007-10-19
| | | | | | | | | | | | | | | | 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-14
| | | | | | | | | 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-14
| | | | | | | | | | 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: ioremap return value checksScott Thompson2007-08-25
| | | | | Signed-off-by: Scott Thompson <postfail <at> hushmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm_rmmap_ioctl(): remove dead codeAdrian Bunk2007-07-23
| | | | | | | | This patch removes some obviously dead code spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: detypedef the hashtab and more of smanDave Airlie2007-07-11
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: detypedeffing continues...Dave Airlie2007-07-11
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: detypef waitlist/freelist/buf_entry/device_dma/drm_queue structsDave Airlie2007-07-11
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: drop drm_buf_t typedefDave Airlie2007-07-11
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove drm_file_t, drm_device_t and drm_head_t typedefsDave Airlie2007-07-11
| | | | | | some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a bunch of typedefs on the userspace interfaceDave Airlie2007-07-11
| | | | | | | 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: cleanup use of Linux list handling macrosDave Airlie2007-07-10
| | | | | | | | 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: bring bufs code from git tree.Dave Airlie2007-03-10
| | | | | | | This checks the AGP mappings are in a valid place and also fixes the size check in the vm.. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Allow for 44 bit user-tokens (or drm_file offsets)Thomas Hellstrom2007-02-08
|
* drm: remove drm_ioremap and drm_ioremapfreeChristoph Hellwig2007-02-07
| | | | | | | | 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>
* drm: use vmalloc_user instead of vmalloc_32 for DRM_SHMThomas Hellstrom2007-02-07
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add flag for mapping PCI DMA buffers read-only.George Sapountzis2006-12-06
| | | | | | | 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>
* drm: ioremap balanced with iounmap for drivers/char/drmAmol Lad2006-10-25
| | | | | | | | | | | ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) to make sure the files are compiling without any warning/error due to new changes Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: allow multiple addMaps with the same 32-bit map offsset.Thomas Hellstrom2006-09-21
| | | | | | Reported on -mm kernels. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanupsAdrian Bunk2006-09-21
| | | | | | | | | This patch contains the following cleanups: - make 3 needlessly global functions static - sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove FALSE/TRUE that snuck in with simple memory manager changes.Andrew Morton2006-09-21
| | | | | | | | Thanks to Andrew Morton for pointing these out, I've fixed a few his patch missed. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a tab that snuck inDave Airlie2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update user token hashing and map handlesThomas Hellstrom2006-09-21
| | | | | | | | | | | | | | | | | | | 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>
* drm: missing mutex unlockThomas Hellstrom2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: possible cleanupsDave Airlie2006-04-23
| | | | | | | | | | | | | | 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>
* drm: fixup PCI DMA supportDave Airlie2006-03-19
| | | | | | | 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>
* sem2mutex: drivers/char/drm/Dave Airlie2006-02-02
| | | | | | | | | | | | | | 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: fixup drm bufs being just under the EOMDave Airlie2006-01-11
| | | | | | | If the mapping was just under the end of memory it would fail. Lets DRM start on my PCI card. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: major update from CVS for radeon and coreDave Airlie2006-01-02
| | | | | | | | 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>
* drm: fix warning on 64-bit platforms..Dave Airlie2005-10-24
| | | | | | | This looks ugly, but it is the only thing that makes sense that doesn't change the API. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix all sparse warning on 32-bit x86Dave Airlie2005-09-30
| | | | | | Finally cleaned up the sparse warnings for the drm. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cast handle to a pointer to avoid warningDave Airlie2005-09-25
| | | | | | Andrew reported a warning on this line, just case to void *. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: lindent the drm directory.Dave Airlie2005-09-25
| | | | | | | | | 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: small cleanupsDave Airlie2005-09-05
| | | | | | | | | | This patch contains the following small cleanups: - make two needlessly global functions static - drm_sysfs.c: every file should #include the header with the prototypes of the global functions it is offering Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix issue with handle lookup for a 0 handleDave Airlie2005-09-05
| | | | | | | | On 32-bit PPC a 0 handle is valid for AGP space, the 32/64 lookup doesn't handle 0 correctly. From: Ben Herrenschmidt <benh@kernel.crashing.org> and Paul Mackerras <paulus@samba.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fixes for powerpcDave Airlie2005-08-20
| | | | | | | | | Remove a bogus check on whether an area is memory (we need a better interface) also change pgprot flags for powerpc don't check on x86-64 either From: Paul Mackerras <paulus@samba.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove version.h and any version checks..Dave Airlie2005-08-07
| | | | | | This patch removes all the drm kernel conditionals from the kernel DRM tree. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: updated DRM map patch for 32/64 bit systemsDave Airlie2005-08-05
| | | | | | | | | | | | I basically combined Paul's patches with additions that I had made for PCI scatter gather. I also tried more carefully to avoid problems with the same token assigned multiple times while trying to use the base address in the token if possible to gain as much backward compatibility as possible for broken DRI clients. From: Paul Mackerras <paulus@samba.org> and Egbert Eich <eich@suse.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanup buffer/map codeDave Airlie2005-07-10
| | | | | | | | | 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: destatic exported function.Dave Airlie2005-07-10
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: export symbols for use by driversDave Airlie2005-07-10
| | | | | | | This just exports symbols for use in drivers. 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-10
| | | | | | | | 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-10
| | | | | | | | 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>
* Refactor common, boilerplate ioctl code from drm_addbufs_* functions intoDave Airlie2005-07-10
| | | | | | | | drm_addbufs. This makes the code more like the BSD code, and makes the drm_addbufs_* functions callable in-kernel. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add framebuffer mapsDave Airlie2005-07-10
| | | | | | | | | | The patch makes drmAddBufs/drmMapBufs can handle buffers in video memory The attached patch adds a new buffer type DRM_FB_BUFFER. It works like AGP memory but uses video memory. From: Austin Yuan <austinyuan@viatech.com.cn> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add _DRM_CONSISTENT map typeDave Airlie2005-07-10
| | | | | | | | 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-07
| | | | | | | | | | | 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>