All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunming Zhou <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: jim.qu-5C7GfCeVMHo@public.gmane.org,
	Chunming Zhou <david1.zhou-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 2/2] drm/amd/scheduler: remove fence callback when context is killed
Date: Tue, 7 Nov 2017 10:48:40 +0800	[thread overview]
Message-ID: <20171107024840.1514-2-david1.zhou@amd.com> (raw)
In-Reply-To: <20171107024840.1514-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>

Otherwise there could be page protection.

Change-Id: I1f6c81002fb2ba21c17cdc14fdde86579b28374e
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
---
 drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 310904042dfc..e38d55961a9f 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -243,6 +243,12 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
 			amd_sched_fence_scheduled(s_fence);
 			kcl_dma_fence_set_error(&s_fence->finished, -ESRCH);
 			amd_sched_fence_finished(s_fence);
+			if (s_fence->parent) {
+				dma_fence_remove_callback(s_fence->parent,
+							  &s_fence->cb);
+				dma_fence_put(s_fence->parent);
+				s_fence->parent = NULL;
+			}
 			dma_fence_put(&s_fence->finished);
 			sched->ops->free_job(job);
 		}
-- 
2.14.1

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

  parent reply	other threads:[~2017-11-07  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07  2:48 [PATCH 1/2] drm/amd/scheduler: fix page protection of cb Chunming Zhou
     [not found] ` <20171107024840.1514-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2017-11-07  2:48   ` Chunming Zhou [this message]
     [not found]     ` <20171107024840.1514-2-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2017-11-07 10:31       ` [PATCH 2/2] drm/amd/scheduler: remove fence callback when context is killed Christian König
2017-11-07 10:29   ` [PATCH 1/2] drm/amd/scheduler: fix page protection of cb Christian König

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=20171107024840.1514-2-david1.zhou@amd.com \
    --to=david1.zhou-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jim.qu-5C7GfCeVMHo@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 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.