diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4058-drm-amd-display-Restore-should_update_pstate_support.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4058-drm-amd-display-Restore-should_update_pstate_support.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4058-drm-amd-display-Restore-should_update_pstate_support.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4058-drm-amd-display-Restore-should_update_pstate_support.patch new file mode 100644 index 00000000..a27a9f8e --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4058-drm-amd-display-Restore-should_update_pstate_support.patch @@ -0,0 +1,43 @@ +From 90651efcf8165390f653b4e74552d2dc705a26b0 Mon Sep 17 00:00:00 2001 +From: Joshua Aberback <joshua.aberback@amd.com> +Date: Thu, 12 Sep 2019 13:14:52 -0400 +Subject: [PATCH 4058/4256] 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> +--- + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h +index 213046de1675..7dd46eb96d67 100644 +--- a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h ++++ b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h +@@ -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( +-- +2.17.1 + |