From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Andrey Grodzovsky <andrey.grodzovsky@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
etnaviv@lists.freedesktop.org, eric@anholt.net
Cc: Christian.Koenig@amd.com
Subject: Re: [PATCH 2/3] drm/sched: Keep s_fence->parent pointer
Date: Tue, 9 Apr 2019 16:37:46 +0200 [thread overview]
Message-ID: <e4c380f5-8bc5-6bbe-321e-0cb6d5550869@gmail.com> (raw)
In-Reply-To: <1554739692-6999-2-git-send-email-andrey.grodzovsky@amd.com>
Am 08.04.19 um 18:08 schrieb Andrey Grodzovsky:
> For later driver's reference to see if the fence is signaled.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index c215cde..5bb4368 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -191,8 +191,6 @@ EXPORT_SYMBOL(drm_sched_dependency_optimized);
> */
> static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched)
> {
> - unsigned long flags;
> -
I think this actually belongs into patch #1.
> if (sched->timeout != MAX_SCHEDULE_TIMEOUT &&
> !list_empty(&sched->ring_mirror_list))
> schedule_delayed_work(&sched->work_tdr, sched->timeout);
> @@ -371,7 +369,6 @@ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad)
> 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;
How about also moving the dma_fence_put() into
drm_sched_resubmit_jobs(), right before we re-assign s_job->s_fence->parent?
I think that would be cleaner, but not sure if that wouldn't have any
ugly side effects.
Christian.
> atomic_dec(&sched->hw_rq_count);
> } else {
> /*
> @@ -398,6 +395,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);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-04-09 14:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 16:08 [PATCH 1/3] drm/scheduler: rework job destruction Andrey Grodzovsky
2019-04-08 16:08 ` [PATCH 2/3] drm/sched: Keep s_fence->parent pointer Andrey Grodzovsky
2019-04-09 14:37 ` Christian König [this message]
[not found] ` <1554739692-6999-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-04-08 16:08 ` [PATCH 3/3] drm/amdgpu: Avoid HW reset if guilty job already signaled Andrey Grodzovsky
2019-04-09 14:50 ` Christian König
[not found] ` <6ec23212-740d-7931-40e3-3d60ab591679-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-09 16:42 ` Grodzovsky, Andrey
[not found] ` <209e53f7-5842-1f34-f9bb-a800670b31fe-5C7GfCeVMHo@public.gmane.org>
2019-04-10 14:06 ` Christian König
2019-04-10 14:28 ` Grodzovsky, Andrey
[not found] ` <c77c574c-4613-693f-3f11-3f7eb8feae66-5C7GfCeVMHo@public.gmane.org>
2019-04-10 14:41 ` Christian König
[not found] ` <c3205a35-5c00-bda5-bd3b-2160d453f886-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-10 15:05 ` Grodzovsky, Andrey
[not found] ` <29ed8a29-4b82-a2f3-92aa-a6c660b19f09-5C7GfCeVMHo@public.gmane.org>
2019-04-10 15:09 ` Koenig, Christian
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=e4c380f5-8bc5-6bbe-321e-0cb6d5550869@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Christian.Koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrey.grodzovsky@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=etnaviv@lists.freedesktop.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