mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
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: Joshua Aberback <joshua.aberback@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f537d474df
commit
62f3abd153
|
|
@ -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)
|
||||
{
|
||||
// Whenever we are transitioning pstate support, we always want to notify prior to committing state
|
||||
return (calc_support != cur_support) ? !safe_to_lower : false;
|
||||
if (cur_support != calc_support) {
|
||||
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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user