All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
Date: Mon, 19 May 2025 16:53:08 +0300	[thread overview]
Message-ID: <87zff8u2pn.fsf@intel.com> (raw)
In-Reply-To: <20250519133417.1469181-1-imre.deak@intel.com>

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

  parent reply	other threads:[~2025-05-19 13:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16 17:09 [PATCH] drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read Imre Deak
2025-05-16 17:43 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2025-05-16 18:10 ` ✗ i915.CI.BAT: failure " Patchwork
2025-05-16 18:35 ` ✓ CI.Patch_applied: success " Patchwork
2025-05-16 18:35 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-16 18:36 ` ✓ CI.KUnit: success " Patchwork
2025-05-16 18:47 ` ✓ CI.Build: " Patchwork
2025-05-16 18:50 ` ✓ CI.Hooks: " Patchwork
2025-05-16 18:51 ` ✓ CI.checksparse: " Patchwork
2025-05-16 19:38 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-17 22:28 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-19 13:34 ` [PATCH v2] " Imre Deak
2025-05-19 13:39   ` Mika Westerberg
2025-05-19 13:53   ` Jani Nikula [this message]
2025-05-19 13:55     ` Imre Deak
2025-05-19 13:56 ` ✓ CI.Patch_applied: success for drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read (rev2) Patchwork
2025-05-19 13:56 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-19 13:57 ` ✓ CI.KUnit: success " Patchwork
2025-05-19 14:08 ` ✓ CI.Build: " Patchwork
2025-05-19 14:10 ` ✓ CI.Hooks: " Patchwork
2025-05-19 14:12 ` ✓ CI.checksparse: " Patchwork
2025-05-19 14:38 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-19 14:47 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-05-19 15:29 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-19 17:19 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-19 19:16 ` ✓ i915.CI.Full: success " Patchwork
2025-05-20  8:22   ` Imre Deak
2025-05-27  5:00 ` ✗ CI.Patch_applied: failure " Patchwork

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=87zff8u2pn.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.