]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: fix default brightness
authorMario Limonciello <mario.limonciello@amd.com>
Sun, 23 Feb 2025 05:37:32 +0000 (23:37 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Mar 2025 17:26:29 +0000 (13:26 -0400)
commit0747acf3311229e22009bec4a9e7fc30c879e842
tree5a00d092960bef0016f5b51e7c683772b057b085
parentd93b92c976671bf3352ad808c3783d37f62e9a0a
drm/amd/display: fix default brightness

[Why]
To avoid flickering during boot default brightness level set by BIOS
should be maintained for as much of the boot as feasible.
commit 2fe87f54abdc ("drm/amd/display: Set default brightness according
to ACPI") attempted to set the right levels for AC vs DC, but brightness
still got reset to maximum level in initialization code for
setup_backlight_device().

[How]
Remove the hardcoded initialization in setup_backlight_device() and
instead program brightness value to match BIOS (AC or DC).  This avoids a
brightness flicker from kernel changing the value.  Userspace may however
still change it during boot.

Fixes: 2fe87f54abdc ("drm/amd/display: Set default brightness according to ACPI")
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c