OSDN Git Service

drm/i915: Introduce a context barrier callback
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Mar 2019 16:02:50 +0000 (16:02 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Mar 2019 17:19:54 +0000 (17:19 +0000)
commit85fddf0b002719b23ec545ea67b6983bfd8c92d5
tree1611095b70a07cc354c67c0af16dc5fecd5759b1
parent831ebf18d63f10fe056542d5b70ec474df45d479
drm/i915: Introduce a context barrier callback

In the next patch, we will want to update live state within a context.
As this state may be in use by the GPU and we haven't been explicitly
tracking its activity, we instead attach it to a request we send down
the context setup with its new state and on retiring that request
cleanup the old state as we then know that it is no longer live.

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