[PATCH 3/3] drm/amdgpu/powerplay: fix baco check for vega20

Quan, Evan Evan.Quan at amd.com
Mon Feb 10 02:58:05 UTC 2020


Thanks for the fixes. The series is reviewed-by: Evan Quan <evan.quan at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Friday, February 7, 2020 11:19 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH 3/3] drm/amdgpu/powerplay: fix baco check for vega20
> 
> We need to handle the runpm case as well as GPU reset.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> index 3b3ec5666051..08b6ba39a6d7 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> @@ -487,15 +487,16 @@ static int vega20_setup_asic_task(struct pp_hwmgr
> *hwmgr)  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr-
> >adev);
>  	int ret = 0;
> +	bool use_baco = (adev->in_gpu_reset &&
> +			 (amdgpu_asic_reset_method(adev) ==
> AMD_RESET_METHOD_BACO)) ||
> +		(adev->in_runpm && amdgpu_asic_supports_baco(adev));
> 
>  	ret = vega20_init_sclk_threshold(hwmgr);
>  	PP_ASSERT_WITH_CODE(!ret,
>  			"Failed to init sclk threshold!",
>  			return ret);
> 
> -	if (adev->in_gpu_reset &&
> -	    (amdgpu_asic_reset_method(adev) ==
> AMD_RESET_METHOD_BACO)) {
> -
> +	if (use_baco) {
>  		ret = vega20_baco_apply_vdci_flush_workaround(hwmgr);
>  		if (ret)
>  			pr_err("Failed to apply vega20 baco workaround!\n");
> --
> 2.24.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
> freedesktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&data=02%7C01%7Cevan.quan%40amd.com%7C781e5f8feb044301f
> 50408d7abe11d18%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6
> 37166855729019493&sdata=L8aUO%2F8ut25Yf7zVSfMDE207bcyYnYi2hd
> 7ANXL6vEk%3D&reserved=0


More information about the amd-gfx mailing list