Skip to content

Commit e49a8b2

Browse files
jkrzyszt-inteltursulin
authored andcommitted
drm/i915/gt: Do release kernel context if breadcrumb measure fails
Commit fb5970d ("drm/i915/gt: Use the kernel_context to measure the breadcrumb size") reordered some operations inside engine_init_common() and added an error unwind path to that function. In that path, a reference to a kernel context candidate supposed to be released on error was put, but the context, pinned when created, was not unpinned first. Fix it by replacing intel_context_put() with destroy_pinned_context() introduced later by commit b436a5f ("drm/i915/gt: Track all timelines created using the HWSP"). Signed-off-by: Janusz Krzysztofik <[email protected]> Cc: Chris Wilson <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ae9faeb commit e49a8b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gt/intel_engine_cs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ static int engine_init_common(struct intel_engine_cs *engine)
898898
return 0;
899899

900900
err_context:
901-
intel_context_put(ce);
901+
destroy_pinned_context(ce);
902902
return ret;
903903
}
904904

0 commit comments

Comments
 (0)