[PATCH 1/2] drm/amd/scheduler: fix page protection of cb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We must remove the fence callback.

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

diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index af5b2c50abac..310904042dfc 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -231,6 +231,13 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
 		 */
 		kcl_kthread_park(sched->thread);
 		kcl_kthread_unpark(sched->thread);
+		if (entity->dependency) {
+			dma_fence_remove_callback(entity->dependency,
+						  &entity->cb);
+			dma_fence_put(entity->dependency);
+			entity->dependency = NULL;
+		}
+
 		while ((job = to_amd_sched_job(spsc_queue_pop(&entity->job_queue)))) {
 			struct amd_sched_fence *s_fence = job->s_fence;
 			amd_sched_fence_scheduled(s_fence);
-- 
2.14.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux