Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
	 Alex Deucher <alexander.deucher@amd.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	 Javier Martinez Canillas <javierm@redhat.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>,
	 Simona Vetter <simona@ffwll.ch>,
	Harry Wentland <harry.wentland@amd.com>,
	 Leo Li <sunpeng.li@amd.com>,
	Rodrigo Siqueira <siqueira@igalia.com>,
	 Mario Limonciello <superm1@kernel.org>,
	Xaver Hugl <xaver.hugl@gmail.com>,
	 dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	amd-gfx@lists.freedesktop.org,  intel-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH v12 01/12] drm: add connector LUMINANCE property
Date: Mon, 23 Nov 2026 09:10:17 +0100	[thread overview]
Message-ID: <awP0nasqAc4pAeMR@houat> (raw)
In-Reply-To: <awPzsMWZ7e0i6i54@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5662 bytes --]

On Mon, Nov 23, 2026 at 10:05:04AM +0200, Ville Syrjälä wrote:
> On Mon, Nov 23, 2026 at 08:50:29AM +0100, Maxime Ripard wrote:
> > On Fri, Nov 20, 2026 at 11:19:13AM -0600, Mario Limonciello wrote:
> > > 
> > > 
> > > On 11/20/26 10:41, Ville Syrjälä wrote:
> > > > On Thu, Nov 19, 2026 at 05:27:28PM -0600, Mario Limonciello wrote:
> > > > > Panel brightness is a property of a display, and thus of a DRM
> > > > > connector. Add an atomic per-connector LUMINANCE range property so
> > > > > compositors can manage relative panel luminance together with the rest
> > > > > of the display state.
> > > > > 
> > > > > Keep the core backend-agnostic. Drivers create the property with their
> > > > > hardware range and implement connector helper callbacks to set luminance
> > > > > or disable panel emission. The atomic helpers sequence those callbacks
> > > > > around pipeline enable and disable, including luminance-only commits.
> > > > > The panel is left lit when the pipeline enters self refresh, and the
> > > > > luminance is only reprogrammed when it changes or a modeset enables the
> > > > > pipeline.
> > > > > 
> > > > > The stored property value is independent of display power. A commit made
> > > > > while the connector is inactive is retained and applied on the next
> > > > > enable; disabling the pipeline does not overwrite it.
> > > > > 
> > > > > LUMINANCE values are relative, driver-defined levels rather than
> > > > > absolute luminance in cd/m^2. The interface supports emissive panels as
> > > > > well as panels with a separate backlight.
> > > > > 
> > > > > Keep the interface behind a default-off DRM_LUMINANCE option. Migrated
> > > > > drivers retain their legacy backlight class ABI unless the new interface
> > > > > is explicitly selected, allowing the DRM UAPI and legacy compatibility
> > > > > policy to remain separate.
> > > > > 
> > > > > Acked-by: Javier Martinez Canillas <javierm@redhat.com>
> > > > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > > > > ---
> > > > > v11:
> > > > >   * Don't call .disable_luminance when the CRTC enters self refresh (Sashiko)
> > > > >   * Only call .set_luminance when the luminance changes or on a modeset
> > > > >     that isn't a self refresh exit (Leo Li, Sashiko)
> > > > >   * Fix the .set_luminance self refresh documentation
> > > > > v10:
> > > > >   * Add tag
> > > > > ---
> > > > >   drivers/gpu/drm/Kconfig                    | 14 +++++
> > > > >   drivers/gpu/drm/drm_atomic_helper.c        | 98 +++++++++++++++++++++++++++++-
> > > > >   drivers/gpu/drm/drm_atomic_state_helper.c  |  7 +++
> > > > >   drivers/gpu/drm/drm_atomic_uapi.c          |  5 ++
> > > > >   drivers/gpu/drm/drm_connector.c            | 57 +++++++++++++++++
> > > > >   drivers/gpu/drm/tests/drm_connector_test.c | 28 +++++++++
> > > > >   include/drm/drm_atomic_helper.h            |  3 +
> > > > >   include/drm/drm_connector.h                | 16 +++++
> > > > >   include/drm/drm_modeset_helper_vtables.h   | 28 +++++++++
> > > > >   9 files changed, 255 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> > > > > index 61111d50b1c65..1bbe2c2d7c76f 100644
> > > > > --- a/drivers/gpu/drm/Kconfig
> > > > > +++ b/drivers/gpu/drm/Kconfig
> > > > > @@ -33,6 +33,20 @@ endmenu
> > > > >   if DRM
> > > > > +config DRM_LUMINANCE
> > > > > +	bool "DRM connector luminance support"
> > > > > +	help
> > > > > +	  Expose relative luminance as an atomic DRM connector property. Values
> > > > > +	  are driver-defined levels rather than absolute luminance in cd/m^2.
> > > > > +	  Drivers provide connector helper callbacks to program their hardware;
> > > > > +	  the DRM core does not depend on a particular backend.
> > > > > +
> > > > > +	  Drivers migrated to this interface will use it instead of registering
> > > > > +	  a legacy backlight class device. Leave this disabled to preserve the
> > > > > +	  de-facto userspace ABI in /sys/class/backlight.
> > > > 
> > > > I don't think this will fly if it breaks the backlight class interface.
> > > > No one can actually enable this outside of some niche embedded use
> > > > cases where backwards compatibility is not an issue. I think what
> > > > you need is a generic backlight class implementation on top of this.
> > > > 
> > > 
> > > The idea with this was:
> > > 1) to get the series landed
> > > 2) let compositors merge solutions around it.
> > > 3) Then add backwards compatibility to kernel so we can flip the Kconfig
> > > default.
> > 
> > I said this a few times already, but we keep having those discussions
> > while the backlight sysfs handling is far from being the main point. You
> > should *really* consider adding support for the luminance property for
> > something that isn't tied to that interface (like DDC/CI for HDMI), and
> > treat the sysfs API as a sysfs series.
> > 
> > It looks like people just have conflicting opinions on this particular
> > part that isn't going to solve itself easily. You should not treat this
> > sysfs discussion as a blocker for the infrastructure work.
> 
> You want to be sure backwards compatibility with the backlight
> class is a solvable problem before you land *anything*. Otherwise
> you might just paint yourself into a corner with no way out.

