Skip to contentSkip to conversation

drm/amd/display: Use linear backlight curve in power module

PATCH Superseded Matthew Schwartz 1 participant 1 message Sep 16

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

PATCH 1/2 drm/amd/display: Use linear backlight curve in power module

amdgpu_dm already applies the ATIF custom brightness curve in convert_custom_brightness() before handing the level to the power module. The power module then builds its own percent to PWM LUT from the same ATIF data in initialize_backlight_caps() and applies the curve a second time. On the Lenovo Legion Go S this maps the bottom 40% of the brightness range to under 12% PWM, where the panel no longer visibly changes.

Tell the power module to use its linear curve so the PWM is a straight rescale of the level DM computed, matching the behavior before the power module took over backlight programming.

Fixes 3c108046e1d6 ("drm/amd/display: Add power module on Linux")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index ca795cda8084..63acefc0acfb 100644
@@ -455,7 +455,7 @@ STATIC_IFN_KUNIT int amdgpu_dm_init_power_module(struct amdgpu_display_manager *
 			!(amdgpu_dc_feature_mask & DC_DISABLE_FRACTIONAL_PWM_MASK);
 		init_data[i].use_custom_backlight_caps = false;
 		init_data[i].custom_backlight_caps_config_no = 0;
-		init_data[i].use_linear_backlight_curve = false;
+		init_data[i].use_linear_backlight_curve = true;
 		init_data[i].def_varibright_enable = 0;
 		init_data[i].varibright_level = 0;
 		/*
Signature · 1 line
2.55.0