]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Do release kernel context if breadcrumb measure fails
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Fri, 7 May 2021 14:42:51 +0000 (16:42 +0200)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 10 May 2021 09:19:43 +0000 (10:19 +0100)
commit1b9c08e0467bfb00417c068021c30aa45efbea3d
tree19128155262ea38836e5acfa35c063521d8b4680
parent466a17c9312881f4964eaacf0c9f970034f05ad8
drm/i915/gt: Do release kernel context if breadcrumb measure fails

Commit 28dd311e3001 ("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 747599e58ba4 ("drm/i915/gt: Track all timelines
created using the HWSP").

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210507144251.376538-1-janusz.krzysztofik@linux.intel.com
drivers/gpu/drm/i915/gt/intel_engine_cs.c