From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrey Grodzovsky
<andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org,
etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Nicholas.Kazlauskas-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH v2 2/5] drm/sched: Keep s_fence->parent pointer
Date: Mon, 15 Apr 2019 18:48:42 +0200 [thread overview]
Message-ID: <5e6b7daa-9ecb-aa77-30d7-cfccd571654c@gmail.com> (raw)
In-Reply-To: <1555341087-23339-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
Am 15.04.19 um 17:11 schrieb Andrey Grodzovsky:
> For later driver's reference to see if the fence is signaled.
>
> v2: Move parent fence put to resubmit jobs.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 05a4540..89d1f1b 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -368,8 +368,6 @@ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad)
> if (s_job->s_fence->parent &&
> dma_fence_remove_callback(s_job->s_fence->parent,
> &s_job->cb)) {
> - dma_fence_put(s_job->s_fence->parent);
> - s_job->s_fence->parent = NULL;
> atomic_dec(&sched->hw_rq_count);
> } else {
> /*
> @@ -396,6 +394,14 @@ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad)
> sched->ops->free_job(s_job);
> }
> }
> +
> + /*
> + * Stop pending timer in flight as we rearm it in drm_sched_start. This
> + * avoids the pending timeout work in progress to fire right away after
> + * this TDR finished and before the newly restarted jobs had a
> + * chance to complete.
> + */
> + cancel_delayed_work(&sched->work_tdr);
> }
>
> EXPORT_SYMBOL(drm_sched_stop);
> @@ -467,6 +473,7 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched)
> if (found_guilty && s_job->s_fence->scheduled.context == guilty_context)
> dma_fence_set_error(&s_fence->finished, -ECANCELED);
>
> + dma_fence_put(s_job->s_fence->parent);
> s_job->s_fence->parent = sched->ops->run_job(s_job);
> atomic_inc(&sched->hw_rq_count);
> }
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-04-15 16:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 15:11 [PATCH v2 1/5] drm/scheduler: rework job destruction Andrey Grodzovsky
[not found] ` <1555341087-23339-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-04-15 15:11 ` [PATCH v2 2/5] drm/sched: Keep s_fence->parent pointer Andrey Grodzovsky
[not found] ` <1555341087-23339-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-04-15 16:48 ` Christian König [this message]
2019-04-15 15:11 ` [PATCH v2 5/5] Patch '5edb0c9b Fix deadlock with display during hanged ring recovery' Andrey Grodzovsky
2019-04-15 15:11 ` [PATCH v2 3/5] drm/amdgpu: Avoid HW reset if guilty job already signaled Andrey Grodzovsky
2019-04-15 15:11 ` [PATCH v2 4/5] drm/amd/display: wait for fence without holding reservation lock Andrey Grodzovsky
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=5e6b7daa-9ecb-aa77-30d7-cfccd571654c@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Nicholas.Kazlauskas-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
--cc=etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/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