aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorSharat Masetty <smasetty@codeaurora.org>2018-10-29 05:32:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 14:21:27 -0500
commit26efecf9558895a89c2920d258601b4afba10fd0 (patch)
treeb4e14b640f54aa3f343c2b39ad9e1181aa440a1d /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parent98079389a873f45ba75bbb20dcf14db0ec694a9a (diff)
drm/scheduler: Add drm_sched_job_cleanup
This patch adds a new API to clean up the scheduler job resources. This is primarliy needed in cases the job was created but was not queued to the scheduler queue. Additionally with this change, the layer which creates the scheduler job also gets to free up the job's resources and this entails moving the dma_fence_put(finished_fence) to the drivers ops free handler routines. Signed-off-by: Sharat Masetty <smasetty@codeaurora.org> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 663043c8f0f5..5d768f95de24 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1260,8 +1260,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1260 return 0; 1260 return 0;
1261 1261
1262error_abort: 1262error_abort:
1263 dma_fence_put(&job->base.s_fence->finished); 1263 drm_sched_job_cleanup(&job->base);
1264 job->base.s_fence = NULL;
1265 amdgpu_mn_unlock(p->mn); 1264 amdgpu_mn_unlock(p->mn);
1266 1265
1267error_unlock: 1266error_unlock: