summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-06-29 14:29:57 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 22:06:10 +0300
commita79a5bdcefc4d283b58eef46804c43c88789dd1f (patch)
tree6be4ca1f77f0e91b398e8ae09bbe28698ba831f3 /drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
parentb5f5acbc87052e1bd8ada6915e1dedd856da767d (diff)
downloadlinux-a79a5bdcefc4d283b58eef46804c43c88789dd1f.tar.xz
drm/amdgpu: shorten amdgpu_job_free_resources
The fence and the sync object are not hardware resources. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_job.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_job.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 87b75d726ae8..347962ea17ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -89,21 +89,23 @@ static void amdgpu_job_free_resources(struct amdgpu_job *job)
for (i = 0; i < job->num_ibs; ++i)
amdgpu_ib_free(job->adev, &job->ibs[i], f);
- fence_put(job->fence);
-
- amdgpu_sync_free(&job->sync);
}
void amdgpu_job_free_cb(struct amd_sched_job *s_job)
{
struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
+ fence_put(job->fence);
+ amdgpu_sync_free(&job->sync);
kfree(job);
}
void amdgpu_job_free(struct amdgpu_job *job)
{
amdgpu_job_free_resources(job);
+
+ fence_put(job->fence);
+ amdgpu_sync_free(&job->sync);
kfree(job);
}