All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/xe/pm: Wait for lmem ready in resume
@ 2025-04-10 11:00 Karthik Poosa
  2025-04-10 12:06 ` Gupta, Anshuman
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Karthik Poosa @ 2025-04-10 11:00 UTC (permalink / raw)
  To: intel-xe; +Cc: anshuman.gupta, badal.nilawar, rodrigo.vivi, Karthik Poosa

Add wait for LMEM ready during system and runtime resume.
This wait is there in probe and is missing during resume.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 2 +-
 drivers/gpu/drm/xe/xe_device.h | 1 +
 drivers/gpu/drm/xe/xe_pm.c     | 8 ++++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 75e753e0a682..4c0d9eb51d1f 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -630,7 +630,7 @@ static bool verify_lmem_ready(struct xe_device *xe)
 	return !!val;
 }
 
-static int wait_for_lmem_ready(struct xe_device *xe)
+int wait_for_lmem_ready(struct xe_device *xe)
 {
 	unsigned long timeout, start;
 
diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
index 0bc3bc8e6803..60bc92f9ab22 100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -47,6 +47,7 @@ int xe_device_probe_early(struct xe_device *xe);
 int xe_device_probe(struct xe_device *xe);
 void xe_device_remove(struct xe_device *xe);
 void xe_device_shutdown(struct xe_device *xe);
+int wait_for_lmem_ready(struct xe_device *xe);
 
 void xe_device_wmb(struct xe_device *xe);
 
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 4e112fbacada..2e59670660c1 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -182,6 +182,10 @@ int xe_pm_resume(struct xe_device *xe)
 	if (err)
 		return err;
 
+	err = wait_for_lmem_ready(xe);
+	if (err)
+		goto err;
+
 	xe_display_pm_resume_early(xe);
 
 	/*
@@ -478,6 +482,10 @@ int xe_pm_runtime_resume(struct xe_device *xe)
 		if (err)
 			goto out;
 
+		err = wait_for_lmem_ready(xe);
+		if (err)
+			goto out;
+
 		xe_display_pm_resume_early(xe);
 
 		/*
-- 
2.25.1


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

end of thread, other threads:[~2025-05-22 16:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 11:00 [PATCH v1] drm/xe/pm: Wait for lmem ready in resume Karthik Poosa
2025-04-10 12:06 ` Gupta, Anshuman
     [not found]   ` <978a73ec-075d-4e09-816f-8b682a601317@intel.com>
2025-04-21 11:30     ` Poosa, Karthik
2025-04-21 13:48       ` Gupta, Anshuman
2025-04-14  7:23 ` ✓ CI.Patch_applied: success for drm/xe/pm: Wait for lmem ready in resume (rev2) Patchwork
2025-04-14  7:23 ` ✓ CI.checkpatch: " Patchwork
2025-04-14  7:24 ` ✓ CI.KUnit: " Patchwork
2025-04-14  7:33 ` ✓ CI.Build: " Patchwork
2025-04-14  7:35 ` ✓ CI.Hooks: " Patchwork
2025-04-14  7:36 ` ✓ CI.checksparse: " Patchwork
2025-04-14  8:15 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-14  9:55 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-22 16:00 ` [PATCH v1] drm/xe/pm: Wait for lmem ready in resume Lucas De Marchi
2025-05-08  5:58   ` Poosa, Karthik
2025-05-08 15:47     ` Lucas De Marchi
2025-05-09 15:56       ` Rodrigo Vivi
2025-05-22 16:11         ` Poosa, Karthik

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.