drm/amd/pp: Restore power profile mode in auto dpm level on Vega10
Subsystems (2)
PATCH 1/1 drm/amd/pp: Restore power profile mode in auto dpm level on Vega10
As auto power profile mode still not support on vega10, so just restore default profile mode in auto dpm level.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +++++++--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +7 -3
@@ -761,6 +761,7 @@ static int vega10_hwmgr_backend_init(struct pp_hwmgr *hwmgr) hwmgr->backend = data; hwmgr->power_profile_mode =PP_SMC_POWER_PROFILE_VIDEO ; + hwmgr->default_power_profile_mode =PP_SMC_POWER_PROFILE_VIDEO ;vega10_set_default_registry_data (hwmgr);
@@ -4228,6 +4229,11 @@ static int vega10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,break ;case AMD_DPM_FORCED_LEVEL_AUTO : ret =vega10_unforce_dpm_levels (hwmgr); +if (hwmgr->default_power_profile_mode != hwmgr->power_profile_mode) { +smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetWorkloadMask, +1 << hwmgr->default_power_profile_mode); + hwmgr->power_profile_mode = hwmgr->default_power_profile_mode; + }break ;case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD :case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK :
@@ -4251,6 +4257,7 @@ static int vega10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,else if (level !=AMD_DPM_FORCED_LEVEL_PROFILE_PEAK && hwmgr->dpm_level ==AMD_DPM_FORCED_LEVEL_PROFILE_PEAK )vega10_set_fan_control_mode (hwmgr,AMD_FAN_CTRL_AUTO ); } +return ret; }
@@ -5068,9 +5075,6 @@ static int vega10_set_power_profile_mode(struct pp_hwmgr *hwmgr, long *input, uiuint8_t use_rlc_busy;uint8_t min_active_level; -if (input[size] ==PP_SMC_POWER_PROFILE_AUTO ) -return 0 ;/* TO DO auto wattman feature not enabled */ - hwmgr->power_profile_mode = input[size]; smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_SetWorkloadMask,
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
@@ -758,6 +758,7 @@ struct pp_hwmgr {enum amd_pp_profile_type current_power_profile;bool en_umd_pstate;uint32_t power_profile_mode; +uint32_t default_power_profile_mode;uint32_t pstate_sclk;uint32_t pstate_mclk;bool od_enabled;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1517563063-5610-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Friday, February 2, 2018 4:17 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/pp: Restore power profile mode in auto dpm level on Vega10
As auto power profile mode still not support on vega10, so just restore default profile mode in auto dpm level.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +++++++--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +7 -3
@@ -761,6 +761,7 @@ static int vega10_hwmgr_backend_init(struct pp_hwmgr *hwmgr) hwmgr->backend = data; hwmgr->power_profile_mode =PP_SMC_POWER_PROFILE_VIDEO ; + hwmgr->default_power_profile_mode =PP_SMC_POWER_PROFILE_VIDEO ;vega10_set_default_registry_data (hwmgr);
@@ -4228,6 +4229,11 @@ static int vega10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,break ;case AMD_DPM_FORCED_LEVEL_AUTO : ret =vega10_unforce_dpm_levels (hwmgr); +if (hwmgr->default_power_profile_mode != hwmgr->power_profile_mode) { +smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetWorkloadMask, +1 << hwmgr->default_power_profile_mode); + hwmgr->power_profile_mode = hwmgr->default_power_profile_mode; + }break ;case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD :case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK :
@@ -4251,6 +4257,7 @@ static int vega10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,else if (level !=AMD_DPM_FORCED_LEVEL_PROFILE_PEAK && hwmgr->dpm_level ==AMD_DPM_FORCED_LEVEL_PROFILE_PEAK )vega10_set_fan_control_mode (hwmgr,AMD_FAN_CTRL_AUTO ); } +return ret; }
@@ -5068,9 +5075,6 @@ static int vega10_set_power_profile_mode(struct pp_hwmgr *hwmgr, long *input, uiuint8_t use_rlc_busy;uint8_t min_active_level; -if (input[size] ==PP_SMC_POWER_PROFILE_AUTO ) -return 0 ;/* TO DO auto wattman feature not enabled */ - hwmgr->power_profile_mode = input[size]; smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_SetWorkloadMask,
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
@@ -758,6 +758,7 @@ struct pp_hwmgr {enum amd_pp_profile_type current_power_profile;bool en_umd_pstate;uint32_t power_profile_mode; +uint32_t default_power_profile_mode;uint32_t pstate_sclk;uint32_t pstate_mclk;bool od_enabled;
--
1.9.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx