]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Workaround hang with BSD and forcewake on SandyBridge
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 15 Jul 2012 08:42:38 +0000 (09:42 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Aug 2012 08:43:29 +0000 (10:43 +0200)
commitf4f3f47c461e97b34d92d5c13517a6bbe753ea46
tree5214fb0558219c613179e12afef33112387d4946
parent5e174d655929465489c41a5cfdfbb855d5891a1b
drm/i915: Workaround hang with BSD and forcewake on SandyBridge

For reasons that are not apparent to anybody, abb03c1ad32 (drm/i915:
Group the GT routines together in both code and vtable) breaks the use
of the BitStream Decoder ring on SandyBridge. The active ingredient of
that patch is the conversion from a udelay(10) to a udelay(1) in the
busy-wait loop of waiting for the forcewake acknowledge. If we restore
that udelay(10) or insert another udelay(1) afterwards (or any wait
longer than 250ns) everything works again. An alternative is also to
remove any delay from the busy-wait loop.

Given that in the atomic sections we want to complete the wait as quick
as possible to avoid blocking the CPU for too long, it makes sense to
remove the delay altogether and simply spin on the exit condition until
it completes. So we replace the udelay(1) with cpu_relax().

Papers over regression from

commit abb03c1ad32b64bee5eaf5d9b9f3dcaf524f8c99
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

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51738
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_drv.h