drm/i915: Clean steer semaphore on resume
authorNirmoy Das <nirmoy.das@intel.com>
Thu, 28 Sep 2023 13:00:14 +0000 (15:00 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Fri, 29 Sep 2023 07:11:55 +0000 (09:11 +0200)
During resume, the steer semaphore on GT1 was observed to be held. The
hardware team has confirmed the safety of clearing steer semaphores
for all GTs during driver load/resume, as no lock acquisitions can occur
in this process by other agents.

v2: reset on resume not in intel_gt_init().
v3: do the reset on intel_gt_resume_early()
v4: do general sanitization for all GTs(Matt)

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230928130015.6758-3-nirmoy.das@intel.com
drivers/gpu/drm/i915/gt/intel_gt_pm.c

index dab73980c9f1d1ae7b8f673029421df935cb392a..3461f3e742778336e8ff4aa5fdf9d5adfe3daed1 100644 (file)
@@ -13,6 +13,7 @@
 #include "intel_engine_pm.h"
 #include "intel_gt.h"
 #include "intel_gt_clock_utils.h"
+#include "intel_gt_mcr.h"
 #include "intel_gt_pm.h"
 #include "intel_gt_print.h"
 #include "intel_gt_requests.h"
@@ -218,6 +219,15 @@ void intel_gt_pm_fini(struct intel_gt *gt)
 
 void intel_gt_resume_early(struct intel_gt *gt)
 {
+       /*
+        * Sanitize steer semaphores during driver resume. This is necessary
+        * to address observed cases of steer semaphores being
+        * held after a suspend operation. Confirmation from the hardware team
+        * assures the safety of this operation, as no lock acquisitions
+        * by other agents occur during driver load/resume process.
+        */
+       intel_gt_mcr_lock_sanitize(gt);
+
        intel_uncore_resume_early(gt->uncore);
        intel_gt_check_and_clear_faults(gt);
 }