]> www.infradead.org Git - users/hch/misc.git/commit
drm/amd/display: Set default brightness according to ACPI
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 7 Jun 2024 06:02:28 +0000 (01:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:17:11 +0000 (16:17 -0400)
commit2fe87f54abdc5c29bd2ebc301964926ea27b3d89
tree3e3b9f918c8c2e79ddad6aa7ff3662bafac4657f
parentee3942d9ab1f79637b260cefafe6a1ddfdd6ed00
drm/amd/display: Set default brightness according to ACPI

Currently, amdgpu will always set up the brightness at 100% when it
loads.  However this is jarring when the BIOS has it previously
programmed to a much lower value.

The ACPI ATIF method includes two members for "ac_level" and "dc_level".
These represent the default values that should be used if the system is
brought up in AC and DC respectively.

Use these values to set up the default brightness when the backlight
device is registered.

v2: squash in ACPI fix

Reviewed-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h