summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
Commit message (Collapse)AuthorAgeFilesLines
* drm: add device/vendor id to drm_device_t for compat with FreeBSD driversEric Anholt2006-09-221-0/+2
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: domain changes broke ppc r200Dave Airlie2006-09-221-1/+1
| | | | | | | | | 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>
* drm: update user token hashing and map handlesThomas Hellstrom2006-09-221-0/+3
| | | | | | | | | | | | | | | | | | | 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: move drm authentication to new generic hash table.Thomas Hellstrom2006-09-221-3/+5
| | | | | | | 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: add simple DRM memory manager, and hash tableThomas Hellstrom2006-09-221-1/+32
| | | | | | | | 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>
* drm: remove the DRM pci domainDave Airlie2006-09-221-1/+6
| | | | | | | | | | 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>
* drm: remove local copies of pci bus/slot/funcDave2006-09-221-3/+0
| | | | | | The drm keeps a local copy of these for little use. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanup old compat code and DRM fns from Linux only codeDave Airlie2006-09-221-12/+0
| | | | | | | 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>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* drm: possible cleanupsDave Airlie2006-04-231-1/+0
| | | | | | | | | | | | | | 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>
* drivers/char/drm/drm_memory.c: possible cleanupsAdrian Bunk2006-04-181-2/+2
| | | | | | | | | | | | | - #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>
* drm: remove drm_{alloc,free}_pagesDave Airlie2006-03-291-2/+0
| | | | | | | | 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>
* drm: fixup PCI DMA supportDave Airlie2006-03-191-7/+7
| | | | | | | 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>
* [PATCH] DRM: fix up classdev interface for drm coreGreg Kroah-Hartman2006-02-061-6/+4
| | | | | | | | | 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>
* sem2mutex: drivers/char/drm/Dave Airlie2006-02-021-2/+3
| | | | | | | | | | | | | | 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: fix issues with systems with no MTRRDave Airlie2006-01-121-0/+14
| | | | | | | On systems with no MTRR we should still define the interface. Original bug from apkm. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: major update from CVS for radeon and coreDave Airlie2006-01-021-12/+6
| | | | | | | | 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: update PCIGART support from CVSDave Airlie2006-01-021-1/+2
| | | | | | | | | In order to work on FreeBSD the gart needed to use a local mapping This patch moves the mainline to the new code and aligns some comment changes From: Eric Anholt <anholt@freebsd.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: bring savage inline with latest CVSDave Airlie2006-01-021-0/+15
| | | | | | | apply some whitespace cleanup and add wrappers for MTRR for OS calls From: Eric Anholt <anholt@freebsd.org> + Dave Airlie <airlied@linux.ie> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: move ioctl flags to a bit field of flagsDave Airlie2006-01-021-2/+6
| | | | | | 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/+8
| | | | | | | 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: simplify sysfs code for drmDave Airlie2005-11-111-4/+3
| | | | | | | | | 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>
* drm: remove old backwards compatibilty stuffDave Airlie2005-11-111-14/+0
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove drm_flushDave Airlie2005-11-111-1/+0
| | | | | | drm_flush is no longer needed remove. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove drm_init.c it is no longer neededDave Airlie2005-11-101-1/+0
| | | | | | Move drm_cpu_valid into drm_fops.c Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: rename driver hooks more understandablyDave Airlie2005-11-101-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* drm: remove unused components of drm structuresDave Airlie2005-10-241-5/+0
| | | | | | These haven't been used in quite a long time, takes 1K buffer out of structures. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: lindent the drm directory.Dave Airlie2005-09-251-432/+431
| | | | | | | | | 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: use kernel macrosDave Airlie2005-09-251-3/+3
| | | | | | Make some of the DRM_ macros use the real kernel macros. Signed-off-by: Dave Airlie <airlied@linux.ie>
* update from upstreamDave Airlie2005-09-251-0/+4
|\
| * [PATCH] PCI: remove CONFIG_PCI_NAMESAdrian Bunk2005-09-081-0/+4
| | | | | | | | | | | | | | This patch removes CONFIG_PCI_NAMES. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | drm: add radeon PCI express supportDave Airlie2005-09-111-6/+18
|/ | | | | | | Add support for Radeon PCI Express cards (needs a new X.org DDX) Also allows PCI GART table to be stored in VRAM for non PCIE cards Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove version.h and any version checks..Dave Airlie2005-08-071-34/+0
| | | | | | 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-051-8/+6
| | | | | | | | | | | | 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-101-2/+7
| | | | | | | | | 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: make drm_alloc_agp take a dev arg.Dave Airlie2005-07-101-1/+1
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add test for AGP devices and driver override for it.Dave Airlie2005-07-101-0/+28
| | | | | | | | | | | | | | | | | | 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>
* drm: destatic exported function.Dave Airlie2005-07-101-0/+2
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update some function so a driver can call themDave Airlie2005-07-101-13/+21
| | | | | | | | 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-6/+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>
* drm: add framebuffer mapsDave Airlie2005-07-101-1/+3
| | | | | | | | | | 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: misc cleanupDave Airlie2005-07-071-22/+0
| | | | | | | | | | | 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>
* drm: use kcalloc now that it is available..Dave Airlie2005-07-071-1/+7
| | | | | | Make the DRM drm_calloc call kcalloc now. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: 32/64-bit DRM ioctl compatibility patchDave Airlie2005-06-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch is against a 2.6.11 kernel tree. I am running this with a 32-bit X server (compiled up from X.org CVS as of a couple of weeks ago) and 32-bit DRI libraries and clients. All the userland stuff is identical to what I am using under a 32-bit kernel on my G4 powerbook (which is a 32-bit machine of course). I haven't tried compiling up a 64-bit X server or clients yet. In the compatibility routines I have assumed that the kernel can safely access user addresses after set_fs(KERNEL_DS). That is, where an ioctl argument structure contains pointers to other structures, and those other structures are already compatible between the 32-bit and 64-bit ABIs (i.e. they only contain things like chars, shorts or ints), I just check the address with access_ok() and then pass it through to the 64-bit ioctl code. I believe this approach may not work on sparc64, but it does work on ppc64 and x86_64 at least. One tricky area which may need to be revisited is the question of how to handle the handles which we pass back to userspace to identify mappings. These handles are generated in the ADDMAP ioctl and then passed in as the offset value to mmap. However, offset values for mmap seem to be generated in other ways as well, particularly for AGP mappings. The approach I have ended up with is to generate a fake 32-bit handle only for _DRM_SHM mappings. The handles for other mappings (AGP, REG, FB) are physical addresses which are already limited to 32 bits, and generating fake handles for them created all sorts of problems in the mmap/nopage code. This patch has been updated to use the new compatibility ioctls. From: Paul Mackerras <paulus@samba.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+1073
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!