OSDN Git Service

drm/i915: Allow asynchronous waits on the i915_active barriers
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Apr 2020 15:58:39 +0000 (16:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Apr 2020 18:48:06 +0000 (19:48 +0100)
commit3b0a05792e2e279d2b859db70319445c0410d427
tree8f2b006c878f73c00256c1269411447304b16354
parent442dbc5c686153f2c86eeca21d0df010dc8f1c3a
drm/i915: Allow asynchronous waits on the i915_active barriers

Allow the caller to also wait upon the barriers stored in i915_active.

v2: Hook up i915_request_await_active(I915_ACTIVE_AWAIT_BARRIER) as well
for completeness, and avoid the lazy GEM_BUG_ON()!

v3: Pull flush_lazy_signals() under the active-ref protection as it too
walks the rbtree and so we must be careful that we do not free it as we
iterate.

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-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active.h