Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Li <sunpeng.li@amd.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	Mario Limonciello <mario.limonciello@amd.com>,
	<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>,
	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>,
	Mario Limonciello <superm1@kernel.org>
Subject: Re: [PATCH v8 03/14] drm/property: add a per-connector luminance flag
Date: Fri, 25 Sep 2026 12:30:54 -0400	[thread overview]
Message-ID: <8a650274-008a-4515-95a6-9cd200eb12f4@amd.com> (raw)
In-Reply-To: <b436e947-198d-40f6-a14e-de26cceb56f4@suse.de>



On 2026-09-22 04:32, Thomas Zimmermann wrote:
> Hi
> 
> Am 08.09.26 um 06:40 schrieb Mario Limonciello:
>> The upcoming per-connector LUMINANCE range property needs to accept the
>> value 0 (to turn the display off on DPMS-off) even when its advertised
>> minimum is 1. The existing check special-cased a single device-wide
>> property object, which does not work once every connector owns its own
>> LUMINANCE property.
>>
>> Add a kernel-internal is_luminance flag on struct drm_property and key
>> the value-0 exception off it instead of a pointer comparison. The flag
>> is not exposed to userspace.
> 
> I don't think this is a good idea. Let userspace control display status and luminance independently.  To my understanding, both are independent devices. Just because the backlight is off doesn't mean that the display is off as well, (right ?)
> 
> Best regards
> Thomas

Yeah, backlight off and DPMS off are quite different. The CRTC is still active if backlight off, but that's not the case for DPMS.

I agree that we should detangle LUMINANCE from DPMS completely: Leave LUMINANCE alone when DPMS_OFF. If LUMINANCE is changed during DPMS_OFF, save the state in sw. Then on DPMS_ON, restore it to panel. Sysfs seems to have the same behavior today (I just tried it on my fw13 laptop).

It would be good to remove references to DPMS on the LUMINANCE property in patch 04/14 as well.

Thanks,
Leo

> 
>>
>> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> ---
>>   drivers/gpu/drm/drm_property.c |  6 ++++++
>>   include/drm/drm_property.h     | 10 ++++++++++
>>   2 files changed, 16 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
>> index f38f2c5437e68..adccee10cfde4 100644
>> --- a/drivers/gpu/drm/drm_property.c
>> +++ b/drivers/gpu/drm/drm_property.c
>> @@ -952,6 +952,12 @@ bool drm_property_change_valid_get(struct drm_property *property,
>>       *ref = NULL;
>>         if (drm_property_type_is(property, DRM_MODE_PROP_RANGE)) {
>> +        /*
>> +         * Special case for the luminance property: allow 0 to turn the
>> +         * display off even when the normal range starts at 1.
>> +         */
>> +        if (property->is_luminance && value == 0 && property->values[1] > 0)
>> +            return true;
>>           if (value < property->values[0] || value > property->values[1])
>>               return false;
>>           return true;
>> diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
>> index aa49b5a42bb56..8bb568a4cd485 100644
>> --- a/include/drm/drm_property.h
>> +++ b/include/drm/drm_property.h
>> @@ -188,6 +188,16 @@ struct drm_property {
>>        */
>>       struct drm_device *dev;
>>   +    /**
>> +     * @is_luminance:
>> +     *
>> +     * True for the per-connector LUMINANCE range property. Such a property
>> +     * additionally accepts the value 0 (to turn the display off) even when
>> +     * its minimum is 1. This is a kernel-internal flag and is not exposed
>> +     * to userspace.
>> +     */
>> +    bool is_luminance;
>> +
>>       /**
>>        * @enum_list:
>>        *
> 


  reply	other threads:[~2026-09-25 16:31 UTC|newest]

Thread overview: 64+ 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 [this message]
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  9:32 ` ✓ i915.CI.BAT: success for Add support for a DRM backlight capability (rev3) Patchwork
2026-09-08 18:45 ` ✗ i915.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

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=8a650274-008a-4515-95a6-9cd200eb12f4@amd.com \
    --to=sunpeng.li@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=mario.limonciello@amd.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=superm1@kernel.org \
    --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