| From: |
| Mario Limonciello <mario.limonciello-AT-amd.com> |
| To: |
| <dri-devel-AT-lists.freedesktop.org> |
| Subject: |
| [PATCH v3 0/8] Add support for a DRM backlight capability |
| Date: |
| Fri, 24 Apr 2026 17:09:45 -0500 |
| Message-ID: |
| <20260424220953.167058-1-mario.limonciello@amd.com> |
| Cc: |
| <harry.wentland-AT-amd.com>, Xaver Hugl <xaver.hugl-AT-gmail.com>, <amd-gfx-AT-lists.freedesktop.org>, Mario Limonciello <superm1-AT-kernel.org> |
| Archive-link: |
| Article |
From: Mario Limonciello (AMD) <superm1@kernel.org>
At Display Next Hackfest 2025 we discussed the renewed need for moving
brightness control into the DRM connector properties. I've taken the
previous efforts from David and Marta, rebased and adjusted for the
current kernel.
The legacy sysfs interface is synchronized with the DRM connector (although
the scale may be different as DRM connector property is u16).
Later after this has been adopted by enough userspace, it may make sense to
configure the legacy sysfs interface to be configurable so that only
DRM master controls backlight.
I've done a first implementation with amdgpu with eDP connectors; but
conceivably this can be extended to other connectors like DP for displays
that can be controlled via DDC as well later.
I have also used DRM review prompts to review this series and fix some bugs
which were caught with two different Claude models. The fixes are squashed
into the patches.
Assisted-by: Claude Opus
Assisted-by: Claude Sonnet
For ease of testing; this series is also available on this branch:
https://git.kernel.org/pub/scm/linux/kernel/git/superm1/l...
David Rheinsberg (1):
backlight: add kernel-internal backlight API
Mario Limonciello (6):
drm: link connectors to backlight devices
DRM: Add support for client and driver indicating support for
luminance
drm/amd/display: Pass up errors reading actual brightness
drm/amd: Indicate driver supports luminance
drm/amd/display: Allow backlight registration to fail
drm/amd/display: use drm backlight
Marta Lofstedt (1):
backlight: expose the current brightness in the new kernel API
drivers/gpu/drm/Kconfig | 1 +
drivers/gpu/drm/Makefile | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 88 +++-
drivers/gpu/drm/drm_atomic_uapi.c | 24 ++
drivers/gpu/drm/drm_backlight.c | 406 ++++++++++++++++++
drivers/gpu/drm/drm_connector.c | 12 +
drivers/gpu/drm/drm_drv.c | 8 +
drivers/gpu/drm/drm_ioctl.c | 10 +
drivers/gpu/drm/drm_mode_config.c | 7 +
drivers/gpu/drm/drm_mode_object.c | 66 ++-
drivers/gpu/drm/drm_sysfs.c | 54 +++
drivers/video/backlight/backlight.c | 83 ++++
include/drm/drm_backlight.h | 45 ++
include/drm/drm_connector.h | 8 +
include/drm/drm_drv.h | 7 +
include/drm/drm_file.h | 8 +
include/drm/drm_mode_config.h | 5 +
include/linux/backlight.h | 30 ++
include/uapi/drm/drm.h | 10 +
20 files changed, 852 insertions(+), 23 deletions(-)
create mode 100644 drivers/gpu/drm/drm_backlight.c
create mode 100644 include/drm/drm_backlight.h
--
2.53.0