From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, imre.deak@intel.com,
jouni.hogander@intel.com
Subject: [PATCH v5 08/10] drm/xe/pm: clear PME HPD flag on runtime suspend error handler
Date: Fri, 11 Sep 2026 11:04:46 +0300 [thread overview]
Message-ID: <20260911080448.778316-9-vinod.govindapillai@intel.com> (raw)
In-Reply-To: <20260911080448.778316-1-vinod.govindapillai@intel.com>
The HPD can generate PME flag in the intel_hotplug is set based
one PME status during early pm_runtime_suspend routine before
any IRQ reset calls and cleared during early pm_runtime_resume()
before any IRQ reset/resume calls. But in case of any error
scenario during xe_pm_runtime_suspend(), we end up in a situation
where this flag is never cleared in the "out_resume" path.
So change to global scope for intel_display_driver_pm_runtime_clear_pme()
and get it called from the error handler path as well. To have
this in cleanly, get it wrapped with corresponding xe_display wrapper.
The alternative could be to call the clear the flag from both
runtime_resume_early() and the late runtime_resume(). But the
former approach seems clean.
Assisted-by: GitHub_Copilot:claude-opus-5
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
drivers/gpu/drm/i915/display/intel_display_driver.c | 2 +-
drivers/gpu/drm/i915/display/intel_display_driver.h | 1 +
drivers/gpu/drm/xe/display/xe_display.c | 9 +++++++++
drivers/gpu/drm/xe/display/xe_display.h | 2 ++
drivers/gpu/drm/xe/xe_pm.c | 7 +++++++
5 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 263eb3e08ea1..99aaceb39048 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -944,7 +944,7 @@ void intel_display_driver_pm_runtime_suspend_late(struct intel_display *display)
intel_hpd_poll_enable(display);
}
-static void intel_display_driver_pm_runtime_clear_pme(struct intel_display *display)
+void intel_display_driver_pm_runtime_clear_pme(struct intel_display *display)
{
intel_hpd_set_pme_capable(display, false);
}
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
index 1ae2ad7e95f6..51f82b6fb2f5 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.h
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
@@ -49,6 +49,7 @@ void intel_display_driver_runtime_pm_disable(struct intel_display *display);
void intel_display_driver_pm_runtime_suspend(struct intel_display *display);
void intel_display_driver_pm_runtime_suspend_late(struct intel_display *display);
void intel_display_driver_pm_runtime_resume_early(struct intel_display *display);
+void intel_display_driver_pm_runtime_clear_pme(struct intel_display *display);
void intel_display_driver_pm_runtime_resume(struct intel_display *display);
#endif /* __INTEL_DISPLAY_DRIVER_H__ */
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 7b25c0814674..79166aeeed85 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -409,6 +409,15 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
intel_display_driver_pm_runtime_resume(display);
}
+void xe_display_clear_pme_hpd(struct xe_device *xe)
+{
+ struct intel_display *display = xe->display;
+
+ if (!xe->info.probe_display)
+ return;
+
+ intel_display_driver_pm_runtime_clear_pme(display);
+}
static void display_device_remove(struct drm_device *dev, void *arg)
{
diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
index 0babb50bfc77..92bb5ee76e06 100644
--- a/drivers/gpu/drm/xe/display/xe_display.h
+++ b/drivers/gpu/drm/xe/display/xe_display.h
@@ -45,6 +45,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe);
void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
void xe_display_pm_runtime_resume_early(struct xe_device *xe);
void xe_display_pm_runtime_resume(struct xe_device *xe);
+void xe_display_clear_pme_hpd(struct xe_device *xe);
#define XE_DISPLAY_DRIVER_FEATURES (DRIVER_MODESET | DRIVER_ATOMIC)
#define XE_DISPLAY_DRIVER_OPS \
@@ -83,6 +84,7 @@ static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}
static inline void xe_display_pm_runtime_suspend_late(struct xe_device *xe) {}
static inline void xe_display_pm_runtime_resume_early(struct xe_device *xe) {}
static inline void xe_display_pm_runtime_resume(struct xe_device *xe) {}
+static inline void xe_display_clear_pme_hpd(struct xe_device *xe) {}
#endif /* CONFIG_DRM_XE_DISPLAY */
#endif /* _XE_DISPLAY_H_ */
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index c79f55b66a41..5e7263316683 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -663,6 +663,13 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
return 0;
out_resume:
+ /*
+ * We need to explicitly clear the PME HPD flag in this error handler.
+ * Normally this is set during early runtime suspend and cleared during
+ * early runtime resume call.
+ */
+ xe_display_clear_pme_hpd(xe);
+
xe_display_pm_runtime_resume(xe);
xe_pxp_pm_resume(xe->pxp);
out:
--
2.43.0
next prev parent reply other threads:[~2026-09-11 8:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 8:04 [PATCH v5 00/10] pm_pme support on display hotplug Vinod Govindapillai
2026-09-11 8:04 ` [PATCH v5 01/10] drm/xe/pm: initialize the device's system wakeup capabilities Vinod Govindapillai
2026-09-11 8:04 ` [PATCH v5 02/10] drm/xe/pm: introduce PM PME support Vinod Govindapillai
2026-09-11 8:04 ` [PATCH v5 03/10] drm/xe/pm: avoid reclaim when arming PME wakeup Vinod Govindapillai
2026-09-11 8:22 ` sashiko-bot
2026-09-11 8:04 ` [PATCH v5 04/10] drm/i915: add pme_enabled() to the parent interface Vinod Govindapillai
2026-09-11 8:04 ` [PATCH v5 05/10] drm/i915/xe: plug the pme_enabed implementation for xe Vinod Govindapillai
2026-09-11 8:04 ` [PATCH v5 06/10] drm/i915/hotplug: add helpers to track HPDs can generate PME Vinod Govindapillai
2026-09-11 13:00 ` Jani Nikula
2026-09-11 15:36 ` Govindapillai, Vinod
2026-09-11 8:04 ` [PATCH v5 07/10] drm/i915: plug the pm runtime handlers with PME HPD handling Vinod Govindapillai
2026-09-11 8:04 ` Vinod Govindapillai [this message]
2026-09-11 8:20 ` [PATCH v5 08/10] drm/xe/pm: clear PME HPD flag on runtime suspend error handler sashiko-bot
2026-09-11 8:04 ` [PATCH v5 09/10] drm/i915/irq: conditional HPD IRQ resets based on PME capability Vinod Govindapillai
2026-09-11 8:27 ` sashiko-bot
2026-09-11 8:04 ` [PATCH v5 10/10] drm/i915/hotplug: avoid HPD polling if the device is PME capable Vinod Govindapillai
2026-09-11 8:34 ` sashiko-bot
2026-09-11 9:19 ` ✓ i915.CI.BAT: success for pm_pme support on display hotplug (rev5) Patchwork
2026-09-12 5:04 ` ✗ 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=20260911080448.778316-9-vinod.govindapillai@intel.com \
--to=vinod.govindapillai@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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.