summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Collapse)Author
2005-06-24Ref count the sysdev class to support multiple DRM cardsJon Smirl
2005-06-24Make sysdev class only register when fbdev detectedJon Smirl
2005-06-24More err path clean up for drm_pm Add mandatory sysdev shutdown functionJon Smirl
2005-06-24Fix the sysdev approach for power management.Alan Hourihane
We need to use the container_of() call to access our device private.
2005-06-23Fix drm_memory_debug.c to compile, doesn't seem to be working Clean upJon Smirl
error return path in drm_stub.c
2005-06-22Get the power management hooks into the right place so that everything getsJon Smirl
freed correctly.
2005-06-19Remove I2C support from radeon driver. Same support is available fromJon Smirl
radeonfb.
2005-06-17fix up drm_alloc_agp to take a dev arg and not pass crappy agpgart aroundDave Airlie
2005-06-17Fix 810/830 buildJon Smirl
2005-06-16Force AGP always for Intel chipsets.Alan Hourihane
Fixes bug #3552
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-09Completely re-initialize DMA settingsIan Romanick
There were two problems. First, the 'warp' and 'primary' pointers weren't cleared, so mga_do_cleanup_dma, which gets called multiple times, would try to ioremapfree them multiple times. This resulted in the new error messages to syslog. The second problem was the, since the dev_private structure isn't reallocated and cleaned out in mga_do_init_dma, when the server is reloaded idle-waits would wait for impossible values. I have given this patch some more riggorous testing. This includes: - Load module, start server, run GL app, stop server, unload module. - Load module, start server, run GL app, stop server, unload module, reload module, restart server, run GL app. - Load module, start server, run GL app, stop server, restart server, run GL app, stop server, unload module. In all three cases, everything worked as expected. Please let me know if there are any further regressions with this patch. Xorg bug: 3408 Reported by: Chris Rankin
2005-06-09drm_mem_init should be done at core load, not driver initJon Smirl
2005-06-06Fix copyrightsAlan Hourihane
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-28Bugzilla #3217: The size field in the new dma handle structure wasEric Anholt
uninitialized, and its use in drm_pci_free later resulted in panics. 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-05-27Modify drm_driver::device_is_agp to return a tri-state value to indicateIan Romanick
that a device absolutely is, absolutely is not, or may or may not be AGP. Modify the i915 DRM to use this to force all i9x5 devices to be "AGP" (even the PCI-e devices). Reported by: Lukas Hejtmanek
2005-05-21Change the MGA initialization and cleanup a bit. The dev_private structureIan Romanick
is now allocated (and partially filled in) by the new mga_driver_preinit function. This allows the driver to detect the type of card (i.e., G200 class vs. G400 class) on its own. The chipset value passed to mga_dma_init is now ignored. This same technique is used by the radeon DRM. As a result of this, mga_driver_pretakedown was converted to mga_driver_postcleanup. This routine gets called in some other places than might be expected, and it sets the dev_private pointer to NULL. That little gem took over an hour to track down. :(
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-05-17Savage doesn't require AGP any more. Enable build even without CONFIG_AGP.Felix Kuehling
2005-05-16Added device_is_agp callback to drm_driver. This function is called by theIan Romanick
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). Bumped the driver date and the driver patch-level for MGA. This mostly fixes bugzilla #3248. The BSD side still needs an implementation of mga_driver_device_is_agp.
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-04-20A fix for a locking bug which is triggered when a client tries to lock withThomas Hellstrom
flag DMA_QUIESCENT (typically the X server), but gets interrupted by a signal. The locking IOCTL should then return an error, but if DMA_QUIESCENT succeeds it returns 0, and the client falsely thinks it has the lock. In addition The client waits for DMA_QUISCENT and possibly DMA_READY without having the lock.
2005-04-19Revert last commit, it affect via thingsDave Airlie
2005-03-29Add skeletal imagine driver (but don't build it yet).Adam Jackson
2005-03-28Via updates:Thomas Hellstrom
New PCI command parser. Moved from via_dma.c to via_verifier.c so functions with similar functionality are close to eachother. Moved video related functions to via_video.c, which might be extended in the future, as new video functionality is added. New device-specific generic IRQ IOCTL, similar to the general VBLANK IOCTL, but with support for multiple device IRQ sources and functionality. Support for Unichrome Pro PM800/CN400 video DMA commands in verifier and PCI parser. Support for Unichrome Pro PM800/CN400 HQV IRQs in the new generic IRQ IOCTL. Bumped minor. New version 2.6.0.
2005-03-27Description: Rather than use custom code in DRM_WAIT_ON() to do exactlyDave Airlie
what wait_event_interruptible_timeout() does, use the function and just change the return values appropriately. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
2005-03-27Some ia64 platforms may not support write combining on all type of memory,Dave Airlie
so we need to consult the EFI memory map before we try to set the write combine attribute of a page. This patch will try to map a page write combined if it's not an AGP page and the EFI memory map says it's ok, otherwise it falls back to a regular, uncached mapping. Can someone please apply this to the drm tree? From: Jesse Barnes
2005-03-25fix up AGP multi-head support for kernel 2.6.12Dave Airlie
2005-03-25verify_area is deprecated, replaced by access_ok. Seems I missed this oneDave Airlie
when I did the big overall conversion. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
2005-03-25fix bug with XFree86 4.3 on core drmDave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-03-253dfx DRM depends on PCIDave Airlie
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2005-03-25For 2.6.12 and 2.6.11.x:Dave Airlie
Remove incorrect "drm_"-prefix from parameter description. Signed-off-by: Magnus Damm <damm@opensource.se>
2005-03-08Fix for bug 2673 from Egbert Eich - memset the versionDave Airlie
2005-02-08Close a race which could allow for privilege escalation by users with DRIEric Anholt
privileges on Radeon hardware. Essentially, a malicious program could submit a packet containing an offset (possibly in main memory) to be rendered from/to, while a separate thread switched that offset in userspace rapidly between a valid value and an invalid one. radeon_check_and_fixup_offset() would pull the offset in from user space, check it, and spit it back out to user space to be copied in later by the emit code. It would sometimes catch the bad value, but sometimes the malicious program could modify it after the check and get an invalid offset rendered from/to. Fix this by allocating a temporary buffer and copying the data in at once. While here, make the cliprects stuff not do the VERIFYAREA_READ and COPY_FROM_USER_UNCHECKED gymnastics, avoiding a lock order reversal on FreeBSD. Performance impact is negligible -- no difference on r200 to ~1% improvement on rv200 in quake3 tests (P4 1Ghz, demofour at 1024x768, n=4 or 5).
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-02-07fix agp detection on linuxDave Airlie
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-02-01make functions static in i915, remove unused functionsDave Airlie
2005-02-01update i830 similiar to the kernel, add staticsDave Airlie
2005-02-01make more functions static in i810 and fix pageflip cleanupDave Airlie
2005-01-29fix radeon drvDave Airlie
2005-01-24hopefully fix drm_core setversion ioctl... pointed out by Eric on ircDave Airlie
2005-01-19Fix cut & paste problemAlan Hourihane
2005-01-16remove duplicate drm_sysfs.oDave Airlie
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>