[PATCH 1/2] drm/amd/scheduler: fix page protection of cb
Chunming Zhou
david1.zhou at amd.com
Tue Nov 7 02:48:39 UTC 2017
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
More information about the amd-gfx
mailing list