[PATCH 3/4] drm/amdgpu:fix uvd ring fini routine(v2)

Deucher, Alexander Alexander.Deucher at amd.com
Thu Sep 21 15:00:36 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Thursday, September 21, 2017 3:12 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 3/4] drm/amdgpu:fix uvd ring fini routine(v2)
> 
> fix missing finish uvd enc_ring.
> v2:
> since the adev pointer check in already in ring_fini
> so drop the check outsider
> 
> Change-Id: Ib74237ca5adcb3b128c9b751fced0b7db7b09e86
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 331e34a..e8bd50c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -269,6 +269,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device
> *adev)
> 
>  int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
>  {
> +	int i;
>  	kfree(adev->uvd.saved_bo);
> 
>  	amd_sched_entity_fini(&adev->uvd.ring.sched, &adev->uvd.entity);
> @@ -279,6 +280,9 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device
> *adev)
> 
>  	amdgpu_ring_fini(&adev->uvd.ring);
> 
> +	for (i = 0; i < AMDGPU_MAX_UVD_ENC_RINGS; ++i)
> +		amdgpu_ring_fini(&adev->uvd.ring_enc[i]);
> +
>  	release_firmware(adev->uvd.fw);
> 
>  	return 0;
> --
> 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