All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vinod Govindapillai" <vinod.govindapillai@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/hpd: plumb keep_hpd through irq reset
Date: Wed, 26 Aug 2026 23:08:17 +0000	[thread overview]
Message-ID: <20260826230818.42C091F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260826225338.804902-2-vinod.govindapillai@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Clearing all interrupts in `xe_irq_resume` unconditionally discards pending HPD events (especially DP short pulses) that woke the system.
- [Medium] `gen11_display_irq_reset()` leaves non-HPD interrupts enabled when `keep_hpd` is true by bypassing entire register bank resets.
--

commit 4b2992909ca6b4f24f513b4a4b9fb59c8de79fa9
Author: Vinod Govindapillai <vinod.govindapillai@intel.com>
drm/i915/hpd: plumb keep_hpd through irq reset

This patch updates the display interrupt reset paths in i915 and xe to
conditionally preserve HPD-related interrupt registers. When the keep_hpd
flag is true, HPD interrupts remain active during suspend (D3hot) to allow
hotplug events to wake the device. In all other cases, they are reset as
usual.

> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
> index a59b75830bd13..26fc90ff7299d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
[ ... ]
> @@ -2250,13 +2259,20 @@ static void gen11_display_irq_reset(struct intel_display *display)
>  	irq_reset(display, GEN8_DE_PORT_IRQ_REGS);
>  	irq_reset(display, GEN8_DE_MISC_IRQ_REGS);
>  
> -	if (DISPLAY_VER(display) >= 14)
> -		irq_reset(display, PICAINTERRUPT_IRQ_REGS);
> -	else
> -		irq_reset(display, GEN11_DE_HPD_IRQ_REGS);
> +	/*
> +	 * When runtime suspending to D3hot with PME armed, leave the HPD
> +	 * interrupt registers programmed so that a hotplug can still
> +	 * generate the wake event. Everything else is reset as usual.
> +	 */
> +	if (!keep_hpd) {
> +		if (DISPLAY_VER(display) >= 14)
> +			irq_reset(display, PICAINTERRUPT_IRQ_REGS);
> +		else
> +			irq_reset(display, GEN11_DE_HPD_IRQ_REGS);
>  
> -	if (INTEL_PCH_TYPE(display) >= PCH_ICP)
> -		irq_reset(display, SDE_IRQ_REGS);
> +		if (INTEL_PCH_TYPE(display) >= PCH_ICP)
> +			irq_reset(display, SDE_IRQ_REGS);
> +	}
>  }

[Severity: Medium]
Does bypassing these register banks entirely when keep_hpd is true leave
non-HPD interrupts enabled during suspend?

The SDE and PICA registers contain non-HPD interrupts such as GMBUS, Audio,
and AUX. If these are not reset, could they generate unexpected transitions
on the bus and trigger spurious PME wakeups while the device is in D3hot?

[ ... ]
> diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
> index 9e49e2241da41..eb240615455ce 100644
> --- a/drivers/gpu/drm/xe/xe_irq.c
> +++ b/drivers/gpu/drm/xe/xe_irq.c
[ ... ]
> @@ -866,7 +866,11 @@ void xe_irq_resume(struct xe_device *xe)
>  	 * 2. display is not yet resumed
>  	 */
>  	atomic_set(&xe->irq.enabled, 1);
> -	xe_irq_reset(xe);
> +	/*
> +	 * Always a full reset here: once awake, HPD is delivered as a normal
> +	 * interrupt again and the postinstall below re-arms that path.
> +	 */
> +	xe_irq_reset(xe, false);

[Severity: High]
Does unconditionally clearing all interrupts here discard pending
edge-triggered HPD events (like DisplayPort short pulses) that just woke
the system?

The comment mentions that HPD is delivered as a normal interrupt once awake.
However, since xe_irq_reset(xe, false) writes to the display IIR to clear
the latched status before the interrupt handler runs, wouldn't the event be
permanently lost since edge-triggered events are not re-asserted?

This might cause the driver to miss connection changes or link retraining
requests.

>  	xe_irq_postinstall(xe); /* turn irqs on */
>  
>  	for_each_gt(gt, xe, id)

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260826225338.804902-1-vinod.govindapillai@intel.com?part=1

  reply	other threads:[~2026-08-26 23:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 22:53 [PATCH 0/4] PM_PME support on display hotplug Vinod Govindapillai
2026-08-26 22:53 ` [PATCH 1/4] drm/i915/hpd: plumb keep_hpd through irq reset Vinod Govindapillai
2026-08-26 23:08   ` sashiko-bot [this message]
2026-08-26 22:53 ` [PATCH 2/4] drm/xe/pm: plumb PME capability to runtime suspend handler Vinod Govindapillai
2026-08-26 23:04   ` sashiko-bot
2026-08-26 22:53 ` [PATCH 3/4] drm/xe/pm: allow the device to signal PME from D3hot Vinod Govindapillai
2026-08-26 23:01   ` sashiko-bot
2026-09-02  6:10     ` Govindapillai, Vinod
2026-08-26 22:53 ` [PATCH 4/4] drm/i915/display: Avoid HPD polling if the device is PME capable Vinod Govindapillai
2026-08-26 23:02 ` ✓ CI.KUnit: success for pm_pme support on display hotplug (rev2) Patchwork
2026-08-26 23:38 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-27  0:08 ` ✓ i915.CI.BAT: " Patchwork
2026-08-27  2:02 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-27  7:29 ` ✗ i915.CI.Full: 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=20260826230818.42C091F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vinod.govindapillai@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 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.