[PATCH 5/6] drm/amd/pp: Fix memory leak on Si/CI/AI dgpu asics

Quan, Evan Evan.Quan at amd.com
Sun Sep 30 03:46:38 UTC 2018


Reviewed-by: Evan Quan <evan.quan at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Rex
> Zhu
> Sent: 2018年9月30日 0:15
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, Rex <Rex.Zhu at amd.com>
> Subject: [PATCH 5/6] drm/amd/pp: Fix memory leak on Si/CI/AI dgpu asics
> 
> On SI/CI/AI, driver still need to release smu's fw, it was not related to other
> hw ip's fw load_type.
> 
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 5008d2e..d3eaf5d 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -109,11 +109,11 @@ static int pp_sw_fini(void *handle)
> 
>  	hwmgr_sw_fini(hwmgr);
> 
> -	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) {
> -		release_firmware(adev->pm.fw);
> -		adev->pm.fw = NULL;
> +	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
>  		amdgpu_ucode_fini_bo(adev);
> -	}
> +
> +	release_firmware(adev->pm.fw);
> +	adev->pm.fw = NULL;
> 
>  	return 0;
>  }
> --
> 1.9.1
> 
> _______________________________________________
> 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