drm/i915: Implement w/a for sporadic read failures on waking from rc6
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 2 Jul 2012 14:51:03 +0000 (11:51 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 3 Jul 2012 20:09:21 +0000 (22:09 +0200)
commitc4de7b0ffda2bb4843fd7f1052d0a2bb90bd08a5
treeb6806b54c43e44dd15e1bf7bf3480a4f47b8edcd
parent990bbdadabaa51828e475eda86ee5720a4910cc3
drm/i915: Implement w/a for sporadic read failures on waking from rc6

As a w/a to prevent reads sporadically returning 0, we need to wait for
the GT thread to return to TC0 before proceeding to read the registers.

v2: adapt for Haswell changes (Eugeni).

v3: use wait_for_atomic_us for thread status polling.

v3: *really* use wait_for_atomic for polling.

References: https://bugs.freedesktop.org/show_bug.cgi?id=50243
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_reg.h