Lines Matching refs:gt
18 __igt_reset_stolen(struct intel_gt *gt, in __igt_reset_stolen() argument
22 struct i915_ggtt *ggtt = >->i915->ggtt; in __igt_reset_stolen()
23 const struct resource *dsm = >->i915->dsm; in __igt_reset_stolen()
51 igt_global_reset_lock(gt); in __igt_reset_stolen()
52 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in __igt_reset_stolen()
54 err = igt_spinner_init(&spin, gt); in __igt_reset_stolen()
58 for_each_engine(engine, gt, id) { in __igt_reset_stolen()
96 if (!__drm_mm_interval_first(>->i915->mm.stolen, in __igt_reset_stolen()
112 intel_gt_reset(gt, mask, NULL); in __igt_reset_stolen()
114 for_each_engine(engine, gt, id) { in __igt_reset_stolen()
143 !__drm_mm_interval_first(>->i915->mm.stolen, in __igt_reset_stolen()
172 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in __igt_reset_stolen()
173 igt_global_reset_unlock(gt); in __igt_reset_stolen()
188 struct intel_gt *gt = arg; in igt_reset_engines_stolen() local
193 if (!intel_has_reset_engine(gt)) in igt_reset_engines_stolen()
196 for_each_engine(engine, gt, id) { in igt_reset_engines_stolen()
197 err = __igt_reset_stolen(gt, engine->mask, engine->name); in igt_reset_engines_stolen()
207 struct intel_gt *gt = arg; in igt_global_reset() local
214 igt_global_reset_lock(gt); in igt_global_reset()
215 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in igt_global_reset()
217 reset_count = i915_reset_count(>->i915->gpu_error); in igt_global_reset()
219 intel_gt_reset(gt, ALL_ENGINES, NULL); in igt_global_reset()
221 if (i915_reset_count(>->i915->gpu_error) == reset_count) { in igt_global_reset()
226 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in igt_global_reset()
227 igt_global_reset_unlock(gt); in igt_global_reset()
229 if (intel_gt_is_wedged(gt)) in igt_global_reset()
237 struct intel_gt *gt = arg; in igt_wedged_reset() local
242 igt_global_reset_lock(gt); in igt_wedged_reset()
243 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in igt_wedged_reset()
245 intel_gt_set_wedged(gt); in igt_wedged_reset()
247 GEM_BUG_ON(!intel_gt_is_wedged(gt)); in igt_wedged_reset()
248 intel_gt_reset(gt, ALL_ENGINES, NULL); in igt_wedged_reset()
250 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in igt_wedged_reset()
251 igt_global_reset_unlock(gt); in igt_wedged_reset()
253 return intel_gt_is_wedged(gt) ? -EIO : 0; in igt_wedged_reset()
258 struct intel_gt *gt = arg; in igt_atomic_reset() local
264 intel_gt_pm_get(gt); in igt_atomic_reset()
265 igt_global_reset_lock(gt); in igt_atomic_reset()
268 if (!igt_force_reset(gt)) in igt_atomic_reset()
276 awake = reset_prepare(gt); in igt_atomic_reset()
279 err = __intel_gt_reset(gt, ALL_ENGINES); in igt_atomic_reset()
282 reset_finish(gt, awake); in igt_atomic_reset()
291 igt_force_reset(gt); in igt_atomic_reset()
294 igt_global_reset_unlock(gt); in igt_atomic_reset()
295 intel_gt_pm_put(gt); in igt_atomic_reset()
302 struct intel_gt *gt = arg; in igt_atomic_engine_reset() local
310 if (!intel_has_reset_engine(gt)) in igt_atomic_engine_reset()
313 if (intel_uc_uses_guc_submission(>->uc)) in igt_atomic_engine_reset()
316 intel_gt_pm_get(gt); in igt_atomic_engine_reset()
317 igt_global_reset_lock(gt); in igt_atomic_engine_reset()
320 if (!igt_force_reset(gt)) in igt_atomic_engine_reset()
323 for_each_engine(engine, gt, id) { in igt_atomic_engine_reset()
360 igt_force_reset(gt); in igt_atomic_engine_reset()
363 igt_global_reset_unlock(gt); in igt_atomic_engine_reset()
364 intel_gt_pm_put(gt); in igt_atomic_engine_reset()
379 struct intel_gt *gt = &i915->gt; in intel_reset_live_selftests() local
381 if (!intel_has_gpu_reset(gt)) in intel_reset_live_selftests()
384 if (intel_gt_is_wedged(gt)) in intel_reset_live_selftests()
387 return intel_gt_live_subtests(tests, gt); in intel_reset_live_selftests()