OSDN Git Service

drm/i915/execlists: Explicitly reset both reg and context runtime
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Mar 2020 12:58:27 +0000 (13:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Mar 2020 20:13:50 +0000 (21:13 +0100)
commitb28b34ac85d73ec77c6c442ab72fe0c7769e6475
tree57d1e4a3d0ec1cda428832f80d83920db21023a8
parent0f1dd02295f35dcdcbaafcbcbbec0753884ab974
drm/i915/execlists: Explicitly reset both reg and context runtime

Upon a GPU reset, we copy the default context image over top of the
guilty image. This will rollback the CTX_TIMESTAMP register to before
our value of ce->runtime.last. Reset both back to 0 so that we do not
encounter an underflow on the next schedule out after resume.

This should not be a huge issue in practice, as hangs should be rare in
correct code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200330125827.5804-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c