From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Do release kernel context if breadcrumb measure fails
Date: Mon, 10 May 2021 10:20:59 +0100 [thread overview]
Message-ID: <1641c53a-099d-5b93-e610-2771a005a525@linux.intel.com> (raw)
In-Reply-To: <23575374.kmuVQn2iE0@jkrzyszt-mobl1.ger.corp.intel.com>
On 10/05/2021 10:15, Janusz Krzysztofik wrote:
> Hi Tvrtko,
>
> On poniedziałek, 10 maja 2021 11:14:46 CEST Tvrtko Ursulin wrote:
>>
>> On 07/05/2021 15:42, Janusz Krzysztofik wrote:
>>> Commit fb5970da1b42 ("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 b436a5f8b6c8 ("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>
>>> ---
>>> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>>> index 6dbdbde00f14..eba2da9679a5 100644
>>> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>>> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>>> @@ -898,7 +898,7 @@ static int engine_init_common(struct intel_engine_cs *engine)
>>> return 0;
>>>
>>> err_context:
>>> - intel_context_put(ce);
>>> + destroy_pinned_context(ce);
>>> return ret;
>>> }
>>>
>>>
>>
>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Found by some test or code inspection?
>
> Code inspection.
Cool. It was all green on the CI front so I am pushing it as we speak.
Thanks!
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2021-05-10 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 14:42 [Intel-gfx] [PATCH] drm/i915/gt: Do release kernel context if breadcrumb measure fails Janusz Krzysztofik
2021-05-07 18:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-08 0:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-05-10 9:14 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2021-05-10 9:15 ` Janusz Krzysztofik
2021-05-10 9:20 ` Tvrtko Ursulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1641c53a-099d-5b93-e610-2771a005a525@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=janusz.krzysztofik@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox