[PATCH 13/22] drm/amdgpu: fix vce_ring test memleak

Christian König ckoenig.leichtzumerken at gmail.com
Mon Feb 26 10:10:26 UTC 2018


Yeah, well that is the leak you introduced in patch #8.

So please instead fix the original patch which messed things up.

Christian.

Am 26.02.2018 um 06:18 schrieb Monk Liu:
> Change-Id: I35a343b21a007716fc7811781650264339c94273
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 2874fda..4ae7cb0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -463,8 +463,10 @@ static int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
>   		ib->ptr[i] = 0x0;
>   
>   	r = amdgpu_ib_schedule(ring, 1, ib, NULL, &f);
> -	if (r)
> -		return r;
> +	if (r) {
> +		DRM_ERROR("failed to ib_schedule VCE get_create_msg\n");
> +		goto err;
> +	}
>   	r = dma_fence_wait_timeout(f, false, timeout);
>   	if (r == 0) {
>   		DRM_ERROR("amdgpu: VCE IB test get_create_msg timed out.\n");
> @@ -478,6 +480,7 @@ static int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
>   	}
>   
>   err:
> +	amdgpu_job_free(job);
>   	amdgpu_ib_free(ring->adev, ib, NULL);
>   	dma_fence_put(f);
>   	return r;



More information about the amd-gfx mailing list