[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9b691217-dd36-e3f6-3b10-373d60116ccc@amd.com>
Date: Fri, 30 Sep 2022 13:27:41 +0200
From: Christian König <christian.koenig@....com>
To: Arvind Yadav <Arvind.Yadav@....com>, andrey.grodzovsky@....com,
shashank.sharma@....com, amaranath.somalapuram@....com,
Arunpravin.PaneerSelvam@....com, sumit.semwal@...aro.org,
gustavo@...ovan.org, airlied@...ux.ie, daniel@...ll.ch,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org,
steven.price@....com
Subject: Re: [PATCH] Add NULL check for s_fence->parent
Am 30.09.22 um 10:38 schrieb Arvind Yadav:
> NULL check is added for s_fence->parent.
I've send a patch to fix this as well and this here is actually the
wrong way around.
We want to free up the job when there isn't any parent fence any more.
Regards,
Christian.
>
> Signed-off-by: Arvind Yadav <Arvind.Yadav@....com>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 4f2395d1a791..6684d88463b4 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -829,7 +829,8 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
> job = list_first_entry_or_null(&sched->pending_list,
> struct drm_sched_job, list);
>
> - if (job && dma_fence_is_signaled(job->s_fence->parent)) {
> + if (job && job->s_fence->parent &&
> + dma_fence_is_signaled(job->s_fence->parent)) {
> /* remove job from pending_list */
> list_del_init(&job->list);
>
Powered by blists - more mailing lists