Revert "drm/amd/display: Fix backlight max_brightness to match exported range"
Alex Deucher
maintainerPATCH 1/1 Revert "drm/amd/display: Fix backlight max_brightness to match exported range"
This reverts commit 1191285ecb4233e5bf907da7e9394d7999055566.
This patch is apparently missing a dependency from 7.2 as users have not reported any regressions with 7.2-rc, but there are regressions on 7.1.
The regression manifests as inconsistent lower brightness at the top end (e.g., around 98%).
Signed-off-by Alex Deucher <[email protected]>
Cc Thorsten Leemhuis <[email protected]>
Cc Sergio Callegari <[email protected]>
Cc Mario Limonciello <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -5401,11 +5401,11 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector) caps = &dm->backlight_caps[aconnector->bl_idx];if (get_brightness_range (caps, &min, &max)) {if (power_supply_is_system_supplied () >0 ) - props.brightness =DIV_ROUND_CLOSEST (max * caps->ac_level,100 ); + props.brightness =DIV_ROUND_CLOSEST ((max - min) * caps->ac_level,100 );else - props.brightness =DIV_ROUND_CLOSEST (max * caps->dc_level,100 ); + props.brightness =DIV_ROUND_CLOSEST ((max - min) * caps->dc_level,100 );/* min is zero, so max needs to be adjusted */ - props.max_brightness = max; + props.max_brightness = max - min;drm_dbg (drm,"Backlight caps: min: %d, max: %d, ac %d, dc %d\n" , min, max, caps->ac_level, caps->dc_level); }else
Signature · 1 line
2.55.0
Quoted 4 lines
This reverts commit
1191285ecb4233e5bf907da7e9394d7999055566.This patch is apparently missing a dependency from 7.2 as users have not reported any regressions with 7.2-rc, but there are regressions on 7.1.
Queued for 7.1 and 6.18, thanks.
Signature · 2 lines
Thanks, Sasha