]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Export full brightness range to userspace
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 29 May 2025 14:46:32 +0000 (09:46 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Jun 2025 17:08:18 +0000 (13:08 -0400)
commit16dc8bc27c2aa3c93905d3e885e27f1e3535f09a
tree4458bf14f0b822994d060553cef6c9cb527a593a
parentffcaed1d7ecef31198000dfbbea791f30f7ca437
drm/amd/display: Export full brightness range to userspace

[WHY]
Userspace currently is offered a range from 0-0xFF but the PWM is
programmed from 0-0xFFFF.  This can be limiting to some software
that wants to apply greater granularity.

[HOW]
Convert internally to firmware values only when mapping custom
brightness curves because these are in 0-0xFF range. Advertise full
PWM range to userspace.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8dbd72cb790058ce52279af38a43c2b302fdd3e5)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c