]> git.dujemihanovic.xyz Git - linux.git/commit
drm/amd/display: Validate backlight caps are sane
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 13 Sep 2024 18:00:39 +0000 (13:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Sep 2024 20:15:08 +0000 (16:15 -0400)
commit327e62f47eb57ae5ff63de82b0815557104e439a
treec28820f60b4c9afebc5c32c69b35853c3c7bac0d
parentb74571a83fd3e50f804f090aae60c864d458187c
drm/amd/display: Validate backlight caps are sane

Currently amdgpu takes backlight caps provided by the ACPI tables
on systems as is.  If the firmware sets maximums that are too low
this means that users don't get a good experience.

To avoid having to maintain a quirk list of such systems, do a sanity
check on the values.  Check that the spread is at least half of the
values that amdgpu would use if no ACPI table was found and if not
use the amdgpu defaults.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3020
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c