]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/amd/scheduler: fix page protection of cb
authorChunming Zhou <david1.zhou@amd.com>
Tue, 7 Nov 2017 02:40:00 +0000 (10:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:47:18 +0000 (12:47 -0500)
We must remove the fence callback.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 53ea7e12d219dbed6652d960dda1b0cf8d03a2a7..9e3748a5b398f6917e2abd7b4570917577bddcae 100644 (file)
@@ -229,6 +229,13 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
                 */
                kthread_park(sched->thread);
                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);