[PATCH 2/4] drm/amdgpu: shorten amdgpu_job_free_resources
zhoucm1
david1.zhou at amd.com
Thu Jun 30 09:17:07 UTC 2016
On 2016年06月30日 16:53, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
>
> The fence and the sync object are not hardware resources.
Isn't job->fence hw fence?
David Zhou
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 8 +++++---
> 1 file 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 87b75d7..347962e 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);
> }
>
More information about the amd-gfx
mailing list