From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
etnaviv@lists.freedesktop.org, eric@anholt.net
Cc: Christian.Koenig@amd.com
Subject: [PATCH 2/3] drm/sched: Keep s_fence->parent pointer
Date: Mon, 8 Apr 2019 12:08:11 -0400 [thread overview]
Message-ID: <1554739692-6999-2-git-send-email-andrey.grodzovsky@amd.com> (raw)
In-Reply-To: <1554739692-6999-1-git-send-email-andrey.grodzovsky@amd.com>
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;
-
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;
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);
--
2.7.4
_______________________________________________
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-08 16:08 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 ` Andrey Grodzovsky [this message]
2019-04-09 14:37 ` [PATCH 2/3] drm/sched: Keep s_fence->parent pointer Christian König
[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=1554739692-6999-2-git-send-email-andrey.grodzovsky@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.