Commit dec9cf9e authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Pull restoration of GGTT fences underneath the GT

Make the GT responsible for restoring its fence when it wakes up from
suspend.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200316113846.4974-2-chris@chris-wilson.co.uk
parent f899f786
...@@ -1195,6 +1195,8 @@ void i915_ggtt_resume(struct i915_ggtt *ggtt) ...@@ -1195,6 +1195,8 @@ void i915_ggtt_resume(struct i915_ggtt *ggtt)
if (INTEL_GEN(ggtt->vm.i915) >= 8) if (INTEL_GEN(ggtt->vm.i915) >= 8)
setup_private_pat(ggtt->vm.gt->uncore); setup_private_pat(ggtt->vm.gt->uncore);
intel_ggtt_restore_fences(ggtt);
} }
static struct scatterlist * static struct scatterlist *
......
...@@ -324,6 +324,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt) ...@@ -324,6 +324,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
{ {
GT_TRACE(gt, "\n"); GT_TRACE(gt, "\n");
intel_gt_init_swizzling(gt); intel_gt_init_swizzling(gt);
intel_ggtt_restore_fences(gt->ggtt);
return intel_uc_runtime_resume(&gt->uc); return intel_uc_runtime_resume(&gt->uc);
} }
......
...@@ -1288,7 +1288,6 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -1288,7 +1288,6 @@ static int i915_drm_resume(struct drm_device *dev)
drm_err(&dev_priv->drm, "failed to re-enable GGTT\n"); drm_err(&dev_priv->drm, "failed to re-enable GGTT\n");
i915_ggtt_resume(&dev_priv->ggtt); i915_ggtt_resume(&dev_priv->ggtt);
intel_ggtt_restore_fences(&dev_priv->ggtt);
intel_csr_ucode_resume(dev_priv); intel_csr_ucode_resume(dev_priv);
...@@ -1606,8 +1605,6 @@ static int intel_runtime_suspend(struct device *kdev) ...@@ -1606,8 +1605,6 @@ static int intel_runtime_suspend(struct device *kdev)
intel_gt_runtime_resume(&dev_priv->gt); intel_gt_runtime_resume(&dev_priv->gt);
intel_ggtt_restore_fences(&dev_priv->ggtt);
enable_rpm_wakeref_asserts(rpm); enable_rpm_wakeref_asserts(rpm);
return ret; return ret;
...@@ -1687,7 +1684,6 @@ static int intel_runtime_resume(struct device *kdev) ...@@ -1687,7 +1684,6 @@ static int intel_runtime_resume(struct device *kdev)
* we can do is to hope that things will still work (and disable RPM). * we can do is to hope that things will still work (and disable RPM).
*/ */
intel_gt_runtime_resume(&dev_priv->gt); intel_gt_runtime_resume(&dev_priv->gt);
intel_ggtt_restore_fences(&dev_priv->ggtt);
/* /*
* On VLV/CHV display interrupts are part of the display * On VLV/CHV display interrupts are part of the display
......
...@@ -1156,7 +1156,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv) ...@@ -1156,7 +1156,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
/* Minimal basic recovery for KMS */ /* Minimal basic recovery for KMS */
ret = i915_ggtt_enable_hw(dev_priv); ret = i915_ggtt_enable_hw(dev_priv);
i915_ggtt_resume(&dev_priv->ggtt); i915_ggtt_resume(&dev_priv->ggtt);
intel_ggtt_restore_fences(&dev_priv->ggtt);
intel_init_clock_gating(dev_priv); intel_init_clock_gating(dev_priv);
} }
......
...@@ -125,8 +125,6 @@ static void pm_resume(struct drm_i915_private *i915) ...@@ -125,8 +125,6 @@ static void pm_resume(struct drm_i915_private *i915)
*/ */
with_intel_runtime_pm(&i915->runtime_pm, wakeref) { with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
i915_ggtt_resume(&i915->ggtt); i915_ggtt_resume(&i915->ggtt);
intel_ggtt_restore_fences(&i915->ggtt);
i915_gem_resume(i915); i915_gem_resume(i915);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment