* [PATCH] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
@ 2025-05-16 17:09 Imre Deak
2025-05-19 13:34 ` [PATCH v2] " Imre Deak
0 siblings, 1 reply; 5+ messages in thread
From: Imre Deak @ 2025-05-16 17:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: stable
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.
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147
Cc: stable@vger.kernel.org
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 21297bc4cc00d..208a953b04a2f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4538,6 +4538,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp)
static bool
intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ /*
+ * Display WA for HSD #13013007775: mtl/arl/lnl
+ * Read the sink count and link service IRQ registers in separate
+ * transactions to prevent disconnecting the sink on a TBT link
+ * inadvertently.
+ */
+ if (IS_DISPLAY_VER(display, 14, 20) && !display->platform.battlemage) {
+ if (drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 3) != 3)
+ return false;
+
+ /* DP_SINK_COUNT_ESI + 3 == DP_LINK_SERVICE_IRQ_VECTOR_ESI0 */
+ return drm_dp_dpcd_readb(&intel_dp->aux, DP_LINK_SERVICE_IRQ_VECTOR_ESI0,
+ &esi[3]) == 1;
+ }
+
return drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 4) == 4;
}
--
2.44.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
2025-05-16 17:09 [PATCH] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read Imre Deak
@ 2025-05-19 13:34 ` Imre Deak
2025-05-19 13:39 ` Mika Westerberg
2025-05-19 13:53 ` Jani Nikula
0 siblings, 2 replies; 5+ messages in thread
From: Imre Deak @ 2025-05-19 13:34 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: Mika Westerberg, stable
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 <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 21297bc4cc00d..208a953b04a2f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4538,6 +4538,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp)
static bool
intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ /*
+ * Display WA for HSD #13013007775: mtl/arl/lnl
+ * Read the sink count and link service IRQ registers in separate
+ * transactions to prevent disconnecting the sink on a TBT link
+ * inadvertently.
+ */
+ if (IS_DISPLAY_VER(display, 14, 20) && !display->platform.battlemage) {
+ if (drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 3) != 3)
+ return false;
+
+ /* DP_SINK_COUNT_ESI + 3 == DP_LINK_SERVICE_IRQ_VECTOR_ESI0 */
+ return drm_dp_dpcd_readb(&intel_dp->aux, DP_LINK_SERVICE_IRQ_VECTOR_ESI0,
+ &esi[3]) == 1;
+ }
+
return drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 4) == 4;
}
--
2.44.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
2025-05-19 13:34 ` [PATCH v2] " Imre Deak
@ 2025-05-19 13:39 ` Mika Westerberg
2025-05-19 13:53 ` Jani Nikula
1 sibling, 0 replies; 5+ messages in thread
From: Mika Westerberg @ 2025-05-19 13:39 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx, intel-xe, stable
On Mon, May 19, 2025 at 04:34:17PM +0300, Imre Deak wrote:
> 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 <mika.westerberg@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
2025-05-19 13:34 ` [PATCH v2] " Imre Deak
2025-05-19 13:39 ` Mika Westerberg
@ 2025-05-19 13:53 ` Jani Nikula
2025-05-19 13:55 ` Imre Deak
1 sibling, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2025-05-19 13:53 UTC (permalink / raw)
To: Imre Deak, intel-gfx, intel-xe; +Cc: Mika Westerberg, stable
On Mon, 19 May 2025, Imre Deak <imre.deak@intel.com> wrote:
> 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.
In general, please don't resend just for the sake of adding a Cc. It
triggers a full CI rerun.
BR,
Jani.
>
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 21297bc4cc00d..208a953b04a2f 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4538,6 +4538,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp)
> static bool
> intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
> {
> + struct intel_display *display = to_intel_display(intel_dp);
> +
> + /*
> + * Display WA for HSD #13013007775: mtl/arl/lnl
> + * Read the sink count and link service IRQ registers in separate
> + * transactions to prevent disconnecting the sink on a TBT link
> + * inadvertently.
> + */
> + if (IS_DISPLAY_VER(display, 14, 20) && !display->platform.battlemage) {
> + if (drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 3) != 3)
> + return false;
> +
> + /* DP_SINK_COUNT_ESI + 3 == DP_LINK_SERVICE_IRQ_VECTOR_ESI0 */
> + return drm_dp_dpcd_readb(&intel_dp->aux, DP_LINK_SERVICE_IRQ_VECTOR_ESI0,
> + &esi[3]) == 1;
> + }
> +
> return drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 4) == 4;
> }
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
2025-05-19 13:53 ` Jani Nikula
@ 2025-05-19 13:55 ` Imre Deak
0 siblings, 0 replies; 5+ messages in thread
From: Imre Deak @ 2025-05-19 13:55 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, intel-xe, Mika Westerberg, stable
On Mon, May 19, 2025 at 04:53:08PM +0300, Jani Nikula wrote:
> On Mon, 19 May 2025, Imre Deak <imre.deak@intel.com> wrote:
> > 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.
>
> In general, please don't resend just for the sake of adding a Cc. It
> triggers a full CI rerun.
In this case I wanted that as well.
> BR,
> Jani.
>
> >
> > Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760
> > Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147
> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_dp.c | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 21297bc4cc00d..208a953b04a2f 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -4538,6 +4538,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp)
> > static bool
> > intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
> > {
> > + struct intel_display *display = to_intel_display(intel_dp);
> > +
> > + /*
> > + * Display WA for HSD #13013007775: mtl/arl/lnl
> > + * Read the sink count and link service IRQ registers in separate
> > + * transactions to prevent disconnecting the sink on a TBT link
> > + * inadvertently.
> > + */
> > + if (IS_DISPLAY_VER(display, 14, 20) && !display->platform.battlemage) {
> > + if (drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 3) != 3)
> > + return false;
> > +
> > + /* DP_SINK_COUNT_ESI + 3 == DP_LINK_SERVICE_IRQ_VECTOR_ESI0 */
> > + return drm_dp_dpcd_readb(&intel_dp->aux, DP_LINK_SERVICE_IRQ_VECTOR_ESI0,
> > + &esi[3]) == 1;
> > + }
> > +
> > return drm_dp_dpcd_read(&intel_dp->aux, DP_SINK_COUNT_ESI, esi, 4) == 4;
> > }
>
> --
> Jani Nikula, Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-19 13:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 17:09 [PATCH] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read Imre Deak
2025-05-19 13:34 ` [PATCH v2] " Imre Deak
2025-05-19 13:39 ` Mika Westerberg
2025-05-19 13:53 ` Jani Nikula
2025-05-19 13:55 ` Imre Deak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox