Skip to content

Commit c951b0a

Browse files
icklejnikula
authored andcommitted
drm/i915: Return early for await_start on same timeline
Requests within a timeline are ordered by that timeline, so awaiting for the start of a request within the timeline is a no-op. This used to work by falling out of the mutex_trylock() as the signaler and waiter had the same timeline and not returning an error. Fixes: 6a79d84 ("drm/i915: Lock signaler timeline while navigating") Signed-off-by: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: <[email protected]> # v5.5+ Reviewed-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit ab7a690) Signed-off-by: Jani Nikula <[email protected]>
1 parent c67b35d commit c951b0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/i915_request.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,8 @@ i915_request_await_start(struct i915_request *rq, struct i915_request *signal)
776776
struct dma_fence *fence;
777777
int err;
778778

779-
GEM_BUG_ON(i915_request_timeline(rq) ==
780-
rcu_access_pointer(signal->timeline));
779+
if (i915_request_timeline(rq) == rcu_access_pointer(signal->timeline))
780+
return 0;
781781

782782
if (i915_request_started(signal))
783783
return 0;

0 commit comments

Comments
 (0)