OSDN Git Service

drm/i915/gem: Wait until the context is finally retired before releasing engines
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Apr 2020 15:58:40 +0000 (16:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Apr 2020 18:48:06 +0000 (19:48 +0100)
commite68296259cf34f5ef86f8db16e036ec6c7b41315
tree43e9d5e5e2775d7dea86f4a219bfcdd241b48161
parent3b0a05792e2e279d2b859db70319445c0410d427
drm/i915/gem: Wait until the context is finally retired before releasing engines

If we want to percolate information back from the HW, up through the GEM
context, we need to wait until the intel_context is scheduled out for
the last time. This is handled by the retirement of the intel_context's
barrier, i.e. by listening to the pulse after the notional unpin. So
wait until the intel_context is finally retired before releasing the
engine, so that we can inspect the final context state and pass it on.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406155840.1728-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c