drm/amd/powerplay: use PP_CAP macro for disable_mclk_switching_for_frame_lock
Subsystems (2)
PATCH 1/5 drm/amd/powerplay: use PP_CAP macro for disable_mclk_switching_for_frame_lock
Rather than open coding it.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +4 -4
@@ -3165,10 +3165,10 @@ static int vega10_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, minimum_clocks.memoryClock = stable_pstate_mclk; } - disable_mclk_switching_for_frame_lock =phm_cap_enabled ( - hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_DisableMclkSwitchingForFrameLock); - disable_mclk_switching_for_vr =PP_CAP (PHM_PlatformCaps_DisableMclkSwitchForVR); + disable_mclk_switching_for_frame_lock = +PP_CAP (PHM_PlatformCaps_DisableMclkSwitchingForFrameLock); + disable_mclk_switching_for_vr = +PP_CAP (PHM_PlatformCaps_DisableMclkSwitchForVR); force_mclk_high =PP_CAP (PHM_PlatformCaps_ForceMclkHigh); disable_mclk_switching = (info.display_count > 1) ||
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180213194637.23389-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/5 drm/amd/powerplay/vega10: allow mclk switching with no displays
If there are no displays attached, there is no reason to disable mclk switching.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +7 -4
@@ -3171,10 +3171,13 @@ static int vega10_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,PP_CAP (PHM_PlatformCaps_DisableMclkSwitchForVR); force_mclk_high =PP_CAP (PHM_PlatformCaps_ForceMclkHigh); - disable_mclk_switching = (info.display_count >1 ) || - disable_mclk_switching_for_frame_lock || - disable_mclk_switching_for_vr || - force_mclk_high; +if (info.display_count ==0 ) + disable_mclk_switching = false; +else + disable_mclk_switching = (info.display_count >1 ) || + disable_mclk_switching_for_frame_lock || + disable_mclk_switching_for_vr || + force_mclk_high; sclk = vega10_ps->performance_levels[0 ].gfx_clock; mclk = vega10_ps->performance_levels[0 ].mem_clock;
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amd/powerplay/smu7: allow mclk switching with no displays
In reply to a message not in the archiveIf there are no displays attached, there is no reason to disable mclk switching.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +7 -4
@@ -2904,10 +2904,13 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, PHM_PlatformCaps_DisableMclkSwitchingForFrameLock); - disable_mclk_switching = ((1 < info.display_count) || - disable_mclk_switching_for_frame_lock || -smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us) || - (mode_info.refresh_rate >120 )); +if (info.display_count ==0 ) + disable_mclk_switching = false; +else + disable_mclk_switching = ((1 < info.display_count) || + disable_mclk_switching_for_frame_lock || +smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us) || + (mode_info.refresh_rate >120 )); sclk = smu7_ps->performance_levels[0 ].engine_clock; mclk = smu7_ps->performance_levels[0 ].memory_clock;
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amdgpu/cgs: add refresh rate checking to non-DC display code
In reply to a message not in the archiveClamp the vblank period to 0 if the refresh rate is larger than 120 hz for non-DC. This allows us to remove the refresh rate checks from powerplay for mclk switching.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +5 -0
@@ -953,6 +953,11 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device, (amdgpu_crtc->v_border *2 ); mode_info->vblank_time_us = vblank_lines * line_time_us; mode_info->refresh_rate =drm_mode_vrefresh (&amdgpu_crtc->hw_mode); +/* we have issues with mclk switching with refresh rates +* over 120 hz on the non-DC code. +*/ +if (mode_info->refresh_rate >120 ) + mode_info->vblank_time_us =0 ; mode_info =NULL ; } }
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amdgpu/powerplay/smu7: drop refresh rate checks for mclk switching
In reply to a message not in the archiveThe logic has moved to cgs. mclk switching with DC at higher refresh rates should work.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
@@ -2909,8 +2909,7 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,else disable_mclk_switching = ((1 < info.display_count) || disable_mclk_switching_for_frame_lock || -smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us) || - (mode_info.refresh_rate >120 )); +smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us)); sclk = smu7_ps->performance_levels[0 ].engine_clock; mclk = smu7_ps->performance_levels[0 ].memory_clock;
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180213194637.23389-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 5/5] drm/amdgpu/powerplay/smu7: drop refresh rate checks for mclk switching
The series: Reviewed-by: Eric Huang <[email protected]>
Quoted 14 lines · Alex Deucher
The logic has moved to cgs. mclk switching with DC at higher refresh rates should work.
Signed-off-by Alex Deucher <[email protected]>Cc Harry Wentland <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-0
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, · line 2915
Quoted 9 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1
-2@@ -2909,8 +2909,7 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,else disable_mclk_switching = ((1 < info.display_count) || disable_mclk_switching_for_frame_lock || -smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us) || - (mode_info.refresh_rate >120 )); +smu7_vblank_too_short (hwmgr, mode_info.vblank_time_us)); sclk = smu7_ps->performance_levels[0 ].engine_clock; mclk = smu7_ps->performance_levels[0 ].memory_clock;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx