Commit 78675412 authored by Francois Dugast's avatar Francois Dugast Committed by Rodrigo Vivi

drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode

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: default avatarFrancois Dugast <francois.dugast@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503082450.268335-1-francois.dugast@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 233e8d1d
...@@ -153,6 +153,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf, ...@@ -153,6 +153,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
xe->wedged.mode = wedged_mode; xe->wedged.mode = wedged_mode;
xe_pm_runtime_get(xe);
for_each_gt(gt, xe, id) { for_each_gt(gt, xe, id) {
ret = xe_guc_ads_scheduler_policy_toggle_reset(&gt->uc.guc.ads); ret = xe_guc_ads_scheduler_policy_toggle_reset(&gt->uc.guc.ads);
if (ret) { if (ret) {
...@@ -160,6 +161,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf, ...@@ -160,6 +161,7 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
return -EIO; return -EIO;
} }
} }
xe_pm_runtime_put(xe);
return size; return size;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment