drm/i915/lrc: Clear context restore/save inhibit flags for new contexts
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 25 Jan 2018 11:24:42 +0000 (11:24 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 25 Jan 2018 18:04:25 +0000 (18:04 +0000)
commit09b1a4e4b583b4c54c819563717949807fdbb640
tree094932edd1887247eae3865f74423f4fa19b07e5
parent2fcf06805cb063085127d7e3f4ed7842682b3fff
drm/i915/lrc: Clear context restore/save inhibit flags for new contexts

CTX_CONTEXT_CONTROL (CTX_SR_CTL) operates as a masked register and so
will only apply the bits that are selected by the upper half. In the
case of selectively enabling sr inhibit, this may mean the context keeps
the current setting (so forgetting to save the context later, eventually
leading to a very upset GPU!).

Fixes: 517aaffe0c1b ("drm/i915/execlists: Inhibit context save/restore for the fake preempt context")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180125112443.12745-1-chris@chris-wilson.co.uk
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
drivers/gpu/drm/i915/intel_lrc.c