]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Poison residual state [HWSP] across resume.
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Apr 2020 09:25:04 +0000 (10:25 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Apr 2020 15:27:39 +0000 (16:27 +0100)
commitbd3ec9e75893dacfa17f37c7f2bf1c7ed73d4043
tree076b0a10aba9c80cd82468867a1f6f4f620ee85b
parentcf9ba27840c26f649a90bb04db5b455d47810292
drm/i915/gt: Poison residual state [HWSP] across resume.

Since we may lose the content of any buffer when we relinquish control
of the system (e.g. suspend/resume), we have to be careful not to rely
on regaining control. A good method to detect when we might be using
garbage is by always injecting that garbage prior to first use on
load/resume/etc.

v2: Drop sanitize callback on cleanup
v3: Move seqno reset to timeline enter, so we reset all timelines.
However, this is done on every activation during runtime and not reset.
The similar level of paranoia we apply to correcting context state after
a period of inactivity.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200421092504.7416-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_timeline.c
drivers/gpu/drm/i915/gt/intel_timeline.h