Skip to content

Commit 5ae13c3

Browse files
mbrost05tursulin
authored andcommitted
drm/i915: Lock timeline mutex directly in error path of eb_pin_timeline
Don't use the interruptable version of the timeline mutex lock in the error path of eb_pin_timeline as the cleanup must always happen. v2: (John Harrison) - Don't check for interrupt during mutex lock v3: (Tvrtko) - A comment explaining why lock helper isn't used Fixes: 544460c ("drm/i915: Multi-BB execbuf") Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: John Harrison <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit cb935c4) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent 8172f41 commit 5ae13c3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,9 +2505,14 @@ static int eb_pin_timeline(struct i915_execbuffer *eb, struct intel_context *ce,
25052505
timeout) < 0) {
25062506
i915_request_put(rq);
25072507

2508-
tl = intel_context_timeline_lock(ce);
2508+
/*
2509+
* Error path, cannot use intel_context_timeline_lock as
2510+
* that is user interruptable and this clean up step
2511+
* must be done.
2512+
*/
2513+
mutex_lock(&ce->timeline->mutex);
25092514
intel_context_exit(ce);
2510-
intel_context_timeline_unlock(tl);
2515+
mutex_unlock(&ce->timeline->mutex);
25112516

25122517
if (nonblock)
25132518
return -EWOULDBLOCK;

0 commit comments

Comments
 (0)