AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] drm/scheduler: don't update last scheduled fence in TDR
Date: Wed, 25 Apr 2018 16:39:49 +0800	[thread overview]
Message-ID: <1524645589-16162-1-git-send-email-Pixel.Ding@amd.com> (raw)

The current sequence in scheduler thread is:
1. update last sched fence
2. job begin (adding to mirror list)
3. job finish (remove from mirror list)
4. back to 1

Since we update last sched prior to joining mirror list, the jobs
in mirror list already pass the last sched fence. TDR just run
the jobs in mirror list, so we should not update the last sched
fences in TDR.

Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
---
 drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c
index 088ff2b..1f1dd70 100644
--- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
@@ -575,9 +575,6 @@ void drm_sched_job_recovery(struct drm_gpu_scheduler *sched)
 		fence = sched->ops->run_job(s_job);
 		atomic_inc(&sched->hw_rq_count);
 
-		dma_fence_put(s_job->entity->last_scheduled);
-		s_job->entity->last_scheduled = dma_fence_get(&s_fence->finished);
-
 		if (fence) {
 			s_fence->parent = dma_fence_get(fence);
 			r = dma_fence_add_callback(fence, &s_fence->cb,
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2018-04-25  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25  8:39 Pixel Ding [this message]
     [not found] ` <1524645589-16162-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2018-04-26  3:47   ` [PATCH] drm/scheduler: don't update last scheduled fence in TDR Ding, Pixel
     [not found]     ` <6A08CC55-19DC-46E1-9741-24CE89C49763-5C7GfCeVMHo@public.gmane.org>
2018-04-26  4:23       ` zhoucm1
     [not found]         ` <2c43a4bf-dc5a-69e2-1d9f-02a4019d9d27-5C7GfCeVMHo@public.gmane.org>
2018-05-03 12:09           ` Christian König
2018-05-07  1:00           ` Ding, Pixel
2018-04-26  3:48   ` Liu, Monk

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=1524645589-16162-1-git-send-email-Pixel.Ding@amd.com \
    --to=pixel.ding-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-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