public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org,
	"Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [PATCH v5 00/11] Add support for a DRM backlight capability
Date: Sun, 31 May 2026 06:48:57 -0500	[thread overview]
Message-ID: <20260531114908.1693426-1-superm1@kernel.org> (raw)

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.

For ease of testing; this series is also available on this branch:
https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git/log/?h=superm1/backlight-property-v5

This tree is:
 * 7.1-rc5 +
 * Various patches coming from drm-next for amdgpu vblank handling +
 * This series

These patches are backported into that branch due to timing bugs being exposed
with this series. If this series is applied to drm-next those patches are not
needed.

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

---
v4->v5:
 * Add i915/xe support (Tested by Simon)
 * Drop driver indicating support as drivers will just add property to connectors
 * Lots of internal cleanups (see patches for details)
 * Add testing tags
 * Changes for bugs found in amdgpu handling when testing with Kwin
 * Use 1->max for default range, reserving 0 specifically for displays that
   are confirmed to turn off at minimum luminance.
 * Drop worker thread to notify brightness changes (handle part of the commit)
 * Drop amdgpu brightness caching

Mario Limonciello (AMD) (11):
  Revert "backlight: Remove notifier"
  backlight: add kernel-internal backlight API
  drm: link connectors to backlight devices
  DRM: Add support for client indicating support for luminance
  drm/amd/display: Pass up errors reading actual brightness
  drm/amd/display: Allow backlight registration to fail
  drm/amd/display: Move backlight tracing out of the dc lock
  drm/amd/display: use drm backlight
  drm/amd/display: Drop brightness caching in amdgpu_dm
  drm/bridge: auto-link panel backlight in bridge connector
  drm/i915/display: use drm backlight

 drivers/gpu/drm/Kconfig                       |   1 +
 drivers/gpu/drm/Makefile                      |   1 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 117 ++---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  13 -
 drivers/gpu/drm/bridge/panel.c                |  15 +
 .../gpu/drm/display/drm_bridge_connector.c    |  15 +-
 drivers/gpu/drm/drm_atomic_helper.c           |   7 +
 drivers/gpu/drm/drm_atomic_uapi.c             |  59 ++-
 drivers/gpu/drm/drm_backlight.c               | 441 ++++++++++++++++++
 drivers/gpu/drm/drm_connector.c               |  63 +++
 drivers/gpu/drm/drm_drv.c                     |   8 +
 drivers/gpu/drm/drm_file.c                    |   5 +
 drivers/gpu/drm/drm_ioctl.c                   |  15 +
 drivers/gpu/drm/drm_mode_config.c             |   7 +
 drivers/gpu/drm/drm_mode_object.c             |  66 ++-
 drivers/gpu/drm/drm_property.c                |   6 +
 drivers/gpu/drm/drm_sysfs.c                   |  28 +-
 .../gpu/drm/i915/display/intel_backlight.c    |   4 +
 drivers/gpu/drm/i915/display/intel_dp.c       |   8 +
 drivers/video/backlight/backlight.c           |  97 ++++
 include/drm/drm_backlight.h                   |  51 ++
 include/drm/drm_bridge.h                      |   1 +
 include/drm/drm_connector.h                   |   8 +
 include/drm/drm_file.h                        |   8 +
 include/drm/drm_mode_config.h                 |   5 +
 include/linux/backlight.h                     |  56 +++
 include/uapi/drm/drm.h                        |  22 +
 27 files changed, 1038 insertions(+), 89 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_backlight.c
 create mode 100644 include/drm/drm_backlight.h

-- 
2.54.0


             reply	other threads:[~2026-05-31 11:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31 11:48 Mario Limonciello (AMD) [this message]
2026-05-31 11:48 ` [PATCH v5 01/11] Revert "backlight: Remove notifier" Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:48 ` [PATCH v5 02/11] backlight: add kernel-internal backlight API Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 03/11] drm: link connectors to backlight devices Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 04/11] DRM: Add support for client indicating support for luminance Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 05/11] drm/amd/display: Pass up errors reading actual brightness Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 06/11] drm/amd/display: Allow backlight registration to fail Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 07/11] drm/amd/display: Move backlight tracing out of the dc lock Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 08/11] drm/amd/display: use drm backlight Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 09/11] drm/amd/display: Drop brightness caching in amdgpu_dm Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 10/11] drm/bridge: auto-link panel backlight in bridge connector Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-05-31 11:49 ` [PATCH v5 11/11] drm/i915/display: use drm backlight Mario Limonciello (AMD)
2026-06-04  4:54   ` Claude review: " Claude Code Review Bot
2026-06-04  4:54 ` Claude review: Add support for a DRM backlight capability Claude Code Review Bot

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=20260531114908.1693426-1-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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