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 <[email protected]> > >> Signed-off-by: Mario Limonciello <[email protected]> > >> --- > >> 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.
With that plan, I think you need to mark it BROKEN if it will actually break current setups when some unsuspecting user flips it on. -- Ville Syrjälä Intel
