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: Add KUnit tests for amdgpu_dm_backlight
Add KUnit tests for the backlight helpers in amdgpu_dm_backlight.c. Tests cover: - amdgpu_dm_update_backlight_caps(): short-circuit on populated caps and default value assignment - get_brightness_range(): NULL, PWM-only, and AUX backlight paths - convert_brightness_to_user(): minimum clamp, maximum passthrough, and mid-range rescaling - convert_brightness_from_user(): linear rescaling, AUX path, and custom-curve mapping - convert_custom_brightness(): exact match, below-first, interpolation, above-last, single data point, zero lower luminance, and the debug-mask and no-data-point guards - amdgpu_dm_update_connector_ext_caps(): negative bl_idx and non-eDP early returns, OLED defaults, luminance range copy, and the amdgpu_backlight force-AUX/force-PWM overrides - amdgpu_dm_should_create_sysfs(): forced ABM, non-eDP, missing backlight index, and AUX vs PWM backlight - amdgpu_dm_setup_backlight_device(): non-eDP/LVDS skip, disconnected link skip, eDP-count limit, and the successful eDP setup path Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c26b643aa3
commit
179b22085e
4 changed files with 1210 additions and 9 deletions
Loading…
Add table
Add a link
Reference in a new issue