mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Test backlight caps validation
[WHAT] The sanity check applied to the backlight caps reported by the firmware sits inside a CONFIG_ACPI block. The UML KUnit build cannot enable CONFIG_ACPI, so that logic is never built and stays uncovered. [HOW] Move the check into amdgpu_dm_validate_backlight_caps() and build it whenever CONFIG_ACPI or the KUnit tests are enabled. Behaviour of amdgpu_dm_update_backlight_caps() is unchanged. Add a parameterized test for amdgpu_dm_validate_backlight_caps() covering sane caps, a max above the 8-bit range, a negative min and a spread narrower than AMDGPU_DM_MIN_SPREAD. Assisted-by: Copilot:Claude-Opus-5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
86b6d8b281
commit
4c812f0d8c
3 changed files with 66 additions and 12 deletions
Loading…
Add table
Add a link
Reference in a new issue