File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -854,6 +854,13 @@ u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64 address)
854
854
return address & GENMASK_ULL (xe -> info .va_bits - 1 , 0 );
855
855
}
856
856
857
+ static void xe_device_wedged_fini (struct drm_device * drm , void * arg )
858
+ {
859
+ struct xe_device * xe = arg ;
860
+
861
+ xe_pm_runtime_put (xe );
862
+ }
863
+
857
864
/**
858
865
* xe_device_declare_wedged - Declare device wedged
859
866
* @xe: xe device instance
@@ -878,6 +885,13 @@ void xe_device_declare_wedged(struct xe_device *xe)
878
885
return ;
879
886
}
880
887
888
+ if (drmm_add_action_or_reset (& xe -> drm , xe_device_wedged_fini , xe )) {
889
+ drm_err (& xe -> drm , "Failed to register xe_device_wedged_fini clean-up. Although device is wedged.\n" );
890
+ return ;
891
+ }
892
+
893
+ xe_pm_runtime_get_noresume (xe );
894
+
881
895
if (!atomic_xchg (& xe -> wedged .flag , 1 )) {
882
896
xe -> needs_flr_on_fini = true;
883
897
drm_err (& xe -> drm ,
You can’t perform that action at this time.
0 commit comments