Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: 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>,
	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 v8 00/14] Add support for a DRM backlight capability
Date: Wed, 23 Sep 2026 15:12:27 -0500	[thread overview]
Message-ID: <7bd814e2-0269-41c8-869e-fee424120390@amd.com> (raw)
In-Reply-To: <xlv1bj9peahm.fsf@fmartine-thinkpadx1carbongen12.rmtes.csb>



On 9/22/26 07:28, Javier Martinez Canillas wrote:
> Mario Limonciello <mario.limonciello@amd.com> writes:
> 
> Hello Mario,
> 
>> On 9/22/26 03:33, Javier Martinez Canillas wrote:
>>> Hello Mario,
>>>
>>> On Tue, Sep 8, 2026 at 6:41 AM Mario Limonciello
>>> <mario.limonciello@amd.com> 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.
>>>>
>>>
>>> I don't think I agree with the direction of this series. The main
>>> issue for me is that if the sysfs interface is disabled, then I don't
>>> understand the value of doing all the hops between the DRM and
>>> backlight subsystems...
>>
>> The reason for all the hops is that users can switch between compositors
>> that support this and don't.  If you're in a compositor that supports it
>> that compositor will want to affirm it's in control.  If you're in a
>> compositor without support then you should still have a way to change
>> things, and that's what the sysfs interface exists for.
>>
> 
> That's Ok but still doesn't explain why it must go through the backlight
> subsystem. Both the struct drm_backlight .{s,g}et_luminance() callbacks
> and the struct backlight_ops .update_status() can call to the same code
> to manage the brightness.
> 
> For example, in amdgput this could be amdgpu_dm_backlight_get_level()
> and amdgpu_dm_backlight_set_level().
> 

I guess the other point would be not storing two sets of data.

>>>
>>> IMO when a driver sets the DRIVER_CONNECTOR_LUMINANCE feature and the
>>> client advertise the DRM_CLIENT_CAP_LUMINANCE capability, then the DRM
>>> driver should be in full control of the brightness control and not go
>>> through the backlight subsystem at all.
>>
>> OK but so let's say I start at 100% brightness.  I open up Kwin, I
>> change the luminance property to 0%.  Let's pretend that backlight
>> subsystem doesn't get updated.
>>
>> Then I log into Xorg + Xfce.  The luminance property should be left at
>> 0%, the brightness subsystem is 100%.
>>
>> The hardware would be left at 0%.  I press the brightness up key (or
>> call brightnessctl) and I can't change it because backlight subsystem is
>> 100% already.
>>
> 
> Not really because struct backlight_ops .get_brightness() will be called
> and this will query the HW state (in the case of amdgput this will be a
> call to amdgpu_dm_backlight_get_level() as mentioned above).
> 
> So the HW state will be changed and both subsystems are going to query
> the same information.
> 

Thanks for pointing that out.

      reply	other threads:[~2026-09-23 20:12 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  4:40 [PATCH v8 00/14] Add support for a DRM backlight capability Mario Limonciello
2026-09-08  4:40 ` [PATCH v8 01/14] Revert "backlight: Remove notifier" Mario Limonciello
2026-09-08  4:51   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 02/14] backlight: add kernel-internal backlight API Mario Limonciello
2026-09-08  4:52   ` sashiko-bot
2026-09-08 15:45   ` Jani Nikula
2026-09-08 16:00     ` Mario Limonciello
2026-09-08 16:33       ` Jani Nikula
2026-09-22  8:23   ` Thomas Zimmermann
2026-09-22  8:49     ` Javier Martinez Canillas
2026-09-22 11:34       ` Mario Limonciello
2026-09-22 12:05         ` Thomas Zimmermann
2026-09-25 12:52           ` Xaver Hugl
2026-09-22 12:26         ` Maxime Ripard
2026-09-22 11:37     ` Mario Limonciello
2026-09-08  4:40 ` [PATCH v8 03/14] drm/property: add a per-connector luminance flag Mario Limonciello
2026-09-08  4:54   ` sashiko-bot
2026-09-22  8:32   ` Thomas Zimmermann
2026-09-25 16:30     ` Leo Li
2026-10-01 19:05       ` Harry Wentland
2026-09-08  4:40 ` [PATCH v8 04/14] drm: add connector backlight (LUMINANCE) infrastructure Mario Limonciello
2026-09-08  4:54   ` sashiko-bot
2026-09-08 15:48   ` Jani Nikula
2026-09-22 11:42   ` Javier Martinez Canillas
2026-09-22 12:08     ` Thomas Zimmermann
2026-09-22 11:58   ` Thomas Zimmermann
2026-10-01 19:12   ` Harry Wentland
2026-10-01 19:29     ` Xaver Hugl
2026-10-02  8:00     ` Maxime Ripard
2026-09-08  4:40 ` [PATCH v8 05/14] drm: add DRM_CLIENT_CAP_LUMINANCE Mario Limonciello
2026-09-08  4:55   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 06/14] drm/amd/display: Pass up errors reading actual brightness Mario Limonciello
2026-09-08  4:40 ` [PATCH v8 07/14] drm/amd: Indicate driver supports luminance Mario Limonciello
2026-09-22  8:53   ` Thomas Zimmermann
2026-09-08  4:40 ` [PATCH v8 08/14] drm/amd/display: use drm backlight Mario Limonciello
2026-09-08  4:57   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 09/14] drm/amdgpu: Check bios_scratch_reg_offset in backlight level helper Mario Limonciello
2026-09-08  4:51   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 10/14] drm/amd/display: Update KUnit backlight tests for luminance property and fixtures Mario Limonciello
2026-09-08  4:54   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 11/14] drm/bridge: auto-link panel backlight in bridge connector Mario Limonciello
2026-09-08  4:40 ` [PATCH v8 12/14] drm/xe: Indicate support for luminance on the connector Mario Limonciello
2026-09-08  4:57   ` sashiko-bot
2026-09-08  4:40 ` [PATCH v8 13/14] drm/i915: " Mario Limonciello
2026-09-08  4:40 ` [PATCH v8 14/14] drm/i915/display: use drm backlight Mario Limonciello
2026-09-08  5:03   ` sashiko-bot
2026-09-08  4:51 ` ✗ CI.checkpatch: warning for Add support for a DRM backlight capability (rev3) Patchwork
2026-09-08  4:53 ` ✓ CI.KUnit: success " Patchwork
2026-09-08  5:09 ` ✗ CI.checksparse: warning " Patchwork
2026-09-08  5:51 ` ✓ Xe.CI.BAT: success " Patchwork
2026-09-08  6:31 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-22  8:33 ` [PATCH v8 00/14] Add support for a DRM backlight capability Javier Martinez Canillas
2026-09-22 11:41   ` Mario Limonciello
2026-09-22 12:16     ` Maxime Ripard
2026-09-22 12:23       ` Thomas Zimmermann
2026-09-22 12:35         ` Maxime Ripard
2026-09-23  6:39           ` Thomas Zimmermann
2026-10-01 16:06             ` Maxime Ripard
2026-10-01 16:10               ` Mario Limonciello
2026-10-01 16:20                 ` Maxime Ripard
2026-09-23  8:07           ` Xaver Hugl
2026-10-01 16:18             ` Maxime Ripard
2026-10-01 16:21               ` Mario Limonciello
2026-10-01 16:55                 ` Javier Martinez Canillas
2026-10-02  8:01                   ` Maxime Ripard
2026-09-22 12:28     ` Javier Martinez Canillas
2026-09-23 20:12       ` 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=7bd814e2-0269-41c8-869e-fee424120390@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=javierm@redhat.com \
    --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