OSDN Git Service

drm/i915/gt: Track the context validity explicitly
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Dec 2019 12:41:55 +0000 (12:41 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Dec 2019 16:49:31 +0000 (16:49 +0000)
commitf70de8d2ca6be552fbdc40d434ad471ae20b7cae
tree75d9291dcc15a109280f44463fbf0c9e4dff38f8
parent49e74c8f9ae635a1c87fab06966da4c713cf9d63
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
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/gt/intel_context_types.h
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_ring_submission.c