I disagree. The luminance property is more useful than *just* for
backlights but is also useful for HDMI, DP, and MIPI-DSI that would all
use it.

If that's the corner we paint ourselves into, it's still a pretty nice
corner.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

  reply	other threads:[~2026-11-23  8:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 23:27 [PATCH v12 00/12] Add support for a DRM backlight capability Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 01/12] drm: add connector LUMINANCE property Mario Limonciello
2026-11-20 16:41   ` Ville Syrjälä
2026-11-20 17:19     ` Mario Limonciello
2026-11-20 17:33       ` Ville Syrjälä
2026-11-20 17:42         ` Ville Syrjälä
2026-11-23  7:50       ` Maxime Ripard
2026-11-23  8:05         ` Ville Syrjälä
2026-11-23  8:10           ` Maxime Ripard [this message]
2026-11-23  8:42             ` Ville Syrjälä
2026-11-23  9:03               ` Maxime Ripard
2026-11-23  9:15                 ` Ville Syrjälä
2026-11-23  9:30                   ` Maxime Ripard
2026-11-23 10:42                     ` Ville Syrjälä
2026-11-23  8:48             ` Javier Martinez Canillas
2026-11-23  9:08               ` Ville Syrjälä
2026-11-19 23:27 ` [PATCH v12 02/12] drm/amd/display: Pass up errors reading actual brightness Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 03/12] drm/amdgpu: Check bios_scratch_reg_offset in backlight level helper Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 04/12] drm/amd: add luminance property support Mario Limonciello
2026-11-19 23:52   ` sashiko-bot
2026-11-19 23:27 ` [PATCH v12 05/12] drm/i915/display: " Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 06/12] drm/bridge: add connector luminance operations Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 07/12] drm/panel: add connector luminance forwarding Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 08/12] drm/bridge_connector: add luminance support Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 09/12] drm/nouveau: add connector " Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 10/12] drm/gud: " Mario Limonciello
2026-11-19 23:43   ` sashiko-bot
2026-11-19 23:27 ` [PATCH v12 11/12] drm/bridge: add PS8622 " Mario Limonciello
2026-11-19 23:27 ` [PATCH v12 12/12] drm/solomon: add SSD130x " Mario Limonciello
2026-11-19 23:49 ` ✗ Fi.CI.BUILD: failure for Add support for a DRM backlight capability (rev7) Patchwork

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=awP0nasqAc4pAeMR@houat \
    --to=mripard@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=superm1@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --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