summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/i915_dma.c
Commit message (Collapse)AuthorAgeFilesLines
* Rework how drm maps are handled.rnoland2010-04-221-7/+7
| | | | | | | | | | | | * On 32 bit platforms we steal the upper 4 bits of the map handle to store a unique map id. * On 64 bit platforms we steal the upper 24 bits. Resolves issues where the offsets that are handed to mmap may overlap the VRAM on some cards. Tested on: radeon, intel, mga, and via. This will break nouveau. I will spin new patches shortly.
* We shouldn't need to drop and reaquire the lock here.rnoland2009-06-251-7/+5
| | | | MFC after: 3 days
* The G45 docs indicate that all G4X chips use the new framecount register.rnoland2009-06-201-3/+6
| | | | | | | | | Intel agrees with my reading of the docs, make it so for all G4X chips. The new register also has a 32 bit width as opposed to 24 bits. Fix things up so that the counters roll over properly. MFC after: 3 days
* Intel handled the management of the breadcrumb counter inconsistently.rnoland2009-03-251-3/+5
| | | | | | Make sure that we always handle it the same way. MFC after: 3 days
* Sync up the rest of the code that we use with what Intel is shippingrnoland2009-03-191-7/+12
| | | | | | | -Some irq/vblank related changes that hopefully will help. -A little more cleanup while I'm here. MFC after: 3 days
* Initialize the vblank structures at load time. Previously we did thisrnoland2009-02-281-0/+7
| | | | | | | | | | | | at irq install/uninstall time, but when we vt switch, we uninstall the irq handler. When the irq handler is reinstalled, the modeset ioctl happens first. The modeset ioctl is supposed to tell us that we can disable vblank interrupts if there are no active consumers. This will fail after a vt switch until another modeset ioctl is called via dpms or xrandr. Leading to cases where either interrupts are on and can't be disabled, or worse, no interrupts at all. MFC after: 2 weeks
* The GM45 handles vblank differently. Pull the changes from Intel in.rnoland2009-02-251-0/+6
| | | | MFC after: 2 Weeks
* This was part of a sync to the code that Intel is shipping in linux.rnoland2009-02-251-468/+211
| | | | | | | | - Remove the old TTM interface - Move register definitions to i915_reg.h - Overhaul the irq handler MFC after: 2 weeks
* The vblank_swap ioctl was fundamentally race prone. Get rid of it.rnoland2009-02-251-2/+0
| | | | MFC after: 2 weeks
* Don't report GEM capability until we actually have GEM support.rnoland2008-10-271-1/+2
| | | | | | This was causing the newer Intel video drivers to fail and abort X. Approved by: jhb (mentor)
* drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)rnoland2008-10-251-1/+1
| | | | | | | | | | | | | | | Olaf Kirch noticed that the i915_set_status_page() function of the i915 kernel driver calls ioremap with an address offset that is supplied by userspace via ioctl. The function zeroes the mapped memory via memset and tells the hardware about the address. Turns out that access to that ioctl is not restricted to root so users could probably exploit that to do nasty things. We haven't tried to write actual exploit code though. It only affects the Intel G33 series and newer. Approved by: bz (secteam) Obtained from: Intel drm repo Security: CVE-2008-3831
* resync to git masterrnoland2008-10-031-148/+215
| | | | | | | | | | | | | | | | | | | | | | This reverts a private patch which is causing issues with many Intel chipsets. I will review that patch and see what we need to do to fix it up later, but for the time being, we will just get these chips working again. This update contains a lot of code cleanup and is post gem merge (no, we don't have gem support). It should prove much easier to read the code now. A lot of thanks goes to vehemens for that work. I have adapted the code to use cdevpriv for tracking per open file data. That alleviates the old ugly hack that we used to try and accomplish the task and helped to clean up the open / close behavior a good bit. This also replaces the hack that was put in place a year or so ago to prevent radeons from locking up with AIGLX enabled. I have had a couple of radeon testers report that it still works as expected, though I no longer have radeon hardware to test with myself. Other various fixes from the linux crew and Intel, many of which are muddled in with the gem merge. Approved by: jhb (mentor) Obtained from: mesa/drm git master MFC after: 2 weeks
* We should never call drm_pci_alloc() while holding locks, due the thernoland2008-09-091-6/+12
| | | | | | | | calls to bus_dma. There were multiple paths that held different locks or no locks at all. This patch ensures that all of the calling paths drop their lock(s) before calling drm_pci_alloc(). Reviewed by: kib
* Update drm kernel drivers.rnoland2008-08-231-278/+657
| | | | | | | | | | This is a sync to mesa/drm pre-gem, with a few fixes on top of that. It also contains one local patch supplied by kib@ that I can't apply to git.master shared code. Approved by: flz Obtained from: mesa/drm git.master MFC after: 2 weeks
* Add the i915 GME device to DRM.remko2008-03-211-1/+2
| | | | | | | PR: kern/121808 Submitted by: Volker Werth <volker at vwsoft dot com> Approved by: imp (mentor, implicit for trivial changes) MFC after: 3 days
* Properly initialize the dev_priv before calling the i915_dma_cleanup().kib2007-08-211-3/+2
| | | | | | | | This fixes my rev. 1.5. Reviewed by: anholt Approved by: re (kensmith) MFC after: 2 weeks
* bus_dma_tag_create() and bus_dma_mem_alloc() shall not be called with akib2007-07-121-9/+15
| | | | | | | | | | | | | non-sleepable lock held. drm_pci_alloc() calls them, thus drm mutex shall not be held during the call. Move the drm_pci_alloc() to the start of the i915_initialize() and drop the the drm mutex around it. Reported by: Ganbold <ganbold micom mng net> Reviewed by: anholt Approved by: re (hrs) MFC after: 1 week
* Merge from DRM upstream:anholt2006-09-071-13/+37
| | | | | | | - Add support for Intel 965 Express chipsets. - Add support for R200 vertex programs, along with minor bugfixes. - Add support for vblank synchronization to pipe B of Intel hardware (laptop screens).
* Update to DRM CVS as of 2006-04-09. The most notable new feature is the updatedanholt2006-04-091-15/+34
| | | | | | | Radeon memmap code, which with a new DDX driver and DRI drivers should fix long-term stability issues with Radeons. Also adds support for r200's ATI_fragment_shader, r300 texrect support and texture caching fixes, i915 vblank support and bugfixes, and new PCI IDs.
* Update DRM to CVS snapshot as of 2005-11-28. Notable changes:anholt2005-11-281-30/+80
| | | | | | | | | | | | | - S3 Savage driver ported. - Added support for ATI_fragment_shader registers for r200. - Improved r300 support, needed for latest r300 DRI driver. - (possibly) r300 PCIE support, needs X.Org server from CVS. - Added support for PCI Matrox cards. - Software fallbacks fixed for Rage 128, which used to render badly or hang. - Some issues reported by WITNESS are fixed. - i915 module Makefile added, as the driver may now be working, but is untested. - Added scripts for copying and preprocessing DRM CVS for inclusion in the kernel. Thanks to Daniel Stone for getting me started on that.
* Update to DRM CVS as of 2005-04-12, bringing many changes:anholt2005-04-161-0/+728
- Split core DRM routines back into their own module, rather than using the nasty templated system like before. - Development-class R300 support in radeon driver (requires userland pieces, of course). - Mach64 driver (haven't tested in a while -- my mach64s no longer fit in the testbox). Covers Rage Pros, Rage Mobility P/M, Rage XL, and some others. - i915 driver files, which just need to get drm_drv.c fixed to allow attachment to the drmsub device. Covers i830 through i915 integrated graphics. - savage driver files, which should require minimal changes to work. Covers the Savage3D, Savage IX/MX, Savage 4, ProSavage. - Support for color and texture tiling and HyperZ features of Radeon. Thanks to: scottl (much p4 handholding) Jung-uk Kim (helpful prodding) PR: [1] kern/76879, [2] kern/72548 Submitted by: [1] Alex, lesha at intercaf dot ru [2] Shaun Jurrens, shaun at shamz dot net
OpenPOWER on IntegriCloud