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 v2 3/5] drm/i915/irq: conditional HPD IRQ resets based on PME capability
Date: Thu, 03 Sep 2026 08:32:11 +0000	[thread overview]
Message-ID: <20260903083212.2C2611F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903080410.489411-4-vinod.govindapillai@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Lost HPD interrupt on system resume causing broken hotplug detection
- [Medium] Unintentionally leaving non-HPD interrupts unmasked during suspend
--

commit 3a88160970f909255e3f0d82a7735b68d8c9df0d
Author: Vinod Govindapillai <vinod.govindapillai@intel.com>

drm/i915/irq: conditional HPD IRQ resets based on PME capability

This commit conditionally skips resetting HPD-related IRQs during suspend
if the device supports generating PME from HPDs. This aims to keep the
device capable of waking from hotplug events.

> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
> index a59b75830bd13..fc50b19d5ddfe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
[ ... ]
> @@ -2250,13 +2254,15 @@ 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);
> +	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]
Since PICAINTERRUPT_IRQ_REGS and SDE_IRQ_REGS contain both HPD and non-HPD
interrupts (like GMBUS, I2C, AUX, and Poison errors), does skipping their
reset here leave those non-HPD interrupts unmasked during suspend? Could
this lead to spurious wakeups or unintended interrupt handling while the
system is suspended?

[Severity: High]
During system resume, if keep_hpd evaluates to false (for example, if PME
capability is cleared before runtime resume), this block will execute
irq_reset() for these registers.

Looking at irq_reset(), it unconditionally clears the IIR:

static void irq_reset(struct intel_display *display, struct intel_irq_regs regs)
{
	intel_de_write(display, regs.imr, 0xffffffff);
	intel_de_posting_read(display, regs.imr);
	...
	/* IIR can theoretically queue up two events. Be paranoid. */
	intel_de_write(display, regs.iir, 0xffffffff);
	intel_de_posting_read(display, regs.iir);
	intel_de_write(display, regs.iir, 0xffffffff);
	intel_de_posting_read(display, regs.iir);
}

Does this permanently destroy the pending HPD event that just woke the system
before the IRQ handlers can process it?

Additionally, even if keep_hpd remained true during resume, wouldn't the
subsequent call to irq_init() during postinstall explicitly clear the IIR
anyway?

static void irq_init(struct intel_display *display, ...)
{
	...
	assert_iir_is_zero(display, regs.iir);
	...
}

Will this cause the hotplug event to be completely ignored, preventing the
display from being brought up after a PME wake?

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

  reply	other threads:[~2026-09-03  8:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  8:04 [PATCH v2 0/5] PM_PME support on display hotplug Vinod Govindapillai
2026-09-03  8:04 ` [PATCH v2 1/5] drm/xe/pm: initialize the device's system wakeup capabilities Vinod Govindapillai
2026-09-03  8:15   ` sashiko-bot
2026-09-03  8:04 ` [PATCH v2 2/5] drm/i915/hotplug: add helpers to track HPDs can generate PME Vinod Govindapillai
2026-09-03  8:04 ` [PATCH v2 3/5] drm/i915/irq: conditional HPD IRQ resets based on PME capability Vinod Govindapillai
2026-09-03  8:32   ` sashiko-bot [this message]
2026-09-04  9:56   ` Jani Nikula
2026-09-04 12:12     ` Govindapillai, Vinod
2026-09-03  8:04 ` [PATCH v2 4/5] drm/i915/hotplug: avoid HPD polling if the device is PME capable Vinod Govindapillai
2026-09-03  8:04 ` [PATCH v2 5/5] drm/xe/pm: handle the PME capability and runtime pm routines Vinod Govindapillai
2026-09-03 12:36   ` [PATCH v3 " Vinod Govindapillai
2026-09-04 10:03   ` [PATCH v2 " Jani Nikula
2026-09-08  6:19     ` Hogander, Jouni
2026-09-08  7:41       ` Govindapillai, Vinod
2026-09-11  8:10         ` Govindapillai, Vinod
2026-09-11 12:47       ` Jani Nikula
2026-09-03  8:13 ` ✓ CI.KUnit: success for pm_pme support on display hotplug (rev3) Patchwork
2026-09-03  8:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-03 10:26 ` ✓ i915.CI.BAT: " Patchwork
2026-09-03 12:45 ` ✓ CI.KUnit: success for pm_pme support on display hotplug (rev4) Patchwork
2026-09-03 13:46 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-03 14:15 ` ✗ i915.CI.BAT: failure " Patchwork
2026-09-04  0:04 ` ✗ 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=20260903083212.2C2611F000E9@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.