Commit 62f3abd1 authored by Joshua Aberback's avatar Joshua Aberback Committed by Alex Deucher

drm/amd/display: Restore should_update_pstate_support after bad revert

[Why]
This function was mistakenly reverted as part of a legitimate revert. The
old version that was reverted to has bad logic, and is causing situations
where p-state change support is being toggled when it shouldn't be,
resulting in hangs.
Signed-off-by: default avatarJoshua Aberback <joshua.aberback@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f537d474
...@@ -281,8 +281,14 @@ static inline bool should_set_clock(bool safe_to_lower, int calc_clk, int cur_cl ...@@ -281,8 +281,14 @@ static inline bool should_set_clock(bool safe_to_lower, int calc_clk, int cur_cl
static inline bool should_update_pstate_support(bool safe_to_lower, bool calc_support, bool cur_support) static inline bool should_update_pstate_support(bool safe_to_lower, bool calc_support, bool cur_support)
{ {
// Whenever we are transitioning pstate support, we always want to notify prior to committing state if (cur_support != calc_support) {
return (calc_support != cur_support) ? !safe_to_lower : false; if (calc_support == true && safe_to_lower)
return true;
else if (calc_support == false && !safe_to_lower)
return true;
}
return false;
} }
int clk_mgr_helper_get_active_display_cnt( int clk_mgr_helper_get_active_display_cnt(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment