linux-stable/drivers/gpu/drm
Daniel Vetter 6af2d180f8 drm/i915: fix forcewake related hangs on snb
... by adding seemingly redudant posting reads.

This little dragon lair exploded the first time around when we've
refactored the code a bit to use the common wait_for_atomic_us in
"drm/i915: Group the GT routines together in both code and vtable",
which caused QA to file fdo bug #51738.

Chris Wilson entertained a few approaches to fixing #51738: Replacing
the udelay(1) with the previously-used udelay(10) (or any other
"sufficiently larger" delay), adding a posting read, or ditching the
delay completely and using cpu_relax. We went with the cpu_relax and
"915: Workaround hang with BSD and forcewake on SandyBridge". Which
blew up in fdo bug #52424, but adding the posting read while still
using cpu_relax seems to also fix that, it looks like the
posting read is the important ingriedient to fix these rc6 related
hangs on snb.

Popular theories as to why this is like it is include:
- A herd of pink elephants got royally angered somehow.

- The gpu has internally different functional units and judging by the
  register offsets, the forcewake request register and the forcewake
  ack registers are _not_ in the same functional unit (or at least
  aren't reached through the same routes). Hence the posting read
  syncs up with the wrong block and gets the entire gpu confused.

- ...

As a minimal ducttape fix for 3.6, let's just put these posting reads
into place again. We can try fancier approaches (like adding back the
cpu_relax instead of the udelay) in -next.

This (re-)fixes a regression introduced in

commit 990bbdadab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jul 2 11:51:02 2012 -0300

    drm/i915: Group the GT routines together in both code and vtable

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Du Yan <yanx.du@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52424
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51738u
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-27 08:23:28 +02:00
..
ast drm: Make the .mode_fixup() operations mode argument a const pointer 2012-07-19 21:52:38 -04:00
cirrus drm: Make the .mode_fixup() operations mode argument a const pointer 2012-07-19 21:52:38 -04:00
exynos drm: Make the .mode_fixup() operations mode argument a const pointer 2012-07-19 21:52:38 -04:00
gma500 drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
i2c drm: Make the .mode_fixup() operations mode argument a const pointer 2012-07-19 21:52:38 -04:00
i810 drm: kill dma queue support 2012-07-19 22:50:55 -04:00
i915 drm/i915: fix forcewake related hangs on snb 2012-07-27 08:23:28 +02:00
mga drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
mgag200 drm/mgag200: fix null pointer dereference 2012-07-19 22:05:25 -04:00
nouveau drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
r128 drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
radeon drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
savage drm/savage: clean up reclaim_buffers 2012-07-19 22:50:16 -04:00
sis drm/sis: fixup sis_mm ioctl structs 2012-07-19 22:51:58 -04:00
tdfx drm: kill reclaim_buffers callback 2012-07-19 22:50:28 -04:00
ttm drm/ttm: Fix buffer object metadata accounting regression v2 2012-06-12 15:57:47 +01:00
udl drm/udl: port over blanking code from udlfb. 2012-07-19 22:30:41 -04:00
via drm/via: clean up reclaim_buffers 2012-07-19 22:48:28 -04:00
vmwgfx drm: kill reclaim_buffers_locked 2012-07-19 22:49:58 -04:00
Kconfig drm/kms: driver for virtual cirrus under qemu 2012-05-17 11:02:24 +01:00
Makefile drm/kms: driver for virtual cirrus under qemu 2012-05-17 11:02:24 +01:00
README.drm
ati_pcigart.c
drm_agpsupport.c
drm_auth.c
drm_buffer.c
drm_bufs.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_cache.c Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next 2012-04-12 10:27:01 +01:00
drm_context.c drm: Unify and fix idr error handling 2012-04-24 09:50:20 +01:00
drm_crtc.c drm: Use stdint types for consistency 2012-05-29 11:07:09 +01:00
drm_crtc_helper.c drm: Don't initialize local ret variable when not needed 2012-05-22 10:32:58 +01:00
drm_debugfs.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_dma.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_dp_i2c_helper.c
drm_drv.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_edid.c drm/edid: don't return stack garbage from supports_rb 2012-06-21 09:34:13 +01:00
drm_edid_load.c drm: Don't initialize local ret variable when not needed 2012-05-22 10:32:58 +01:00
drm_edid_modes.h drm: replace open-coded ARRAY_SIZE with macro 2012-04-20 13:12:16 +01:00
drm_encoder_slave.c
drm_fb_helper.c drm/fb helper: don't call drm_crtc_helper_set_config 2012-07-19 21:24:32 -04:00
drm_fops.c drm: unconditionally clean up dma buffers of closing clients 2012-07-19 22:51:04 -04:00
drm_gem.c drm: Add colouring to the range allocator 2012-07-16 05:59:37 +10:00
drm_global.c
drm_hashtab.c
drm_info.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_ioc32.c
drm_ioctl.c drm/prime: expose capability flags for userspace. 2012-05-18 11:12:16 +01:00
drm_irq.c drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers 2012-07-18 06:05:48 +10:00
drm_lock.c drm: ditch strange DRIVER_DMA_QUEUE only error bail-out 2012-07-19 22:50:47 -04:00
drm_memory.c drm: remove unused code 2012-02-29 10:18:29 +00:00
drm_mm.c drm: Add colouring to the range allocator 2012-07-16 05:59:37 +10:00
drm_modes.c drm: Add drm_mode_copy() 2012-03-15 09:52:51 +00:00
drm_pci.c drm/pci: add support for getting the supported link bw. 2012-07-19 22:29:25 -04:00
drm_platform.c drm: cope with platformdev->id == -1 2012-03-07 14:03:40 +00:00
drm_prime.c drm/prime: add exported buffers to current fprivs imported buffer list (v2) 2012-05-23 10:46:03 +01:00
drm_proc.c drm: kill dma queue support 2012-07-19 22:50:55 -04:00
drm_scatter.c
drm_stub.c drm: Don't initialize local ret variable when not needed 2012-05-22 10:32:58 +01:00
drm_sysfs.c drm: fail gracefully when proc isn't setup. 2012-07-16 05:57:03 +10:00
drm_trace.h
drm_trace_points.c
drm_usb.c drm/usb: fix module license on drm/usb layer. 2012-04-19 09:33:32 +01:00
drm_vm.c drm: pass dev to drm_vm_{open,close}_locked() 2012-05-11 17:37:46 +01: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