]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gt: Sanitize RPS interrupts upon resume
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 2 May 2020 17:35:12 +0000 (18:35 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 3 May 2020 07:24:36 +0000 (08:24 +0100)
Currently we clear and disable the RPS pm interrupts on module load, and
presume that they remain disabled forevermore. However, the mask is
cleared on suspend and so after resume they may start showing up again
unexepectedly.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1811
Fixes: 749d0c2f40b5 ("drm/i915/gt: Track use of RPS interrupts in flags")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi@etezian.org>
Reviewed-by: Andi Shyti <andi@etezian.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200502173512.32353-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/gt/intel_rps.c
drivers/gpu/drm/i915/gt/intel_rps.h

index 5097786f43759dad770f194fb863737c2b2ad529..e59776485457375c2072cebe24d5159bc99c27a6 100644 (file)
@@ -171,6 +171,8 @@ static void gt_sanitize(struct intel_gt *gt, bool force)
                if (engine->reset.finish)
                        engine->reset.finish(engine);
 
+       intel_rps_sanitize(&gt->rps);
+
        intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
        intel_runtime_pm_put(gt->uncore->rpm, wakeref);
 }
index c682355ec79e33222b6c91e9ac8532be3346dc7b..2f59fc6df3c21173cb039849507dc79162ee10ea 100644 (file)
@@ -1844,8 +1844,11 @@ void intel_rps_init(struct intel_rps *rps)
 
        if (INTEL_GEN(i915) >= 8 && INTEL_GEN(i915) < 11)
                rps->pm_intrmsk_mbz |= GEN8_PMINTR_DISABLE_REDIRECT_TO_GUC;
+}
 
-       if (INTEL_GEN(i915) >= 6)
+void intel_rps_sanitize(struct intel_rps *rps)
+{
+       if (INTEL_GEN(rps_to_i915(rps)) >= 6)
                rps_disable_interrupts(rps);
 }
 
index af07fa5b7584eba24c4d607206055c63609c5158..8d3c9d6636623a2aa38df6fc37a3b6b8be24b190 100644 (file)
@@ -13,6 +13,7 @@ struct i915_request;
 
 void intel_rps_init_early(struct intel_rps *rps);
 void intel_rps_init(struct intel_rps *rps);
+void intel_rps_sanitize(struct intel_rps *rps);
 
 void intel_rps_driver_register(struct intel_rps *rps);
 void intel_rps_driver_unregister(struct intel_rps *rps);