[PATCH] drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend
Liu, Zhan
Zhan.Liu at amd.com
Fri Mar 26 21:24:34 UTC 2021
[AMD Public Use]
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: 2021/March/26, Friday 4:58 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH] drm/amdgpu/vangogh: don't check for dpm in
> is_dpm_running when in suspend
>
> Do the same thing we do for Renoir. We can check, but since the sbios has
> started DPM, it will always return true which causes the driver to skip some
> of the SMU init when it shouldn't.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Zhan Liu <zhan.liu at amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 2f502fec67d5..ed11e0ab8299 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -384,10 +384,15 @@ static int vangogh_dpm_set_jpeg_enable(struct
> smu_context *smu, bool enable)
>
> static bool vangogh_is_dpm_running(struct smu_context *smu) {
> +struct amdgpu_device *adev = smu->adev;
> int ret = 0;
> uint32_t feature_mask[2];
> uint64_t feature_enabled;
>
> +/* we need to re-init after suspend so return false */
> +if (adev->in_suspend)
> +return false;
> +
> ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2);
>
> if (ret)
> --
> 2.30.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
More information about the amd-gfx
mailing list