* FAILED: patch "[PATCH] drm/i915/ptl+: Fix TypeC detection for eDP on port B" failed to apply to 6.18-stable tree @ 2026-12-02 10:28 gregkh 2026-12-04 0:31 ` [PATCH 6.18.y 1/2] drm/i915/tc: Add separate intel_tc_phy_port_to_tc() for TC DDI/PHY ports Sasha Levin 0 siblings, 1 reply; 3+ messages in thread From: gregkh @ 2026-12-02 10:28 UTC (permalink / raw) To: imre.deak, joonas.lahtinen, mika.kahola; +Cc: stable The patch below does not apply to the 6.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@vger.kernel.org>. To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y git checkout FETCH_HEAD git cherry-pick -x b8c29d1e64a712decce01e3671bf7e6ec6bd70a0 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026120219-reusable-stonewall-4356@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From b8c29d1e64a712decce01e3671bf7e6ec6bd70a0 Mon Sep 17 00:00:00 2001 From: Imre Deak <imre.deak@intel.com> Date: Thu, 29 Oct 2026 13:30:17 +0200 Subject: [PATCH] drm/i915/ptl+: Fix TypeC detection for eDP on port B On PTL+ platforms with eDP on TypeC, port B's DDI is connected to a C20 TypeC PHY. Identify PHY B as TypeC and map port B to TC_PORT_1 when eDP TypeC support is enabled. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/9196 CC: stable@vger.kernel.org # 6.14+ Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20261029113017.618286-7-imre.deak@intel.com (cherry picked from commit 20e3d954f70486bf14000fc1a6dac7c34e6e4f07) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index f79caeb5a82e..b897678a93c0 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1904,6 +1904,11 @@ bool intel_phy_is_combo(struct intel_display *display, enum phy phy) return false; } +static bool intel_phy_is_edp_on_tc(struct intel_display *display, enum phy phy) +{ + return DISPLAY_RUNTIME_INFO(display)->edp_typec_support && phy == PHY_B; +} + /* * This function returns true if the DDI port respective to the PHY enumeration * is a Type-C capable port. @@ -1924,6 +1929,9 @@ bool intel_phy_is_tc(struct intel_display *display, enum phy phy) if (display->platform.dgfx) return false; + if (intel_phy_is_edp_on_tc(display, phy)) + return true; + if (DISPLAY_VER(display) >= 13) return phy >= PHY_F && phy <= PHY_I; else if (display->platform.tigerlake) @@ -1974,6 +1982,9 @@ enum phy intel_port_to_phy(struct intel_display *display, enum port port) */ enum tc_port intel_port_to_tc(struct intel_display *display, enum port port) { + if (intel_phy_is_edp_on_tc(display, intel_port_to_phy(display, port))) + return TC_PORT_1; + if (DISPLAY_VER(display) >= 12) return TC_PORT_1 + port - PORT_TC1; else ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.18.y 1/2] drm/i915/tc: Add separate intel_tc_phy_port_to_tc() for TC DDI/PHY ports 2026-12-02 10:28 FAILED: patch "[PATCH] drm/i915/ptl+: Fix TypeC detection for eDP on port B" failed to apply to 6.18-stable tree gregkh @ 2026-12-04 0:31 ` Sasha Levin 2026-12-04 0:31 ` [PATCH 6.18.y 2/2] drm/i915/ptl+: Fix TypeC detection for eDP on port B Sasha Levin 0 siblings, 1 reply; 3+ messages in thread From: Sasha Levin @ 2026-12-04 0:31 UTC (permalink / raw) To: stable; +Cc: Imre Deak, Suraj Kandpal, Mika Kahola, Sasha Levin From: Imre Deak <imre.deak@intel.com> [ Upstream commit 8aa2945f049d7cfc7b3c9195a7341e8eb0d9c961 ] intel_port_to_tc() returns the PORT_TC1..6 -> TC_PORT_1..6 mapping only for DDI ports that are connected to a TypeC PHY. In some cases this mapping is also required for TypeC DDI ports which are not connected to a TypeC PHY. Such DDI ports are the PORT_TC1..4 ports on RKL/ADLS/BMG. Add a separate intel_tc_phy_to_tc() helper to return the mapping for ports connected to a TypeC PHY, and make all the current users - which expect this semantic - call this helper. A follow-up change will need to get the same mapping for TypeC DDI ports not connected to a TypeC PHY, leave intel_port_to_tc() exported for that. Cc: Suraj Kandpal <suraj.kandpal@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20251120172358.1282765-2-imre.deak@intel.com Stable-dep-of: b8c29d1e64a7 ("drm/i915/ptl+: Fix TypeC detection for eDP on port B") Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/gpu/drm/i915/display/intel_ddi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display.c | 23 ++++++++++++++++---- drivers/gpu/drm/i915/display/intel_display.h | 1 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index e6ddc52ac02db..4a45ad6f878b4 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -5082,7 +5082,7 @@ static const char *intel_ddi_encoder_name(struct intel_display *display, port_name(port - PORT_D_XELPD + PORT_D), phy_name(phy)); } else if (DISPLAY_VER(display) >= 12) { - enum tc_port tc_port = intel_port_to_tc(display, port); + enum tc_port tc_port = intel_tc_phy_port_to_tc(display, port); seq_buf_printf(s, "DDI %s%c/PHY %s%c", port >= PORT_TC1 ? "TC" : "", @@ -5090,7 +5090,7 @@ static const char *intel_ddi_encoder_name(struct intel_display *display, tc_port != TC_PORT_NONE ? "TC" : "", tc_port != TC_PORT_NONE ? tc_port_name(tc_port) : phy_name(phy)); } else if (DISPLAY_VER(display) >= 11) { - enum tc_port tc_port = intel_port_to_tc(display, port); + enum tc_port tc_port = intel_tc_phy_port_to_tc(display, port); seq_buf_printf(s, "DDI %c%s/PHY %s%c", port_name(port), diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 3f40028e79cfc..95bca3473ffa8 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1886,17 +1886,32 @@ enum phy intel_port_to_phy(struct intel_display *display, enum port port) } /* Prefer intel_encoder_to_tc() */ +/* + * Return TC_PORT_1..I915_MAX_TC_PORTS for any TypeC DDI port. The function + * can be also called for TypeC DDI ports not connected to a TypeC PHY such as + * the PORT_TC1..4 ports on RKL/ADLS/BMG. + */ enum tc_port intel_port_to_tc(struct intel_display *display, enum port port) { - if (!intel_phy_is_tc(display, intel_port_to_phy(display, port))) - return TC_PORT_NONE; - if (DISPLAY_VER(display) >= 12) return TC_PORT_1 + port - PORT_TC1; else return TC_PORT_1 + port - PORT_C; } +/* + * Return TC_PORT_1..I915_MAX_TC_PORTS for TypeC DDI ports connected to a TypeC PHY. + * Note that on RKL, ADLS, BMG the PORT_TC1..4 ports are connected to a non-TypeC + * PHY, so on those platforms the function returns TC_PORT_NONE. + */ +enum tc_port intel_tc_phy_port_to_tc(struct intel_display *display, enum port port) +{ + if (!intel_phy_is_tc(display, intel_port_to_phy(display, port))) + return TC_PORT_NONE; + + return intel_port_to_tc(display, port); +} + enum phy intel_encoder_to_phy(struct intel_encoder *encoder) { struct intel_display *display = to_intel_display(encoder); @@ -1929,7 +1944,7 @@ enum tc_port intel_encoder_to_tc(struct intel_encoder *encoder) { struct intel_display *display = to_intel_display(encoder); - return intel_port_to_tc(display, encoder->port); + return intel_tc_phy_port_to_tc(display, encoder->port); } enum intel_display_power_domain diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h index 37e2ab301a80e..1d3c362cbe3fe 100644 --- a/drivers/gpu/drm/i915/display/intel_display.h +++ b/drivers/gpu/drm/i915/display/intel_display.h @@ -450,6 +450,7 @@ bool intel_phy_is_combo(struct intel_display *display, enum phy phy); bool intel_phy_is_tc(struct intel_display *display, enum phy phy); bool intel_phy_is_snps(struct intel_display *display, enum phy phy); enum tc_port intel_port_to_tc(struct intel_display *display, enum port port); +enum tc_port intel_tc_phy_port_to_tc(struct intel_display *display, enum port port); enum phy intel_encoder_to_phy(struct intel_encoder *encoder); bool intel_encoder_is_combo(struct intel_encoder *encoder); -- 2.53.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.18.y 2/2] drm/i915/ptl+: Fix TypeC detection for eDP on port B 2026-12-04 0:31 ` [PATCH 6.18.y 1/2] drm/i915/tc: Add separate intel_tc_phy_port_to_tc() for TC DDI/PHY ports Sasha Levin @ 2026-12-04 0:31 ` Sasha Levin 0 siblings, 0 replies; 3+ messages in thread From: Sasha Levin @ 2026-12-04 0:31 UTC (permalink / raw) To: stable; +Cc: Imre Deak, Mika Kahola, Joonas Lahtinen, Sasha Levin From: Imre Deak <imre.deak@intel.com> [ Upstream commit b8c29d1e64a712decce01e3671bf7e6ec6bd70a0 ] On PTL+ platforms with eDP on TypeC, port B's DDI is connected to a C20 TypeC PHY. Identify PHY B as TypeC and map port B to TC_PORT_1 when eDP TypeC support is enabled. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/9196 CC: stable@vger.kernel.org # 6.14+ Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20261029113017.618286-7-imre.deak@intel.com (cherry picked from commit 20e3d954f70486bf14000fc1a6dac7c34e6e4f07) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> [ sashal: Adjusted context lines to the tree's older comment layout above intel_phy_is_tc() and shifted offsets, with a prerequisite commit pulled in to split out intel_tc_phy_port_to_tc(). ] Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 95bca3473ffa8..3dee634b4706b 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1837,6 +1837,11 @@ bool intel_phy_is_combo(struct intel_display *display, enum phy phy) return false; } +static bool intel_phy_is_edp_on_tc(struct intel_display *display, enum phy phy) +{ + return DISPLAY_RUNTIME_INFO(display)->edp_typec_support && phy == PHY_B; +} + /* Prefer intel_encoder_is_tc() */ bool intel_phy_is_tc(struct intel_display *display, enum phy phy) { @@ -1847,6 +1852,9 @@ bool intel_phy_is_tc(struct intel_display *display, enum phy phy) if (display->platform.dgfx) return false; + if (intel_phy_is_edp_on_tc(display, phy)) + return true; + if (DISPLAY_VER(display) >= 13) return phy >= PHY_F && phy <= PHY_I; else if (display->platform.tigerlake) @@ -1893,6 +1901,9 @@ enum phy intel_port_to_phy(struct intel_display *display, enum port port) */ enum tc_port intel_port_to_tc(struct intel_display *display, enum port port) { + if (intel_phy_is_edp_on_tc(display, intel_port_to_phy(display, port))) + return TC_PORT_1; + if (DISPLAY_VER(display) >= 12) return TC_PORT_1 + port - PORT_TC1; else -- 2.53.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-04 0:31 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-12-02 10:28 FAILED: patch "[PATCH] drm/i915/ptl+: Fix TypeC detection for eDP on port B" failed to apply to 6.18-stable tree gregkh 2026-12-04 0:31 ` [PATCH 6.18.y 1/2] drm/i915/tc: Add separate intel_tc_phy_port_to_tc() for TC DDI/PHY ports Sasha Levin 2026-12-04 0:31 ` [PATCH 6.18.y 2/2] drm/i915/ptl+: Fix TypeC detection for eDP on port B Sasha Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox