mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: "Paul Menzel" <pmenzel@molgen.mpg.de>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Antheas Kapenekakis" <lkml@antheas.dev>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] drm: panel-backlight-quirks: Add Dell XPS 13 9310 FHD+ panel
Date: Fri, 27 Nov 2026 17:37:46 +0100	[thread overview]
Message-ID: <20261127163752.54806-3-pmenzel@molgen.mpg.de> (raw)
In-Reply-To: <20261127163752.54806-1-pmenzel@molgen.mpg.de>

The VBT of the Dell XPS 13 9310 (BIOS 3.17.0, BDB 240, panel_type 2)
sets the backlight minimum level to 15/255, so i915 maps brightness 1
to a PWM duty cycle of 5.9 %. With GNOME, which does not go below 1 %
of max_brightness, the lowest slider position gives 6.8 %, which is
still too bright in a dark room:

    $ cat /sys/class/backlight/intel_backlight/{max_brightness,brightness}
    96000
    960
    $ sudo intel_reg read 0xC8258    # BXT_BLC_PWM_DUTY(0)
                                        (0x000c8258): 0x00001997

    6551 = 5647 + 960 * (96000 - 5647) / 96000, with 5647 = 15/255 * 96000

Writing the duty cycle register directly shows that the panel, a Sharp
LQ134N1 (EDID SHP 0x14f9), is well readable at 1 % (960/96000).

Add a quirk setting the minimum to 0/255 for this system and panel, so
that brightness maps linearly onto the PWM duty cycle, and GNOME’s
lowest position becomes 1 %. Other XPS 13 9310 panels (UHD+, OLED) were
not tested, so match the panel ID as well.

Tested on the Dell XPS 13 9310 (BIOS 3.17.0) with v7.4-rc1 and v7.4-rc4
based kernels: GNOME lowest position gives PWM duty 960/96000 (1 %),
was 6551 (6.8 %).

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---

Notes:
    
    Prepared with Claude Code (claude-opus-5-5).

 drivers/gpu/drm/drm_panel_backlight_quirks.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight_quirks.c
index dcb91e12bac6b..85c2ef791d116 100644
--- a/drivers/gpu/drm/drm_panel_backlight_quirks.c
+++ b/drivers/gpu/drm/drm_panel_backlight_quirks.c
@@ -53,6 +53,15 @@ static const struct drm_get_panel_backlight_quirk drm_panel_min_backlight_quirks
 		.ident.name = "NE135A1M-NY1",
 		.quirk = { .min_brightness = 1, },
 	},
+	/* Dell XPS 13 9310 FHD+ panel, VBT minimum 15/255 is too bright */
+	{
+		.dmi_match.field = DMI_SYS_VENDOR,
+		.dmi_match.value = "Dell Inc.",
+		.dmi_match_other.field = DMI_PRODUCT_NAME,
+		.dmi_match_other.value = "XPS 13 9310",
+		.ident.panel_id = drm_edid_encode_panel_id('S', 'H', 'P', 0x14f9),
+		.quirk = { .min_brightness = 1, },
+	},
 	/* Steam Deck models */
 	{
 		.dmi_match.field = DMI_SYS_VENDOR,
-- 
2.54.0


      parent reply	other threads:[~2026-11-27 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261127163752.54806-1-pmenzel@molgen.mpg.de>
2026-11-27 16:37 ` [PATCH 1/3] drm/i915/backlight: Honor panel backlight quirk for minimum brightness Paul Menzel
2026-11-27 16:37 ` Paul Menzel [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=20261127163752.54806-3-pmenzel@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=lkml@antheas.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®