From: "Christian König" <christian.koenig@amd.com>
To: Amit Pundir <amit.pundir@linaro.org>, Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm@vger.kernel.org, Rob Clark <robdclark@chromium.org>,
Andrey Grodzovsky <andrey.grodzovsky@amd.com>,
David Airlie <airlied@linux.ie>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/scheduler: fix drm_sched_job_add_implicit_dependencies harder
Date: Wed, 17 Nov 2021 08:27:00 +0100 [thread overview]
Message-ID: <c7741be3-43ec-307b-f5bd-3d19725df76c@amd.com> (raw)
In-Reply-To: <CAMi1Hd0qzu1t6QeZCNgSoTrScZL0_XQnZUPkQ5y7D+oV49GREw@mail.gmail.com>
Am 16.11.21 um 19:30 schrieb Amit Pundir:
> On Tue, 16 Nov 2021 at 21:21, Rob Clark <robdclark@gmail.com> wrote:
>> From: Rob Clark <robdclark@chromium.org>
>>
>> drm_sched_job_add_dependency() could drop the last ref, so we need to do
>> the dma_fence_get() first.
>>
> It fixed the splats I saw on RB5 (sm8250 | A650). Thanks.
>
> Tested-by: Amit Pundir <amit.pundir@linaro.org>
I've added my rb, pushed this with the original fix to drm-misc-fixes
and cleaned up the obvious fallout between drm-misc-fixes and
drm-misc-next in drm-tip.
Thanks for the help and sorry for the noise,
Christian.
>
>> Cc: Christian König <christian.koenig@amd.com>
>> Fixes: 9c2ba265352a drm/scheduler: ("use new iterator in drm_sched_job_add_implicit_dependencies v2")
>> Signed-off-by: Rob Clark <robdclark@chromium.org>
>> ---
>> Applies on top of "drm/scheduler: fix drm_sched_job_add_implicit_dependencies"
>> but I don't think that has a stable commit sha yet.
>>
>> drivers/gpu/drm/scheduler/sched_main.c | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
>> index 94fe51b3caa2..f91fb31ab7a7 100644
>> --- a/drivers/gpu/drm/scheduler/sched_main.c
>> +++ b/drivers/gpu/drm/scheduler/sched_main.c
>> @@ -704,12 +704,13 @@ int drm_sched_job_add_implicit_dependencies(struct drm_sched_job *job,
>> int ret;
>>
>> dma_resv_for_each_fence(&cursor, obj->resv, write, fence) {
>> - ret = drm_sched_job_add_dependency(job, fence);
>> - if (ret)
>> - return ret;
>> -
>> /* Make sure to grab an additional ref on the added fence */
>> dma_fence_get(fence);
>> + ret = drm_sched_job_add_dependency(job, fence);
>> + if (ret) {
>> + dma_fence_put(fence);
>> + return ret;
>> + }
>> }
>> return 0;
>> }
>> --
>> 2.33.1
>>
next prev parent reply other threads:[~2021-11-17 7:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 15:55 [PATCH] drm/scheduler: fix drm_sched_job_add_implicit_dependencies harder Rob Clark
2021-11-16 18:30 ` Amit Pundir
2021-11-17 7:27 ` Christian König [this message]
2021-11-18 1:23 ` Steev Klimaszewski
2021-11-18 3:09 ` Rob Clark
2021-11-18 6:59 ` Christian König
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=c7741be3-43ec-307b-f5bd-3d19725df76c@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=amit.pundir@linaro.org \
--cc=andrey.grodzovsky@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.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