[PATCH] drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table

Quan, Evan Evan.Quan at amd.com
Fri Nov 8 03:29:51 UTC 2019


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, November 8, 2019 4:18 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH] drm/amdgpu/powerplay: fix AVFS handling with custom
> powerplay table
> 
> When a custom powerplay table is provided, we need to update the OD VDDC
> flag to avoid AVFS being enabled when it shouldn't be.
> 
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
> index 4ea63a2e17da..a4a7f8534966 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
> @@ -3689,6 +3689,13 @@ static int vega10_set_power_state_tasks(struct
> pp_hwmgr *hwmgr,
>  	PP_ASSERT_WITH_CODE(!result,
>  			"Failed to upload PPtable!", return result);
> 
> +	/*
> +	 * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC
> flag.
> +	 * That effectively disables AVFS feature.
> +	 */
> +	if(hwmgr->hardcode_pp_table != NULL)
> +		data->need_update_dpm_table |=
> DPMTABLE_OD_UPDATE_VDDC;
> +
>  	vega10_update_avfs(hwmgr);
> 
>  	/*
> --
> 2.23.0
> 
> _______________________________________________
> 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