From: Dale Whinham <daleyo@gmail.com>
To: 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>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>
Cc: "Jérôme de Bretagne" <jerome.debretagne@gmail.com>,
"Dale Whinham" <daleyo@gmail.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: [PATCH v2 5/8] drm/msm/dp: Add dpcd link_rate quirk for Surface Pro 11 OLED
Date: Mon, 1 Dec 2025 01:14:46 +0000 [thread overview]
Message-ID: <20251201011457.17422-6-daleyo@gmail.com> (raw)
In-Reply-To: <20251201011457.17422-1-daleyo@gmail.com>
From: Jérôme de Bretagne <jerome.debretagne@gmail.com>
The Samsung ATNA30DW01-1 OLED panel in Microsoft Surface Pro 11 (Denali)
reports a max link rate value of 0 in the DPCD register, causing the
panel to fail to probe.
Add a quirk for this panel during DPCD read to set the max link rate
to 8.1Gbps (HBR3), which is the expected value as reported by the
"EDPOverrideDPCDCaps" block found in the DSDT (0x1E).
Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Tested-by: Dale Whinham <daleyo@gmail.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 2 ++
drivers/gpu/drm/msm/dp/dp_panel.c | 14 ++++++++++++++
include/drm/display/drm_dp_helper.h | 7 +++++++
3 files changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index 4aaeae4fa03c..a533fbb2988d 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -2543,6 +2543,8 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
{ OUI(0x00, 0x0C, 0xE7), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC) },
/* Apple MacBookPro 2017 15 inch eDP Retina panel reports too low DP_MAX_LINK_RATE */
{ OUI(0x00, 0x10, 0xfa), DEVICE_ID(101, 68, 21, 101, 98, 97), false, BIT(DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_3_24_GBPS) },
+ /* Samsung ATNA30DW01-1 OLED panel in Microsoft Surface Pro 11 reports a DP_MAX_LINK_RATE of 0 */
+ { OUI(0xBA, 0x41, 0x59), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_8_1_GBPS) },
};
#undef OUI
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c
index 15b7f6c7146e..6bcfefd457c4 100644
--- a/drivers/gpu/drm/msm/dp/dp_panel.c
+++ b/drivers/gpu/drm/msm/dp/dp_panel.c
@@ -91,6 +91,7 @@ static int msm_dp_panel_read_dpcd(struct msm_dp_panel *msm_dp_panel)
int rc, max_lttpr_lanes, max_lttpr_rate;
struct msm_dp_panel_private *panel;
struct msm_dp_link_info *link_info;
+ struct drm_dp_desc desc;
u8 *dpcd, major, minor;
panel = container_of(msm_dp_panel, struct msm_dp_panel_private, msm_dp_panel);
@@ -99,6 +100,19 @@ static int msm_dp_panel_read_dpcd(struct msm_dp_panel *msm_dp_panel)
if (rc)
return rc;
+ rc = drm_dp_read_desc(panel->aux, &desc, drm_dp_is_branch(dpcd));
+ if (rc)
+ return rc;
+
+ /*
+ * for some reason the ATNA30DW01-1 OLED panel in Microsoft Surface Pro 11
+ * reports a max link rate of 0 in the DPCD register. Fix this to match the
+ * EDPOverrideDPCDCaps value (0x1E) found in the ACPI DSDT
+ */
+ if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_8_1_GBPS)) {
+ dpcd[1] = DP_LINK_BW_8_1;
+ }
+
msm_dp_panel->vsc_sdp_supported = drm_dp_vsc_sdp_supported(panel->aux, dpcd);
link_info = &msm_dp_panel->link_info;
link_info->revision = dpcd[DP_DPCD_REV];
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 87caa4f1fdb8..737ec5317666 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -820,6 +820,13 @@ enum drm_dp_quirk {
* requires enabling DSC.
*/
DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC,
+ /**
+ * @DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_8_1_GBPS:
+ *
+ * The device supports a link rate of 8.1 Gbps / HBR3 (0x1e) despite
+ * the DP_MAX_LINK_RATE register reporting a lower max multiplier.
+ */
+ DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_8_1_GBPS,
};
/**
--
2.52.0
next prev parent reply other threads:[~2025-12-01 1:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 1:14 [PATCH v2 0/8] Microsoft Surface Pro 11 support Dale Whinham
2025-12-01 1:14 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Document Microsoft Surface Pro 11 Dale Whinham
2025-12-01 2:17 ` Rob Herring (Arm)
2025-12-01 7:30 ` Krzysztof Kozlowski
2025-12-01 1:14 ` [PATCH v2 2/8] firmware: qcom: scm: allow QSEECOM on " Dale Whinham
2025-12-04 1:25 ` Dmitry Baryshkov
2025-12-01 1:14 ` [PATCH v2 4/8] arm64: dts: qcom: Add support for " Dale Whinham
2025-12-01 15:35 ` Konrad Dybcio
2025-12-02 18:50 ` Jérôme de Bretagne
2025-12-03 10:56 ` Konrad Dybcio
2025-12-03 21:58 ` Jérôme de Bretagne
2025-12-04 9:02 ` Konrad Dybcio
2025-12-01 1:14 ` Dale Whinham [this message]
2025-12-04 9:46 ` [PATCH v2 5/8] drm/msm/dp: Add dpcd link_rate quirk for Surface Pro 11 OLED Dmitry Baryshkov
2025-12-01 1:14 ` [PATCH v2 8/8] arm64: dts: qcom: x1-microsoft-denali: Disable rfkill for wifi0 Dale Whinham
2025-12-01 7:35 ` Krzysztof Kozlowski
2025-12-01 12:27 ` [PATCH v2 0/8] Microsoft Surface Pro 11 support Rob Herring
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=20251201011457.17422-6-daleyo@gmail.com \
--to=daleyo@gmail.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jerome.debretagne@gmail.com \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--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