From: Mario Limonciello <mario.limonciello@amd.com>
To: dri-devel@lists.freedesktop.org, harry.wentland@amd.com,
Simona Vetter <simona@ffwll.ch>,
Alex Deucher <alexander.deucher@amd.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>
Cc: Xaver Hugl <xaver.hugl@gmail.com>,
amd-gfx@lists.freedesktop.org,
"open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS"
<intel-gfx@lists.freedesktop.org>,
"open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS"
<intel-xe@lists.freedesktop.org>,
Hans de Goede <hansg@kernel.org>
Subject: Re: [PATCH v7 00/12] Add support for a DRM backlight capability
Date: Mon, 31 Aug 2026 19:19:03 -0500 [thread overview]
Message-ID: <0564eb9d-ca38-41c5-b55d-8ba423ce253a@amd.com> (raw)
In-Reply-To: <20260831210531.2334221-1-mario.limonciello@amd.com>
On 8/31/26 16:05, Mario Limonciello wrote:
> At Display Next Hackfest 2026 we reviewed progress moving brightness
> control into the DRM connector properties.
>
> There is a range LUMINANCE property that will default to 0->0.
> Once a driver attaches a backlight it will be updated to 1->max.
> If the panel supports the minimum backlight turning off the display
> the range can later be updated to 0->max instead of 1->max.
>
> The legacy sysfs interface is synchronized with the DRM connector.
> When a compositor using this feature is loaded, sysfs writes are disabled
> to prevent legacy tools from going out of sync with the compositor.
>
> This has an implementation initially for amdgpu, i915, and Xe with eDP
> connectors. It can be extended to other connectors like DP for displays
> that can be controlled via DDC as well later.
>
> The following compositors have implemented matching support:
> * Kwin: https://invent.kde.org/plasma/kwin/-/merge_requests/9298
> * Mutter: https://gitlab.gnome.org/swick/mutter/-/commits/wip/kms-luminance-prop
> * Wlroots: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5384
>
> v6 -> v7:
> Core rework (feedback from Maxime Ripard):
> * Make the DRM backlight core backend-agnostic. Add a struct
> drm_backlight_funcs indirection so the backlight subsystem is just
> one backend; other backends (DDC/CI, MIPI-DCS, ...) can be added
> later without touching the core.
> * Stop dynamically allocating the DRM backlight. struct drm_backlight
> is now embedded in struct drm_connector and initialized by the
> core, so drivers no longer allocate it or handle allocation
> failure.
> * Drop the "drm/amd/display: Allow backlight registration to fail"
> patch; it is no longer needed now that nothing in the alloc path
> can fail.
> * Update the LUMINANCE property only through the atomic path. Remove
> the synchronous backlight writes from the property-set and legacy
> paths; the hardware is now touched solely from the atomic
> commit/enable path (via a workqueue, so slow backends never stall a
> commit).
> * Move the inlined luminance/DPMS logic into helpers and fix the
> comment style to match kernel conventions.
>
> Per-connector property (fixes a multi-panel bug):
> * Replace the single device-wide LUMINANCE property with a
> per-connector property created from the linked backend's range.
> Previously all connectors shared one property object, so linking a
> second panel corrupted the range reported for the others.
> * Never mutate the property min/max after creation (avoids racing
> GETPROPERTY). Add a kernel-internal drm_property.is_luminance flag
> to accept value 0 (DPMS off) without a device-wide pointer
> comparison.
>
> Kconfig (feedback from Thomas Zimmermann):
> * Drop "select BACKLIGHT_CLASS_DEVICE" from DRM. Add config
> DRM_BACKLIGHT which "depends on" BACKLIGHT_CLASS_DEVICE and
> provides no-op stubs when disabled, so DRM no longer forces the
> backlight subsystem into the kernel. Builds verified with the
> option both enabled and disabled.
>
> Documentation (feedback from Hans de Goede):
> * Document the LUMINANCE range table (1-N vs 0-N), that 1 is the
> minimum visible brightness, and that 0 means the display is turned
> off (with its vblank/pageflip implications).
> * Document BACKLIGHT_UPDATE_DRM.
>
> Misc:
> * backlight: fix a copy/paste kerneldoc on
> backlight_unregister_notifier and add a struct notifier_block
> forward declaration in backlight.h.
> * Split the old "drm: link connectors to backlight devices" patch
> into "drm/property: add a per-connector luminance flag" and "drm:
> add connector backlight (LUMINANCE) infrastructure", and rework the
> capability patch into "drm: add DRM_CLIENT_CAP_LUMINANCE".
> * Drop all Tested-by tags; the series has changed substantially and
> needs to be re-tested.
>
> Mario Limonciello (12):
> Revert "backlight: Remove notifier"
> backlight: add kernel-internal backlight API
> drm/property: add a per-connector luminance flag
> drm: add connector backlight (LUMINANCE) infrastructure
> drm: add DRM_CLIENT_CAP_LUMINANCE
> drm/amd/display: Pass up errors reading actual brightness
> drm/amd: Indicate driver supports luminance
> drm/amd/display: use drm backlight
> drm/bridge: auto-link panel backlight in bridge connector
> drm/xe: Indicate support for luminance on the connector
> drm/i915: Indicate support for luminance on the connector
> drm/i915/display: use drm backlight
>
> drivers/gpu/drm/Kconfig | 18 +
> drivers/gpu/drm/Makefile | 2 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +-
> .../display/amdgpu_dm/amdgpu_dm_backlight.c | 15 +-
> .../display/amdgpu_dm/amdgpu_dm_backlight.h | 2 +-
> .../display/amdgpu_dm/amdgpu_dm_connector.c | 2 +
> .../tests/amdgpu_dm_backlight_test.c | 4 +-
> drivers/gpu/drm/bridge/panel.c | 15 +
> .../gpu/drm/display/drm_bridge_connector.c | 11 +-
> drivers/gpu/drm/drm_atomic_helper.c | 39 ++
> drivers/gpu/drm/drm_atomic_uapi.c | 49 +-
> drivers/gpu/drm/drm_backlight.c | 515 ++++++++++++++++++
> drivers/gpu/drm/drm_connector.c | 56 ++
> drivers/gpu/drm/drm_drv.c | 8 +
> drivers/gpu/drm/drm_file.c | 5 +
> drivers/gpu/drm/drm_ioctl.c | 17 +
> drivers/gpu/drm/drm_mode_config.c | 1 +
> drivers/gpu/drm/drm_property.c | 6 +
> drivers/gpu/drm/drm_sysfs.c | 26 +-
> .../gpu/drm/i915/display/intel_backlight.c | 4 +
> drivers/gpu/drm/i915/display/intel_display.c | 7 +-
> drivers/gpu/drm/i915/display/intel_dp.c | 1 +
> drivers/gpu/drm/i915/i915_driver.c | 1 +
> drivers/gpu/drm/xe/xe_device.c | 3 +-
> drivers/video/backlight/backlight.c | 99 ++++
> include/drm/drm_atomic_helper.h | 2 +
> include/drm/drm_backlight.h | 158 ++++++
> include/drm/drm_bridge.h | 1 +
> include/drm/drm_connector.h | 20 +
> include/drm/drm_drv.h | 14 +
> include/drm/drm_file.h | 8 +
> include/drm/drm_property.h | 10 +
> include/linux/backlight.h | 63 +++
> include/uapi/drm/drm.h | 22 +
> 35 files changed, 1195 insertions(+), 15 deletions(-)
> create mode 100644 drivers/gpu/drm/drm_backlight.c
> create mode 100644 include/drm/drm_backlight.h
>
I don't think everyone else received it, but there was a good share of
Sashiko generated feedback from this and a lot of it looks valid.
Don't worry about reviewing v7 of the series. I'll take into account
the feedback, re-test and post a v8 when I'm done.
prev parent reply other threads:[~2026-09-01 0:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 21:05 [PATCH v7 00/12] Add support for a DRM backlight capability Mario Limonciello
2026-08-31 21:05 ` [PATCH v7 01/12] Revert "backlight: Remove notifier" Mario Limonciello
2026-08-31 22:02 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 02/12] backlight: add kernel-internal backlight API Mario Limonciello
2026-08-31 22:11 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 03/12] drm/property: add a per-connector luminance flag Mario Limonciello
2026-08-31 21:05 ` [PATCH v7 04/12] drm: add connector backlight (LUMINANCE) infrastructure Mario Limonciello
2026-08-31 22:28 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 05/12] drm: add DRM_CLIENT_CAP_LUMINANCE Mario Limonciello
2026-08-31 22:37 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 06/12] drm/amd/display: Pass up errors reading actual brightness Mario Limonciello
2026-08-31 22:49 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 07/12] drm/amd: Indicate driver supports luminance Mario Limonciello
2026-08-31 21:05 ` [PATCH v7 08/12] drm/amd/display: use drm backlight Mario Limonciello
2026-08-31 23:12 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 09/12] drm/bridge: auto-link panel backlight in bridge connector Mario Limonciello
2026-08-31 23:24 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 10/12] drm/xe: Indicate support for luminance on the connector Mario Limonciello
2026-08-31 23:30 ` sashiko-bot
2026-08-31 21:05 ` [PATCH v7 11/12] drm/i915: " Mario Limonciello
2026-08-31 21:05 ` [PATCH v7 12/12] drm/i915/display: use drm backlight Mario Limonciello
2026-08-31 23:55 ` sashiko-bot
2026-08-31 21:12 ` ✗ CI.checkpatch: warning for Add support for a DRM backlight capability (rev2) Patchwork
2026-08-31 21:13 ` ✗ CI.KUnit: failure " Patchwork
2026-09-01 0:19 ` Mario Limonciello [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0564eb9d-ca38-41c5-b55d-8ba423ce253a@amd.com \
--to=mario.limonciello@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansg@kernel.org \
--cc=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=xaver.hugl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox