From: Christian König Date: Wed, 29 Jun 2016 11:29:57 +0000 (+0200) Subject: drm/amdgpu: shorten amdgpu_job_free_resources X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a79a5bdcefc4d283b58eef46804c43c88789dd1f;p=linux-beck.git drm/amdgpu: shorten amdgpu_job_free_resources The fence and the sync object are not hardware resources. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher --- 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); }