drm/i915/gt: Clear CACHE_MODE prior to clearing residuals
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 17 Jan 2021 09:30:15 +0000 (09:30 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Jan 2021 12:13:48 +0000 (12:13 +0000)
commitace44e13e577c2ae59980e9a6ff5ca253b1cf831
tree0041119216591af4c88d3ec6bdf235d224fec123
parentf530a41d13f2f45174fa0996a85edc32278d3fd5
drm/i915/gt: Clear CACHE_MODE prior to clearing residuals

Since we do a bare context switch with no restore, the clear residual
kernel runs on dirty state, and we must be careful to avoid executing
with bad state from context registers inherited from a malicious client.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2955
Fixes: 008ead6ef8f5 ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail")
Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail")
Testcase: igt/gem_ctx_isolation # ivb,vlv
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Reviewed-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210117093015.29143-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/gen7_renderclear.c