[PATCH] drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri May 3 12:53:02 UTC 2024
On Fri, May 03, 2024 at 10:24:50AM +0200, Francois Dugast wrote:
> 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>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi 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