linux/drivers/gpu/drm
Linus Torvalds e6890f6f3d i915: disable interrupts before tearing down GEM state
Reinette Chatre reports a frozen system (with blinking keyboard LEDs)
when switching from graphics mode to the text console, or when
suspending (which does the same thing). With netconsole, the oops
turned out to be

	BUG: unable to handle kernel NULL pointer dereference at 0000000000000084
	IP: [<ffffffffa03ecaab>] i915_driver_irq_handler+0x26b/0xd20 [i915]

and it's due to the i915_gem.c code doing drm_irq_uninstall() after
having done i915_gem_idle(). And the i915_gem_idle() path will do

  i915_gem_idle() ->
    i915_gem_cleanup_ringbuffer() ->
      i915_gem_cleanup_hws() ->
        dev_priv->hw_status_page = NULL;

but if an i915 interrupt comes in after this stage, it may want to
access that hw_status_page, and gets the above NULL pointer dereference.

And since the NULL pointer dereference happens from within an interrupt,
and with the screen still in graphics mode, the common end result is
simply a silently hung machine.

Fix it by simply uninstalling the irq handler before idling rather than
after. Fixes

    http://bugzilla.kernel.org/show_bug.cgi?id=13819

Reported-and-tested-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-08 17:09:24 -07:00
..
i810 drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
i830 drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
i915 i915: disable interrupts before tearing down GEM state 2009-09-08 17:09:24 -07:00
mga drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
r128 drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
radeon drm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register. 2009-09-07 15:26:19 +10:00
savage drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
sis drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
tdfx
ttm drm/ttm: Read buffer overflow 2009-08-04 13:41:05 +10:00
via drm/via: Fix vblank IRQ on VIA hardware. 2009-07-15 16:00:07 +10:00
ati_pcigart.c drm/ati_pcigart: use memset_io to reset the memory 2009-03-13 14:24:14 +10:00
drm_agpsupport.c agp: switch AGP to use page array instead of unsigned long array 2009-06-19 10:21:42 +10:00
drm_auth.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_bufs.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_cache.c drm: wbinvd is cache coherent. 2008-10-18 07:10:53 +10:00
drm_context.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_crtc.c drm/kms: teardown crtc correctly when fb is destroyed. 2009-08-19 14:11:34 +10:00
drm_crtc_helper.c drm: Catch stop possible NULL pointer reference 2009-08-04 13:29:49 +10:00
drm_debugfs.c drm: drm_debugfs, check kmalloc retval 2009-07-15 15:55:37 +10:00
drm_dma.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_drawable.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_drv.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_edid.c drm/edid: fixup detailed timings like the X server. 2009-08-15 12:25:08 +10:00
drm_fops.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_gem.c drm: drm_gem, check kzalloc retval 2009-07-15 15:56:12 +10:00
drm_hashtab.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_info.c drm: merge Linux master into HEAD 2009-03-28 20:22:18 -04:00
drm_ioc32.c drm: Only use DRM_IOCTL_UPDATE_DRAW compat wrapper for compat X86. 2009-03-13 14:24:04 +10:00
drm_ioctl.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_irq.c drm: silence pointless vblank warning. 2009-08-09 12:24:01 +10:00
drm_lock.c drm: Avoid client deadlocks when the master disappears. 2009-03-03 09:50:20 +10:00
drm_memory.c agp: switch AGP to use page array instead of unsigned long array 2009-06-19 10:21:42 +10:00
drm_mm.c drm: Apply "Memory fragmentation from lost alignment blocks" 2009-06-19 09:01:12 +10:00
drm_modes.c drm: When adding probed modes, preserve duplicate mode types 2009-08-09 12:22:53 +10:00
drm_pci.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_proc.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_scatter.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_sman.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
drm_stub.c drm: Move a dereference below a NULL test 2009-07-15 16:56:48 +10:00
drm_sysfs.c drm: Fix sysfs device confusion. 2009-08-21 10:01:59 +10:00
drm_vm.c agp: switch AGP to use page array instead of unsigned long array 2009-06-19 10:21:42 +10:00
Kconfig drm/i915: Add missing dependency on Intel AGP support. 2009-06-21 22:13:38 -07:00
Makefile drm/radeon: fix driver initialization order so radeon kms can be builtin 2009-06-24 16:11:06 +10:00
README.drm

************************************************************
* For the very latest on DRI development, please see:      *
*     http://dri.freedesktop.org/                          *
************************************************************

The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
Infrastructure (DRI).

The DRM supports the Direct Rendering Infrastructure (DRI) in four major
ways:

    1. The DRM provides synchronized access to the graphics hardware via
       the use of an optimized two-tiered lock.

    2. The DRM enforces the DRI security policy for access to the graphics
       hardware by only allowing authenticated X11 clients access to
       restricted regions of memory.

    3. The DRM provides a generic DMA engine, complete with multiple
       queues and the ability to detect the need for an OpenGL context
       switch.

    4. The DRM is extensible via the use of small device-specific modules
       that rely extensively on the API exported by the DRM module.


Documentation on the DRI is available from:
    http://dri.freedesktop.org/wiki/Documentation
    http://sourceforge.net/project/showfiles.php?group_id=387
    http://dri.sourceforge.net/doc/

For specific information about kernel-level support, see:

    The Direct Rendering Manager, Kernel Support for the Direct Rendering
    Infrastructure
    http://dri.sourceforge.net/doc/drm_low_level.html

    Hardware Locking for the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/hardware_locking_low_level.html

    A Security Analysis of the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/security_low_level.html