]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix fallout of fake reset along resume
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 16 Jun 2018 20:25:34 +0000 (21:25 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Jun 2018 09:14:54 +0000 (10:14 +0100)
commit19b3231b1d9d6eba4483dcc4f2f006dbcebb1f8a
tree22b7a38de44613a0e3cbd31dfe975b66df59b10f
parent40aa861a10c3f45c8e3ad4494b926ede3484219c
drm/i915: Fix fallout of fake reset along resume

commit 5a07e5c1a6ac ("drm/i915/execlists: Reset the CSB head tracking on
reset/sanitization") and commit 2d6f85738c43 ("drm/i915: Move GEM sanitize
from resume_early to resume") show the conflicting requirements on the
code. We must reset the GPU before trashing live state on a fast resume
(hibernation debug, or error paths), but we must only reset our state
tracking iff the GPU is reset (or power cycled). This is tricky if we
are disabling GPU reset to simulate broken hardware; we reset our state
tracking but the GPU is left intact and recovers from its stale state.

v2: Again without the assertion for forcewake, no longer required since
commit 738b0f4c6491 ("drm/i915/ringbuffer: Fix context restore upon reset")
as the contexts are reset from the CS ensuring everything is powered up.

Fixes: 5a07e5c1a6ac ("drm/i915/execlists: Reset the CSB head tracking on reset/sanitization")
Fixes: 2d6f85738c43 ("drm/i915: Move GEM sanitize from resume_early to resume")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180616202534.18767-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h