[PATCH 3/3] drm/amdgpu/gfx: free memory of mqd backup

Deucher, Alexander Alexander.Deucher at amd.com
Thu Feb 16 14:57:25 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Xiangliang Yu
> Sent: Thursday, February 16, 2017 2:25 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Yu, Xiangliang
> Subject: [PATCH 3/3] drm/amdgpu/gfx: free memory of mqd backup
> 
> Need to free mqd backup when destroying ring.
> 
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 2202f02..23cf6fa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -7379,12 +7379,14 @@ static void
> gfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev)
> 
>  	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
>  		ring = &adev->gfx.compute_ring[i];
> +		kfree(adev->gfx.mec.mqd_backup[i]);
>  		amdgpu_bo_free_kernel(&ring->mqd_obj,
>  				      &ring->mqd_gpu_addr,
>  				      &ring->mqd_ptr);
>  	}
> 
>  	ring = &adev->gfx.kiq.ring;
> +	kfree(adev-
> >gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS]);
>  	amdgpu_bo_free_kernel(&ring->mqd_obj,
>  			      &ring->mqd_gpu_addr,
>  			      &ring->mqd_ptr);
> --
> 2.7.4
> 
> _______________________________________________
> 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