diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-02 16:17:06 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-03 14:26:01 +0300 |
commit | fb218f2027048e199a76cccb9a131b2afd48ccbe (patch) | |
tree | 0e2160ccd40f9f731d560d2f6637aa763ac59e26 /drivers/gpu/drm/i915/gt/mock_engine.c | |
parent | 49a24e71b2479064f24cea75e69020a6d480b1e5 (diff) | |
download | linux-fb218f2027048e199a76cccb9a131b2afd48ccbe.tar.xz |
drm/i915/gt: Discard stale context state from across idling
Before we idle, on parking, we switch to the kernel context such that we
have a scratch context loaded while the GPU idle, protecting any
precious user state. Be paranoid and assume that the idle state may have
been trashed, and reset the kernel_context image after idling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-4-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/mock_engine.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/mock_engine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c index 4e1eafa94be9..d0e68ce9aa51 100644 --- a/drivers/gpu/drm/i915/gt/mock_engine.c +++ b/drivers/gpu/drm/i915/gt/mock_engine.c @@ -152,6 +152,10 @@ static int mock_context_pin(struct intel_context *ce) return intel_context_active_acquire(ce); } +static void mock_context_reset(struct intel_context *ce) +{ +} + static const struct intel_context_ops mock_context_ops = { .alloc = mock_context_alloc, @@ -161,6 +165,7 @@ static const struct intel_context_ops mock_context_ops = { .enter = intel_context_enter_engine, .exit = intel_context_exit_engine, + .reset = mock_context_reset, .destroy = mock_context_destroy, }; |