Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode
@ 2024-05-03  8:24 Francois Dugast
  2024-05-03  8:30 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Francois Dugast @ 2024-05-03  8:24 UTC (permalink / raw)
  To: intel-xe; +Cc: Francois Dugast, Rodrigo Vivi

This function is another entry point where it must be ensured that
the device resumes before operating on the GuC, so grab a runtime_pm
reference. This fixes inner xe_pm_runtime_get_noresume calls which
were previously failing.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
---
 drivers/gpu/drm/xe/xe_debugfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index 0e61fa462c7b..96920f7b2371 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -152,6 +152,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
 
 	xe->wedged.mode = wedged_mode;
 
+	xe_pm_runtime_get(xe);
 	for_each_gt(gt, xe, id) {
 		ret = xe_guc_ads_scheduler_policy_toggle_reset(&gt->uc.guc.ads);
 		if (ret) {
@@ -159,6 +160,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
 			return -EIO;
 		}
 	}
+	xe_pm_runtime_put(xe);
 
 	return size;
 }
-- 
2.43.0


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

end of thread, other threads:[~2024-05-03 12:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03  8:24 [PATCH] drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode Francois Dugast
2024-05-03  8:30 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-03  8:30 ` ✓ CI.checkpatch: " Patchwork
2024-05-03  8:31 ` ✓ CI.KUnit: " Patchwork
2024-05-03  8:43 ` ✓ CI.Build: " Patchwork
2024-05-03  8:45 ` ✓ CI.Hooks: " Patchwork
2024-05-03  8:47 ` ✓ CI.checksparse: " Patchwork
2024-05-03  9:22 ` ✓ CI.BAT: " Patchwork
2024-05-03 10:51 ` ✗ CI.FULL: failure " Patchwork
2024-05-03 12:53 ` [PATCH] " Rodrigo Vivi

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