public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pm: Change HPD to polling on runtime suspend
@ 2024-08-06  8:55 Arun R Murthy
  2024-08-06  9:31 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Arun R Murthy @ 2024-08-06  8:55 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: Arun R Murthy

HPD is interrupt based and on runtime suspend change it to polling as
HPD is not a wakeup event. A worker thread is scheduled for doing this
polling and it keeps polling for HPD live status on an internval of 10s.
On runtime resume disable polling and fallback to interrupt mechanism.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/xe/xe_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 9f3c14fd9f33..d952b06ebfb4 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -22,6 +22,7 @@
 #include "xe_pcode.h"
 #include "xe_trace.h"
 #include "xe_wa.h"
+#include "intel_hotplug.h"
 
 /**
  * DOC: Xe Power Management
@@ -378,6 +379,8 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
 		if (err)
 			goto out;
 	}
+	/* Enable hpd polling on runtime suspend */
+	intel_hpd_poll_enable(xe);
 
 	xe_irq_suspend(xe);
 
@@ -427,6 +430,9 @@ int xe_pm_runtime_resume(struct xe_device *xe)
 
 	xe_irq_resume(xe);
 
+	/* Disable hpd polling on runtime resume */
+	intel_hpd_poll_disable(xe);
+
 	for_each_gt(gt, xe, id)
 		xe_gt_resume(gt);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-08  8:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06  8:55 [PATCH] drm/xe/pm: Change HPD to polling on runtime suspend Arun R Murthy
2024-08-06  9:31 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-06 10:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-06 16:17 ` [PATCH] " kernel test robot
2024-08-06 16:41 ` Imre Deak
2024-08-07  9:15   ` Murthy, Arun R
2024-08-07 14:14     ` Imre Deak
2024-08-08  8:40       ` Jani Nikula
2024-08-08  5:56 ` [v2PATCH] drm/xe/display: " Arun R Murthy
2024-08-08  6:28 ` ✗ Fi.CI.BUILD: failure for drm/xe/pm: Change HPD to polling on runtime suspend (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox