Skip to contentSkip to conversation

drm/amd/display: Fix programming backlight on OLED panels

PATCH In review Mario Limonciello 2 participants 2 messages Nov 28, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix programming backlight on OLED panels

From: Mario Limonciello <[email protected]>

commit 38077562e0594 ("drm/amd/display: Implement new backlight_level_params structure") adjusted DC core to require the backlight type to be programmed in the dc link when changing brightness. This isn't initialized in amdgpu_dm for OLED panels though which broke brightness.

Explicitly initialize when aux support is enabled.

Reported-and-tested-by Luke Jones <[email protected]>
Fixes 38077562e059 ("drm/amd/display: Implement new backlight_level_params structure")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 19a58630e7740..243cee2841312 100644
@@ -3483,6 +3483,8 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 		caps->aux_support = false;
 	else if (amdgpu_backlight == 1)
 		caps->aux_support = true;
+	if (caps->aux_support)
+		aconnector->dc_link->backlight_control_type = BACKLIGHT_CONTROL_AMD_AUX;
 
 	luminance_range = &conn_base->display_info.luminance_range;
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Mario Limonciello

From: Mario Limonciello <[email protected]>

commit 38077562e0594 ("drm/amd/display: Implement new backlight_level_params structure") adjusted DC core to require the backlight type to be programmed in the dc link when changing brightness. This isn't initialized in amdgpu_dm for OLED panels though which broke brightness.

Quoted 6 lines

Explicitly initialize when aux support is enabled.

Reported-and-tested-by Luke Jones <[email protected]>
Fixes 38077562e059 ("drm/amd/display: Implement new backlight_level_params structure")

Harry

Quoted 17 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 19a58630e7740..243cee2841312 100644
@@ -3483,6 +3483,8 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 		caps->aux_support = false;
 	else if (amdgpu_backlight == 1)
 		caps->aux_support = true;
+	if (caps->aux_support)
+		aconnector->dc_link->backlight_control_type = BACKLIGHT_CONTROL_AMD_AUX;
 
 	luminance_range = &conn_base->display_info.luminance_range;