]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow sharing the idle-barrier from other kernel requests
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Aug 2019 10:00:15 +0000 (11:00 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Aug 2019 10:53:04 +0000 (11:53 +0100)
commitb95b7a74051db0d2bc881da94fcd094b05273e50
tree1ec8990be56972746cada518e40e07f64696fd3a
parentf7962f7f42401e1f2767d46a657b34d319a8bd35
drm/i915: Allow sharing the idle-barrier from other kernel requests

By placing our idle-barriers in the i915_active fence tree, we expose
those for reuse by other components that are issuing requests along the
kernel_context. Reusing the proto-barrier active_node is perfectly fine
as the new request implies a context-switch, and so an opportune point
to run the idle-barrier. However, the proto-barrier is not equivalent
to a normal active_node and care must be taken to avoid dereferencing the
ERR_PTR used as its request marker.

v2: Comment the more egregious cheek
v3: A glossary!

Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 66a3baea852f ("drm/i915: Keep contexts pinned until after the next kernel context switch")
Fixes: f02fec1f7de1 ("drm/i915/oa: Reconfigure contexts on the fly")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190802100015.1281-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/gt/intel_context.h
drivers/gpu/drm/i915/gt/intel_engine_pm.c
drivers/gpu/drm/i915/gt/selftest_context.c [new file with mode: 0644]
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active.h
drivers/gpu/drm/i915/i915_active_types.h
drivers/gpu/drm/i915/selftests/i915_live_selftests.h