Skip to content

Commit 9cb1547

Browse files
ideakjlahtine-intel
authored andcommitted
drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
Due to a problem in the iTBT DP-in adapter's firmware the sink on a TBT link may get disconnected inadvertently if the SINK_COUNT_ESI and the DP_LINK_SERVICE_IRQ_VECTOR_ESI0 registers are read in a single AUX transaction. Work around the issue by reading these registers in separate transactions. The issue affects MTL+ platforms and will be fixed in the DP-in adapter firmware, however releasing that firmware fix may take some time and is not guaranteed to be available for all systems. Based on this apply the workaround on affected platforms. See HSD #13013007775. v2: Cc'ing Mika Westerberg. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147 Cc: Mika Westerberg <[email protected]> Cc: [email protected] Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit c3a4836) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent a38b323 commit 9cb1547

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4532,6 +4532,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp)
45324532
static bool
45334533
intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
45344534
{
4535+
struct intel_display *display = to_intel_display(intel_dp);
4536+
4537+
/*
4538+
* Display WA for HSD #13013007775: mtl/arl/lnl
4539+
* Read the sink count and link service IRQ registers in separate
4540+
* transactions to prevent disconnecting the sink on a TBT link
4541+
* inadvertently.
4542+
*/
4543+
if (IS_DISPLAY_VER(display, 14, 20) && !display->platform.battlemage) {
4544+
if (drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 3) != 3)
4545+
return false;
4546+
4547+
/* DP_SINK_COUNT_ESI + 3 == DP_LINK_SERVICE_IRQ_VECTOR_ESI0 */
4548+
return drm_dp_dpcd_readb(&intel_dp->aux, DP_LINK_SERVICE_IRQ_VECTOR_ESI0,
4549+
&esi[3]) == 1;
4550+
}
4551+
45354552
return drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 4) == 4;
45364553
}
45374554

0 commit comments

Comments
 (0)