{
GEM_TRACE("%s\n", dev_name(i915->drm.dev));
- intel_uncore_forcewake_get(&i915->uncore, FORCEWAKE_ALL);
-
- if (intel_gt_init_hw(&i915->gt))
- goto err_wedged;
-
/*
* As we didn't flush the kernel context before suspend, we cannot
* guarantee that the context image is complete. So let's just reset
* it and start again.
*/
- if (intel_gt_resume(&i915->gt))
- goto err_wedged;
-
-out_unlock:
- intel_uncore_forcewake_put(&i915->uncore, FORCEWAKE_ALL);
- return;
-
-err_wedged:
- if (!intel_gt_is_wedged(&i915->gt)) {
- dev_err(i915->drm.dev,
- "Failed to re-initialize GPU, declaring it wedged!\n");
- intel_gt_set_wedged(&i915->gt);
- }
- goto out_unlock;
+ intel_gt_resume(&i915->gt);
}
intel_uc_init(>->uc);
- err = intel_gt_init_hw(gt);
- if (err)
- goto err_uc_init;
-
- /* Only when the HW is re-initialised, can we replay the requests */
err = intel_gt_resume(gt);
if (err)
- goto err_gt_init_hw;
+ goto err_uc_init;
err = __engines_record_defaults(gt);
if (err)
goto out_fw;
err_gt:
__intel_gt_disable(gt);
-err_gt_init_hw:
intel_uc_fini_hw(>->uc);
err_uc_init:
intel_uc_fini(>->uc);
{
struct intel_engine_cs *engine;
enum intel_engine_id id;
- int err = 0;
+ int err;
GT_TRACE(gt, "\n");
intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
intel_rc6_sanitize(>->rc6);
+ /* Only when the HW is re-initialised, can we replay the requests */
+ err = intel_gt_init_hw(gt);
+ if (err) {
+ dev_err(gt->i915->drm.dev,
+ "Failed to initialize GPU, declaring it wedged!\n");
+ intel_gt_set_wedged(gt);
+ goto err_fw;
+ }
+
intel_rps_enable(>->rps);
intel_llc_enable(>->llc);
user_forcewake(gt, false);
+err_fw:
intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
intel_gt_pm_put(gt);