summaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
AgeCommit message (Collapse)Author
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-09drm_mem_init should be done at core load, not driver initJon Smirl
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-28Actually check for drm_fb_loaded before trying to initialize the sysdevAlan Hourihane
approach.
2005-05-28Re-implement the power management.Alan Hourihane
There's two choices when fb is or isn't loaded as we treat ourselves as a PCI driver in the latter case. If we are a PCI driver, then register the suspend/resume functions directly. If not, then we register as a sysdev and pick up the suspend/resume actions and pump them down into a generic *power function. It'll be nice when this little mess is sorted out with regard to being a real PCI driver ;-/
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-03-25fix up AGP multi-head support for kernel 2.6.12Dave Airlie
2005-03-25fix bug with XFree86 4.3 on core drmDave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-02-07Invalid bound check of driver defined ioctls in drm_ioctlDave Airlie
Bug 2489 Reporter: Aapo Tahkola <aet@rasterburn.org>
2005-02-07change DRIVER_ to CORE_ makes things look nicer, also change it so theDave Airlie
driver name is marked on resource allocations
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-12-07Patch from Jon Smirl from Nov. 2nd that makes older X servers behave wellThomas Hellstrom
with linux-core. Without this, they will fail on their second invocation since the drm already has a busID assigned. Submitted by: Jon Smirl
2004-10-23Round 2 of getting rid of inter_module_get()Jon Smirl
2004-10-23Revert symbol_get() changes from drm_drvJon Smirl
2004-10-23fix inter module put/getDave Airlie
2004-10-23Prepare to eliminate inter_module_get("agp")Jon Smirl
2004-10-19drm-core, Clean up bug error path on stealth mode exitJon Smirl
2004-10-18Update Doxygen configuration & comments.Jose Fonseca
2004-10-15Switch linux-core over to 2.6 parameter model to enable debug useJon Smirl
drm_debug=1
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-08Fix refcount bug in stealth modeJon Smirl
2004-10-05enable the device in the right order, remove __devinit from drm_intJon Smirl
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-30Make fops per driver instead of global, remove default flush, poll, readJon Smirl
functions
2004-09-28Getting the AGP module is a global resource. Make sure a dual PCI/AGPJon Smirl
driver doesn't release it on unload since an AGP driver may also be loaded.
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-20Remove size restriction on permanent addmapJon Smirl
2004-09-20remove HAVE_COUNTERSDave Airlie
2004-09-16Let's try adding the dyn-minor patch again. This patch will reuse minorJon Smirl
numbers if a card is hotplugged in/out instead of just having them increase.
2004-09-15Back dyn-minor patch out for now. fops handling is broken on some cardsJon Smirl
2004-09-15Dynamic device minor support. Minor device numbers will be reused if theJon Smirl
device is hotplugged in/out of the system
2004-09-12Fix error path in probe() to release resources if there is an error.Jon Smirl
2004-09-10More general patch to mark resources in use by all DRM drivers. Makes theJon Smirl
code Linux specific.
2004-09-05missed fix as part of last checkinDave Airlie
2004-09-05merge back bunch of whitespace and misc changes from kernelDave Airlie
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-09-02Fix ref count problem in stealth mode. pci_get_subsys() with last parameterJon Smirl
set does the pci_dev_put for you.
2004-08-30implement drm_core_check_feature and use it .. looks lots nicerDave Airlie
2004-08-29remove hacky context thing that was gamma onlyDave Airlie
2004-08-29Drop GAMMA DRM from a great height ...Dave Airlie
2004-08-28Initialize pdev to NULL correctly so that pci_get_subsys() will work.Jon Smirl
2004-08-27Make DRM detect vesafb and revert to stealth mode to avoid resourceJon Smirl
conflicts
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-24This patch adds three new ioctl's to the VIA Unichrome/Pro DRM driver:Erdi Chen
DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER DRM_IOCTL_VIA_FLUSH The first ioctl sets up an area in AGP memory that will be used as the ring buffer. The second ioctl copies a command buffer from user space memory to the ring buffer. The third ioctl waits for engine idle until it returns. The motivation for this patch is to avoid the wait for engine idle call before each buffer flush in the current DRI driver. With this patch, the DRI driver can continue to flush its buffer as long as there is free space in the ring buffer. This patch adds an additional copy operation on the command buffer. This buffer copying is necessary to support multiple DRI clients rendering simultaneously. Otherwise, more CPU time will be spent in the busy loop waiting for engine idle between DRI context switch. Even in the single client case, the tradeoff is reasonable in comparision to the kernel call to check for free buffer space for the client to render directly to the ring buffer.
2004-08-17Merged drmfntbl-0-0-1Dave Airlie
2004-08-15Add dev to DRIVER_CTX_DTOR( dev, pos->handle) so that sis driver willJon Smirl
compile #if 0 get_pci_driver use in hotplug function until fbdev work around is written