[PATCH] drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode
Francois Dugast
francois.dugast at intel.com
Fri May 3 08:24:50 UTC 2024
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 at intel.com>
Signed-off-by: Francois Dugast <francois.dugast at 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(>->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
More information about the Intel-xe
mailing list