[PATCH] drm/amdgpu: fix amdgpu_job_free_cb

Liu, Monk Monk.Liu at amd.com
Wed Oct 25 03:08:53 UTC 2017


Yeah, we already manually called job_free_resources() after job pushed 

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf Of Christian K?nig
Sent: 2017年10月24日 20:48
To: amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: fix amdgpu_job_free_cb

Please forget that one.

Double checking the code again I've found that this change is nonsense.

Christian.

Am 24.10.2017 um 14:44 schrieb Christian König:
> From: Christian König <christian.koenig at amd.com>
>
> When the scheduler drops a job we need to free the IBs as well.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reported-by: Qu, Jim <Jim.Qu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> index a58e3c5dd84b..2790f61842a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> @@ -105,11 +105,7 @@ static void amdgpu_job_free_cb(struct amd_sched_job *s_job)
>   	struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
>   
>   	amdgpu_ring_priority_put(job->ring, s_job->s_priority);
> -	dma_fence_put(job->fence);
> -	amdgpu_sync_free(&job->sync);
> -	amdgpu_sync_free(&job->dep_sync);
> -	amdgpu_sync_free(&job->sched_sync);
> -	kfree(job);
> +	amdgpu_job_free(job);
>   }
>   
>   void amdgpu_job_free(struct amdgpu_job *job)


_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list