History log of /freebsd-10.1-release/sys/dev/drm/i915_dma.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 207066 22-Apr-2010 rnoland

Rework how drm maps are handled.

* 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.


# 194996 25-Jun-2009 rnoland

We shouldn't need to drop and reaquire the lock here.

MFC after: 3 days


# 194540 20-Jun-2009 rnoland

The G45 docs indicate that all G4X chips use the new framecount register.

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


# 190400 24-Mar-2009 rnoland

Intel handled the management of the breadcrumb counter inconsistently.
Make sure that we always handle it the same way.

MFC after: 3 days


# 190021 19-Mar-2009 rnoland

Sync up the rest of the code that we use with what Intel is shipping

-Some irq/vblank related changes that hopefully will help.
-A little more cleanup while I'm here.

MFC after: 3 days


# 189130 28-Feb-2009 rnoland

Initialize the vblank structures at load time. Previously we did this
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


# 189054 25-Feb-2009 rnoland

The GM45 handles vblank differently. Pull the changes from Intel in.

MFC after: 2 Weeks


# 189049 25-Feb-2009 rnoland

This was part of a sync to the code that Intel is shipping in linux.

- Remove the old TTM interface
- Move register definitions to i915_reg.h
- Overhaul the irq handler

MFC after: 2 weeks


# 189047 25-Feb-2009 rnoland

The vblank_swap ioctl was fundamentally race prone. Get rid of it.

MFC after: 2 weeks


# 184373 27-Oct-2008 rnoland

Don't report GEM capability until we actually have GEM support.

This was causing the newer Intel video drivers to fail and abort X.

Approved by: jhb (mentor)


# 184263 25-Oct-2008 rnoland

drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)

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


# 183573 03-Oct-2008 rnoland

resync to git master

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


# 182883 09-Sep-2008 rnoland

We should never call drm_pci_alloc() while holding locks, due the the
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


# 182080 23-Aug-2008 rnoland

Update drm kernel drivers.

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


# 177480 21-Mar-2008 remko

Add the i915 GME device to DRM.

PR: kern/121808
Submitted by: Volker Werth <volker at vwsoft dot com>
Approved by: imp (mentor, implicit for trivial changes)
MFC after: 3 days


# 171909 21-Aug-2007 kib

Properly initialize the dev_priv before calling the i915_dma_cleanup().
This fixes my rev. 1.5.

Reviewed by: anholt
Approved by: re (kensmith)
MFC after: 2 weeks


# 171394 12-Jul-2007 kib

bus_dma_tag_create() and bus_dma_mem_alloc() shall not be called with a
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


# 162132 07-Sep-2006 anholt

Merge from DRM upstream:
- 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).


# 157617 09-Apr-2006 anholt

Update to DRM CVS as of 2006-04-09. The most notable new feature is the updated
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.


# 152909 28-Nov-2005 anholt

Update DRM to CVS snapshot as of 2005-11-28. Notable changes:
- 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.


# 145132 16-Apr-2005 anholt

Update to DRM CVS as of 2005-04-12, bringing many changes:
- 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