]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gt: Pull restoration of GGTT fences underneath the GT
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Mar 2020 11:38:44 +0000 (11:38 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Mar 2020 20:28:28 +0000 (20:28 +0000)
Make the GT responsible for restoring its fence when it wakes up from
suspend.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200316113846.4974-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_ggtt.c
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/selftests/i915_gem.c

index a7b72fa569a7f42db71440ff29ecad298705b0f6..bde4f64a41f7e042a9c8f9e00c383d5b0d480d35 100644 (file)
@@ -1195,6 +1195,8 @@ void i915_ggtt_resume(struct i915_ggtt *ggtt)
 
        if (INTEL_GEN(ggtt->vm.i915) >= 8)
                setup_private_pat(ggtt->vm.gt->uncore);
+
+       intel_ggtt_restore_fences(ggtt);
 }
 
 static struct scatterlist *
index 8b653c0f5e5f91e364c65ef97cddc580491badd3..2e40400d1ecdf6502a70bdea8bab1226f84ea38f 100644 (file)
@@ -324,6 +324,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
 {
        GT_TRACE(gt, "\n");
        intel_gt_init_swizzling(gt);
+       intel_ggtt_restore_fences(gt->ggtt);
 
        return intel_uc_runtime_resume(&gt->uc);
 }
index 9327d56dba5aa257618f2542836cea33d2515cb9..265a9df153c8148c7c44fc22fa18380f9dcf48b5 100644 (file)
@@ -1288,7 +1288,6 @@ static int i915_drm_resume(struct drm_device *dev)
                drm_err(&dev_priv->drm, "failed to re-enable GGTT\n");
 
        i915_ggtt_resume(&dev_priv->ggtt);
-       intel_ggtt_restore_fences(&dev_priv->ggtt);
 
        intel_csr_ucode_resume(dev_priv);
 
@@ -1606,8 +1605,6 @@ static int intel_runtime_suspend(struct device *kdev)
 
                intel_gt_runtime_resume(&dev_priv->gt);
 
-               intel_ggtt_restore_fences(&dev_priv->ggtt);
-
                enable_rpm_wakeref_asserts(rpm);
 
                return ret;
@@ -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).
         */
        intel_gt_runtime_resume(&dev_priv->gt);
-       intel_ggtt_restore_fences(&dev_priv->ggtt);
 
        /*
         * On VLV/CHV display interrupts are part of the display
index 2c53be0bd9fdb52a0bf9bbb22dd045338ab7c224..762b50b08d731fd8a185e858ac0c4a4503d54f58 100644 (file)
@@ -1156,7 +1156,6 @@ err_unlock:
                /* Minimal basic recovery for KMS */
                ret = i915_ggtt_enable_hw(dev_priv);
                i915_ggtt_resume(&dev_priv->ggtt);
-               intel_ggtt_restore_fences(&dev_priv->ggtt);
                intel_init_clock_gating(dev_priv);
        }
 
index 7ea517a21e0b4adccbb5d2b1cd3487df7d1c367d..88d400b9df88c35c4544c64d1ab6c1e0b02eb649 100644 (file)
@@ -125,8 +125,6 @@ static void pm_resume(struct drm_i915_private *i915)
         */
        with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
                i915_ggtt_resume(&i915->ggtt);
-               intel_ggtt_restore_fences(&i915->ggtt);
-
                i915_gem_resume(i915);
        }
 }