diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-03 12:41:55 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-03 16:49:31 +0000 |
commit | f70de8d2ca6be552fbdc40d434ad471ae20b7cae (patch) | |
tree | 75d9291dcc15a109280f44463fbf0c9e4dff38f8 /drivers/gpu/drm/i915/gt/intel_context.c | |
parent | 49e74c8f9ae635a1c87fab06966da4c713cf9d63 (diff) |
drm/i915/gt: Track the context validity explicitly
Rather than assume if and only if the engine->default_state is not set
that the context is invalid, instead track when we know the context has
valid state -- either because we have copied the default_state or we
have completed a context switch to save the HW state.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191203124155.3019926-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c index b5e9c35ec6b8..c5e52ad39463 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.c +++ b/drivers/gpu/drm/i915/gt/intel_context.c @@ -147,6 +147,7 @@ static void __intel_context_retire(struct i915_active *active) GEM_TRACE("%s context:%llx retire\n", ce->engine->name, ce->timeline->fence_context); + set_bit(CONTEXT_VALID_BIT, &ce->flags); if (ce->state) __context_unpin_state(ce->state); |