drm/amdgpu: signal scheduler fence when hw submission fails v3
authorChristian König <christian.koenig@amd.com>
Wed, 2 Sep 2015 10:03:06 +0000 (12:03 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Sep 2015 21:23:31 +0000 (17:23 -0400)
Otherwise the resource blocked by it will never be reclaimed.

v2: add DRM_ERROR.
v3: fix typo in commit message

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Chunming Zhou<david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 5ad7fa83f5015bff013ae148db243e8716864eb5..905fd3089a539d3731f487f2d76941a6c010283d 100644 (file)
@@ -362,6 +362,9 @@ static int amd_sched_main(void *param)
                        else if (r)
                                DRM_ERROR("fence add callback failed (%d)\n", r);
                        fence_put(fence);
+               } else {
+                       DRM_ERROR("Failed to run job!\n");
+                       amd_sched_process_job(NULL, &job->cb);
                }
 
                count = kfifo_out(&entity->job_queue, &job, sizeof(job));