OSDN Git Service

drm/i915: Hold forcewake for the duration of reset+restart
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 11:02:59 +0000 (12:02 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 16:07:28 +0000 (17:07 +0100)
commit1749d90ff6e0cd0fc97aac5b08782ca1ac9665cf
tree5e5df35c45c3227bb08095c6b253678b01b20c1d
parent95a19ab4d7f8afbfca0564102d7d0bea2196c12c
drm/i915: Hold forcewake for the duration of reset+restart

Resetting the engine requires us to hold the forcewake wakeref to
prevent RC6 trying to happen in the middle of the reset sequence. The
consequence of an unwanted RC6 event in the middle is that random state
is then saved to the powercontext and restored later, which may
overwrite the mmio state we need to preserve (e.g. PD_DIR_BASE in the
legacy ringbuffer reset_ring_common()).

This was noticed in the live_hangcheck selftests when Haswell would
sporadically fail to restart during igt_reset_queue().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-3-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c