Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/amd/display: Restore guard against default backlight" failed to apply to 6.7-stable tree

PATCH [email protected] 1 participant 1 message Jan 27, 2024

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.7-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.7.y
git checkout FETCH_HEAD
git cherry-pick -x a2020be69490ee8778c59a02e7b270dfeecffbd4
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024012714-quaintly-zoom-035c@gregkh' --subject-prefix 'PATCH 6.7.y' HEAD^..

Possible dependencies:

a2020be69490 ("drm/amd/display: Restore guard against default backlight value < 1 nit") 43b8ac4b34ec ("drm/amd/display: Simplify brightness initialization")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a2020be69490ee8778c59a02e7b270dfeecffbd4 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Wed, 6 Dec 2023 12:08:26 -0600
Subject: [PATCH] drm/amd/display: Restore guard against default backlight
value < 1 nit

Mark reports that brightness is not restored after Xorg dpms screen blank.

This behavior was introduced by commit d9e865826c20 ("drm/amd/display:
Simplify brightness initialization") which dropped the cached backlight value in display code, but also removed code for when the default value read back was less than 1 nit.

Restore this code so that the backlight brightness is restored to the correct default value in this circumstance.

Cc Camille Cho <[email protected]>
Cc Krunoslav Kovac <[email protected]>
Cc Hamza Mahfooz <[email protected]>
Fixes d9e865826c20 ("drm/amd/display: Simplify brightness initialization")
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +2 -2
index ac0fa88b52a0..bf53a86ea817 100644
@@ -287,8 +287,8 @@ bool set_default_brightness_aux(struct dc_link *link)
 	if (link && link->dpcd_sink_ext_caps.bits.oled == 1) {
 		if (!read_default_bl_aux(link, &default_backlight))
 			default_backlight = 150000;
-		// if > 5000, it might be wrong readback
-		if (default_backlight > 5000000)
+		// if < 1 nits or > 5000, it might be wrong readback
+		if (default_backlight < 1000 || default_backlight > 5000000)
 			default_backlight = 150000;
 
 		return edp_set_backlight_level_nits(link, true,