From: Greg Kroah-Hartman Date: Mon, 24 Mar 2025 18:51:15 +0000 (-0700) Subject: 6.1-stable patches X-Git-Tag: v6.1.132~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=810faa8526221477237d7fa8fb3aca9052dedf85;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: drm-amd-display-use-hw-lock-mgr-for-psr1-when-only-one-edp.patch --- diff --git a/queue-6.1/drm-amd-display-use-hw-lock-mgr-for-psr1-when-only-one-edp.patch b/queue-6.1/drm-amd-display-use-hw-lock-mgr-for-psr1-when-only-one-edp.patch new file mode 100644 index 0000000000..5690fddcf2 --- /dev/null +++ b/queue-6.1/drm-amd-display-use-hw-lock-mgr-for-psr1-when-only-one-edp.patch @@ -0,0 +1,57 @@ +From acbf16a6ae775b4db86f537448cc466288aa307e Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Fri, 7 Mar 2025 15:55:20 -0600 +Subject: drm/amd/display: Use HW lock mgr for PSR1 when only one eDP + +From: Mario Limonciello + +commit acbf16a6ae775b4db86f537448cc466288aa307e upstream. + +[WHY] +DMUB locking is important to make sure that registers aren't accessed +while in PSR. Previously it was enabled but caused a deadlock in +situations with multiple eDP panels. + +[HOW] +Detect if multiple eDP panels are in use to decide whether to use +lock. Refactor the function so that the first check is for PSR-SU +and then replay is in use to prevent having to look up number +of eDP panels for those configurations. + +Fixes: f245b400a223 ("Revert "drm/amd/display: Use HW lock mgr for PSR1"") +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3965 +Reviewed-by: ChiaHsuan Chung +Signed-off-by: Mario Limonciello +Signed-off-by: Alex Hung +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +(cherry picked from commit ed569e1279a3045d6b974226c814e071fa0193a6) +Cc: stable@vger.kernel.org +[superm1: Adjust for missing replay support bfeefe6ea5f1, + Adjust for dc_get_edp_links not being renamed from get_edp_links()] +Signed-off-by: Mario Limonciello +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c ++++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +@@ -67,5 +67,17 @@ bool should_use_dmub_lock(struct dc_link + { + if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1) + return true; ++ ++ /* only use HW lock for PSR1 on single eDP */ ++ if (link->psr_settings.psr_version == DC_PSR_VERSION_1) { ++ struct dc_link *edp_links[MAX_NUM_EDP]; ++ int edp_num; ++ ++ get_edp_links(link->dc, edp_links, &edp_num); ++ ++ if (edp_num == 1) ++ return true; ++ } ++ + return false; + } diff --git a/queue-6.1/series b/queue-6.1/series index 5af33c095b..aae2adae5c 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -188,3 +188,4 @@ soc-qcom-pdr-fix-the-potential-deadlock.patch drm-radeon-fix-uninitialized-size-issue-in-radeon_vce_cs_parse.patch drm-amdgpu-fix-jpeg-video-caps-max-size-for-navi1x-and-raven.patch ksmbd-fix-incorrect-validation-for-num_aces-field-of-smb_acl.patch +drm-amd-display-use-hw-lock-mgr-for-psr1-when-only-one-edp.patch