Skip to content

Commit 82122d1

Browse files
committed
drm/xe: Add missing runtime reference to wedged upon gt_reset
Fixes this missed case: xe 0000:00:02.0: [drm] Missing outer runtime PM protection WARNING: CPU: 99 PID: 1455 at drivers/gpu/drm/xe/xe_pm.c:564 xe_pm_runtime_get_noresume+0x48/0x60 [xe] Call Trace: <TASK> ? show_regs+0x67/0x70 ? __warn+0x94/0x1b0 ? xe_pm_runtime_get_noresume+0x48/0x60 [xe] ? report_bug+0x1b7/0x1d0 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x19/0x70 ? asm_exc_invalid_op+0x1b/0x20 ? xe_pm_runtime_get_noresume+0x48/0x60 [xe] xe_device_declare_wedged+0x91/0x280 [xe] gt_reset_worker+0xa2/0x250 [xe] v2: Also move get and get the right Fixes tag (Himal, Brost) Fixes: fb74b20 ("drm/xe: Introduce a simple wedged state") Cc: Himal Prasad Ghimiray <[email protected]> Cc: Matthew Brost <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Reviewed-by: Himal Prasad Ghimiray <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit bc947d9) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent fe13fd6 commit 82122d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/xe/xe_gt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,12 +753,13 @@ static int gt_reset(struct xe_gt *gt)
753753

754754
xe_gt_info(gt, "reset started\n");
755755

756+
xe_pm_runtime_get(gt_to_xe(gt));
757+
756758
if (xe_fault_inject_gt_reset()) {
757759
err = -ECANCELED;
758760
goto err_fail;
759761
}
760762

761-
xe_pm_runtime_get(gt_to_xe(gt));
762763
xe_gt_sanitize(gt);
763764

764765
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
@@ -793,11 +794,11 @@ static int gt_reset(struct xe_gt *gt)
793794
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
794795
err_msg:
795796
XE_WARN_ON(xe_uc_start(&gt->uc));
796-
xe_pm_runtime_put(gt_to_xe(gt));
797797
err_fail:
798798
xe_gt_err(gt, "reset failed (%pe)\n", ERR_PTR(err));
799799

800800
xe_device_declare_wedged(gt_to_xe(gt));
801+
xe_pm_runtime_put(gt_to_xe(gt));
801802

802803
return err;
803804
}

0 commit comments

Comments
 (0)