[PATCH] drm/amdgpu/powerplay: return success if set_mp1_state is not set
Quan, Evan
Evan.Quan at amd.com
Wed Jul 31 03:48:58 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: Wednesday, July 31, 2019 10:31 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH] drm/amdgpu/powerplay: return success if set_mp1_state
> is not set
>
> Some asics (APUs) don't have this callback so we want to return success.
> Avoids spurious error messages on APUs.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 88a2ef75b7e1..2e3d9ef625bf 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -931,12 +931,10 @@ static int pp_dpm_set_mp1_state(void *handle,
> enum pp_mp1_state mp1_state)
> if (!hwmgr || !hwmgr->pm_en)
> return -EINVAL;
>
> - if (hwmgr->hwmgr_func->set_mp1_state == NULL) {
> - pr_info_ratelimited("%s was not implemented.\n",
> __func__);
> - return -EINVAL;
> - }
> + if (hwmgr->hwmgr_func->set_mp1_state)
> + return hwmgr->hwmgr_func->set_mp1_state(hwmgr,
> mp1_state);
>
> - return hwmgr->hwmgr_func->set_mp1_state(hwmgr, mp1_state);
> + return 0;
> }
>
> static int pp_dpm_switch_power_profile(void *handle,
> --
> 2.20.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