]> 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 16:19:17 +0000 (12:19 -0400)
commit8dbd72cb790058ce52279af38a43c2b302fdd3e5
tree9a2bac366f857cfb67ccbd43f29cd9f72c68d41f
parent148144f6d2f14b02eaaa39b86bbe023cbff350bd
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c