summaryrefslogtreecommitdiff
path: root/linux-core/drm_bufs.c
AgeCommit message (Collapse)Author
2005-09-30fixup bens fix so it works..Dave Airlie
2005-09-30Add Bens fix for radeon maps on ppcDave Airlie
2005-09-03check is the map containing the lockDave Airlie
2005-08-20add x86_64 to the list as wellDave Airlie
2005-08-20add powerpc64 to the list of archs that this test doesn't make sense onDave Airlie
2005-08-17revert reversion of a part of a patch from Jon, that I did last night whileDave Airlie
checking things in in my sleep
2005-08-16add Egberts 32/64 bit patch (its in kernel already...)Dave Airlie
2005-08-07remove bus addressDave Airlie
2005-08-04Implement permanent sarea mapsJon Smirl
2005-08-04Tighten up AGP security. Verify that all uses of AGP are done insideJon Smirl
buffers that have been allocated from AGP. This includes some new capable(CAP_SYS_ADMIN) checks, these functions are also protected by the root requirement on the IOCTL macros.
2005-06-29silence warningAlan Hourihane
2005-06-28- Remove drm_initmap and replace its usage with drm_addmap. This reducesEric Anholt
code duplication, and it also hands you the map pointer so you don't need to re-find it. - Remove the permanent maps flag. Instead, for register and framebuffer maps, we always check whether there's already a map of that type and offset around. Move the Radeon map initialization into presetup (first open) so it happens again after every takedown. - Remove the split cleanup of maps between driver takedown (last close) and cleanup (module unload). Instead, always tear down maps on takedown, and drivers can recreate them on first open. - Make MGA always use addmap, instead of allocating consistent memory in the PCI case and then faking up a map for it, which accomplished nearly the same thing, in a different order. Note that the maps are exposed to the user again: we may want to expose a flag to avoid this, but it's not a security concern, and saves us a lot of code. - Remove rmmaps in the MGA driver. Since the function is only called during takedown anyway, we can let them die a natural death. - Make removal of maps happen in one function, which is called by both drm_takedown and drm_rmmap_ioctl. Reviewed by: idr (previous revision) Tested on: mga (old/new/pci dma), radeon, savage
2005-06-28add compat code from Paul MackerrasDave Airlie
2005-06-14Adds support for PCI cards to MGA DRMIan Romanick
This patch adds serveral new ioctls and a new query to get_param query to support PCI MGA cards. Two ioctls were added to implement interrupt based waiting. With this change, the client-side driver no longer needs to map the primary DMA region or the MMIO region. Previously, end-of-frame waiting was done by busy waiting in the client-side driver until one of the MMIO registers (the current DMA pointer) matched a pointer to the end of primary DMA space. By using interrupts, the busy waiting and the extra mappings are removed. A third ioctl was added to bootstrap DMA. This ioctl, which is used by the X-server, moves a *LOT* of code from the X-server into the kernel. This allows the kernel to do whatever needs to be done to setup DMA buffers. The entire process and the locations of the buffers are hidden from user-mode. Additionally, a get_param query was added to differentiate between G4x0 cards and G550 cards. A gap was left in the numbering sequence so that, if needed, G450 cards could be distinguished from G400 cards. According to Ville Syrjälä, the G4x0 cards and the G550 cards handle anisotropic filtering differently. This seems the most compatible way to let the client-side driver know which card it's own. Doing this very small change now eliminates the need to bump the DRM minor version twice. http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2 A number of ioctl handlers in linux-core were also modified so that they could be called in-kernel. In these cases, the in-kernel callable version kept the existing name (e.g., drm_agp_acquire) and the ioctl handler added _ioctl to the name (e.g., drm_agp_acquire_ioctl). This patch also replaces the drm_agp_do_release function with drm_agp_release. drm_agp_release (drm_core_agp_release in the previous patch) is very similar to drm_agp_do_release, and I saw no reason to have both. This commit *breaks the build* on BSD. Eric said that he would make the required updates to the BSD side soon. Xorg bug: 3259 Reviewed by: Eric Anholt
2005-06-04misc cleanup patch from Adrian BunkDave Airlie
2005-05-28Bugzilla #3217: Create a new __drm_pci_free which is used internally inEric Anholt
linux-core to free pci memory without freeing the structure. Linux-core internals often create pci dma handle structures on the stack due to the lack of a drm_local_map_t to store them in properly. Fix the original drm_pci_free to actually free the dma handle structure instead of leaking it. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
2005-05-20Refactor common, boilerplate ioctl code from drm_addbufs_* functions intoIan Romanick
drm_addbufs. This makes the code more like the BSD code, and makes the drm_addbufs_* functions callable in-kernel. Reviewed by: Dave Airlie
2005-04-26Convert BSD code to mostly use bus_dma, the dma abstraction for dealingEric Anholt
with IOMMUs and such. There is one usage of the forbidden vtophys() left in drm_scatter.c which will be fixed up soon. This required a KPI change for drm_pci_alloc/free() to return/use a drm_dma_handle_t that keeps track of os-specific bits, rather than just passing around the vaddr/busaddr/size. Submitted by: Tonnerre Lombard (partially) Tested on: FreeBSD: Rage128 AGP/PCI Linux: Savage4 AGP/PCI
2005-02-05- Implement drm_initmap, and extend it with the resource number to helpEric Anholt
FreeBSD. Add drm_get_resource_{start|len} so linux-specific stuff doesn't need to be in shared code. - Fix mach64 build by using __DECONST to work around passing a const pointer to useracc, which is unfortunately not marked const. - Get rid of a lot of maplist code by not having dev->maplist be a pointer, and by sticking the link entries directly in drm_local_map_t rather than having a separate structure for the linked list. - Factor out map uninit and removal into its own routine, rather than duplicating in both drm_takedown() and drm_rmmap(). - Hook up more driver functions, and correct FreeBSD-specific bits of radeon_cp.c, making radeon work. - Baby steps towards using bus_space as we should.
2005-01-16The patch makes drmAddBufs/drmMapBufs can handle buffers in video memoryDave Airlie
The attached patch adds a new buffer type DRM_FB_BUFFER. It works like AGP memory but uses video memory. From: austinyuan@viatech.com.cn (fd.o bug 1668) Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-01-01Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It usesFelix Kuehling
drm_pci_alloc/free for allocating/freeing the memory. Only implemented in the Linux DRM so far.
2004-10-18Update Doxygen configuration & comments.Jose Fonseca
2004-10-12Breakout heads into their own data structures.Jon Smirl
2004-10-10Rename fn_tbl to driver. Core driver now uses pci_driver name whichJon Smirl
reflects the personality name.
2004-10-06Revert back to drm_order() instead of using kernel get_order(). TheJon Smirl
functions are not identical.
2004-09-30Lindent of core build. Drivers checked for no binary diffs. A few filesJon Smirl
weren't Lindent's because their comments didn't convert very well. A bunch of other minor clean up with no code implact included.
2004-09-30Move things around to reduce public symbols and even out files. Switch toJon Smirl
get_order from drm_order.
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-21Make DRM permanent maps match broken X behavior. X is mapping regions thatJon Smirl
are both smaller and larger than what the hardware supports. If DRM tries to fix these requests X will fail.
2004-09-20Remove size restriction on permanent addmapJon Smirl
2004-09-20Felix's fix for map request smaller than permanent map sizeJon Smirl
2004-09-08Update doxygen configuration file. Minor documentation updates/fixes.Jose Fonseca
2004-09-08Adjust permanent mapping code to account for more than one framebuffer mapJon Smirl
2004-09-04Fixup OS_HAS_AGP/OS_HAS_MTRR along lines of patches going to kernel, asDave Airlie
suggested by Arjan.. Signed-off-by: Dave Airlie <airlied@linux.ie>
2004-08-30implement drm_core_check_feature and use it .. looks lots nicerDave Airlie
2004-08-29Drop GAMMA DRM from a great height ...Dave Airlie
2004-08-27__NO_VERSION__ hasn't been needed since 2.3 days ditch it...Dave Airlie
2004-08-24Merged drmfntbl-0-0-2Dave Airlie
2004-08-24addmap-base-2 patch from Jon Smirl:Dave Airlie
sets up the DRM to have the ability to have permanent maps while the driver is loaded...
2004-08-17Merged drmfntbl-0-0-1Dave Airlie
2004-07-25whitespace merge with kernelDave Airlie
2004-07-25Patch from Tom Arbuckle for missing bus_addressDave Airlie
2004-07-20first set of __user annotations from kernel (Al Viro)Dave Airlie
2004-07-20fix some more NULLs from kernelDave Airlie
2004-07-15sparse cleanups from kernel: Al ViroDave Airlie
2004-04-10update from linux kernel for ia64Dave Airlie
2003-12-16Don't ioremap the framebuffer area. The ioremapped area wasn't used byEric Anholt
anything, and took up valuable KVA. While I'm in the area, clean up BSD MTRR stuff some more. Suggested by: jonsmirl
2003-11-06Return EBUSY when attempting to addmap a DRM_SHM area with a lock in it ifEric Anholt
dev->lock.hw_lock is already set. This fixes the case of two X Servers running on the same head on different VTs with interface 1.1, by making the 2nd head fail to inizialize like before.
2003-06-19Revert the janitorial - that works is now on the new branchJose Fonseca
newdrm-0-0-1-branch.
2003-06-03Split declarations/definitions in drm_scatter.h into drm_sg.h/drm_sg_tmp.hJose Fonseca
respectively. Splited the work out of the ioctls and renamed (with the _ioctl prefix). Added some more documentation. Did the same for drm_sgpsupport.h.