From: Jani Nikula <jani.nikula@intel.com>
To: imre.deak@intel.com
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
"Martin Hodo" <martin.hodo@intel.com>,
stable@vger.kernel.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH] drm/i915/mst: limit DP MST ESI service loop
Date: Fri, 03 Jul 2026 15:40:26 +0300 [thread overview]
Message-ID: <bd3a4590aa21a61c433bb7d8506e91123231b9d2@intel.com> (raw)
In-Reply-To: <akU3qOVL4eh2E9ma@ideak-desk.lan>
On Wed, 01 Jul 2026, Imre Deak <imre.deak@intel.com> wrote:
> On Thu, Jun 25, 2026 at 05:22:04PM +0300, Jani Nikula wrote:
>> The loop in intel_dp_check_mst_status() keeps servicing interrupts
>> originating from the sink without bound. Add an upper bound to the new
>> interrupts occurring during interrupt processing to not get stuck on
>> potentially stuck sink devices. Use arbitrary 32 tries to clear incoming
>> interrupts in one go.
>>
>> Discovered using AI-assisted static analysis confirmed by Intel Product
>> Security.
>>
>> Note: The condition likely pre-dates the commit in the Fixes: tag, but
>> this is about as far back as a backport has any chance of
>> succeeding. Before that, the retry had a goto.
>>
>> Reported-by: Martin Hodo <martin.hodo@intel.com>
>> Fixes: 3c0ec2c2d594 ("drm/i915: Flatten intel_dp_check_mst_status() a bit")
>> Cc: <stable@vger.kernel.org> # v5.8+
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: Imre Deak <imre.deak@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>
Thanks, pushed to din.
BR,
Jani.
>
>> ---
>> drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 6e3fa6662cbe..ade7e51e7590 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -5590,8 +5590,9 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>> struct intel_display *display = to_intel_display(intel_dp);
>> bool force_retrain = intel_dp_link_training_get_force_retrain(intel_dp->link.training);
>> bool reprobe_needed = false;
>> + int tries = 33;
>>
>> - for (;;) {
>> + while (--tries) {
>> u8 esi[4] = {};
>> u8 ack[4] = {};
>> bool new_irqs;
>> @@ -5634,6 +5635,11 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>> break;
>> }
>>
>> + if (!tries) {
>> + drm_dbg_kms(display->drm, "DPRX ESI not clearing, device may be stuck\n");
>> + reprobe_needed = true;
>> + }
>> +
>> return !reprobe_needed;
>> }
>>
>> --
>> 2.47.3
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-07-03 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 14:22 [PATCH] drm/i915/mst: limit DP MST ESI service loop Jani Nikula
2026-07-01 15:52 ` Imre Deak
2026-07-03 12:40 ` Jani Nikula [this message]
2026-07-01 20:35 ` ✗ CI.checkpatch: warning for drm/i915/mst: limit DP MST ESI service loop (rev2) Patchwork
2026-07-01 20:36 ` ✓ CI.KUnit: success " Patchwork
2026-07-01 21:22 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-07-02 8:21 ` ✓ Xe.CI.BAT: success " Patchwork
2026-07-02 17:36 ` ✓ Xe.CI.FULL: " 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=bd3a4590aa21a61c433bb7d8506e91123231b9d2@intel.com \
--to=jani.nikula@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=martin.hodo@intel.com \
--cc=stable@vger.kernel.org \
--cc=ville.syrjala@linux.intel.com \
/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