drm/amd/powerplay: initialize uvd/vce powergate status v2
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: initialize uvd/vce powergate status v2
On UVD/VCE dpm disabled, the powergate status should be set as true. So that we will not try to gate them(enable dpm for now).
v2: added check for uvd/vce powergate status before gating
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +23 -0
@@ -777,6 +777,21 @@ static int vega12_set_allowed_featuresmask(struct pp_hwmgr *hwmgr)return 0 ; } +static void vega12_init_powergate_state (struct pp_hwmgr *hwmgr) +{ +struct vega12_hwmgr *data = + (struct vega12_hwmgr *)(hwmgr->backend); + + data->uvd_power_gated = true; + data->vce_power_gated = true; + +if (data->smu_features[GNLD_DPM_UVD ].enabled) + data->uvd_power_gated = false; + +if (data->smu_features[GNLD_DPM_VCE ].enabled) + data->vce_power_gated = false; +} +static int vega12_enable_all_smu_features (struct pp_hwmgr *hwmgr) { struct vega12_hwmgr *data =
@@ -801,6 +816,8 @@ static int vega12_enable_all_smu_features(struct pp_hwmgr *hwmgr) } } +vega12_init_powergate_state (hwmgr); +return 0 ; }
@@ -1985,6 +2002,9 @@ static void vega12_power_gate_vce(struct pp_hwmgr *hwmgr, bool bgate) {struct vega12_hwmgr *data = (struct vega12_hwmgr *)(hwmgr->backend); +if (data->vce_power_gated == bgate) +return 0 ; + data->vce_power_gated = bgate;vega12_enable_disable_vce_dpm (hwmgr, !bgate); }
@@ -1993,6 +2013,9 @@ static void vega12_power_gate_uvd(struct pp_hwmgr *hwmgr, bool bgate) {struct vega12_hwmgr *data = (struct vega12_hwmgr *)(hwmgr->backend); +if (data->uvd_power_gated == bgate) +return 0 ; + data->uvd_power_gated = bgate;vega12_enable_disable_uvd_dpm (hwmgr, !bgate); }
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1529474919-8491-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org
PATCH 1/2 drm/amd/powerplay: correct smc display config for multi monitor
Need to take into account multi-head with synced displays.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2 -1
@@ -1401,7 +1401,8 @@ static int vega12_notify_smc_display_config_after_ps_adjustment(struct pp_display_clock_request clock_req;uint32_t clk_request; -if (hwmgr->display_config->num_display >1 ) +if ((hwmgr->display_config->num_display >1 ) && + !hwmgr->display_config->multi_monitor_in_sync)vega12_notify_smc_display_change (hwmgr, false);else vega12_notify_smc_display_change (hwmgr, true);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amd/powerplay: drop unnecessary uclk hard min setting
In reply to a message not in the archiveWe don't need to set uclk hard min here because this will be set with other clocks on power state change.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0 -10
@@ -1399,7 +1399,6 @@ static int vega12_notify_smc_display_config_after_ps_adjustment( (struct vega12_hwmgr *)(hwmgr->backend);struct PP_Clocks min_clocks = {0 };struct pp_display_clock_request clock_req; -uint32_t clk_request;if ((hwmgr->display_config->num_display >1 ) && !hwmgr->display_config->multi_monitor_in_sync)
@@ -1427,15 +1426,6 @@ static int vega12_notify_smc_display_config_after_ps_adjustment( } } -if (data->smu_features[GNLD_DPM_UCLK ].enabled) { - clk_request = (PPCLK_UCLK <<16 ) | (min_clocks.memoryClock) /100 ; -PP_ASSERT_WITH_CODE ( -smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetHardMinByFreq, clk_request) ==0 , -"[PhwVega12_NotifySMCDisplayConfigAfterPowerStateAdjustment] Attempt to set UCLK HardMin Failed!" , - return -1 ); - data->dpm_table.mem_table.dpm_state.hard_min_level = min_clocks.memoryClock; - } -return 0 ; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 1 line
that we will not try to gate them(enable dpm for now).
Sorry, there seems a typo in the description(enable -> disable). I will send out another patch with this typo addressed.
Regards,
Evan
Quoted 77 lines
-----Original Message-----
From: Evan Quan [mailto:[email protected]]
Sent: Wednesday, June 20, 2018 2:09 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/powerplay: initialize uvd/vce powergate status v2On UVD/VCE dpm disabled, the powergate status should be set as true. So that we will not try to gate them(enable dpm for now).
v2: added check for uvd/vce powergate status before gating
Change-Id I569a5aa216b5e7d64a2b504f2ff98cc83ca802d5Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +20
-0@@ -777,6 +777,21 @@ static int vega12_set_allowed_featuresmask(struct pp_hwmgr *hwmgr)return 0 ; } +static void vega12_init_powergate_state (struct pp_hwmgr *hwmgr) { +struct vega12_hwmgr *data = + (struct vega12_hwmgr *)(hwmgr->backend); + + data->uvd_power_gated = true; + data->vce_power_gated = true; + +if (data->smu_features[GNLD_DPM_UVD ].enabled) + data->uvd_power_gated = false; + +if (data->smu_features[GNLD_DPM_VCE ].enabled) + data->vce_power_gated = false; +} +static int vega12_enable_all_smu_features (struct pp_hwmgr *hwmgr) { struct vega12_hwmgr *data =@@ -801,6 +816,8 @@ static int vega12_enable_all_smu_features(struct pp_hwmgr *hwmgr) } } +vega12_init_powergate_state (hwmgr); +return 0 ; }@@ -1985,6 +2002,9 @@ static void vega12_power_gate_vce(struct pp_hwmgr *hwmgr, bool bgate) {struct vega12_hwmgr *data = (struct vega12_hwmgr *)(hwmgr- >backend); +if (data->vce_power_gated == bgate) +return 0 ; + data->vce_power_gated = bgate; vega12_enable_disable_vce_dpm(hwmgr, !bgate); } @@ -1993,6 +2013,9 @@ static void vega12_power_gate_uvd(struct pp_hwmgr *hwmgr,bool bgate) {
structvega12_hwmgr*data = (structvega12_hwmgr*)(hwmgr-Quoted 1 line
backend);
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +3
-1+if (data->uvd_power_gated == bgate) +return 0 ; + data->uvd_power_gated = bgate;vega12_enable_disable_uvd_dpm (hwmgr, !bgate); } --
Quoted 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx