[Intel-gfx] [PATCH 1/2] drm/i915/gt: obey "reset" module parameter

Marcin Ślusarz marcin.slusarz at gmail.com
Tue Aug 18 11:36:07 UTC 2020


From: Marcin Ślusarz <marcin.slusarz at intel.com>

For some reason intel_gt_reset attempts to reset the GPU twice.
On one code path (do_reset) "reset" parameter is obeyed, but is
not on the other one (__intel_gt_set_wedged).

Fix this.

I noticed this because I stumbled on a bug which completely locks
up a machine on reset (preventing me from saving the error state)
and i915.reset=0 wasn't working as expected.

Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c
b/drivers/gpu/drm/i915/gt/intel_reset.c
index 39070b514e65..f4823ca2d71f 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -816,7 +816,8 @@ static void __intel_gt_set_wedged(struct intel_gt *gt)
     awake = reset_prepare(gt);

     /* Even if the GPU reset fails, it should still stop the engines */
-    if (!INTEL_INFO(gt->i915)->gpu_reset_clobbers_display)
+    if (!INTEL_INFO(gt->i915)->gpu_reset_clobbers_display &&
+            i915_modparams.reset)
         __intel_gt_reset(gt, ALL_ENGINES);

     for_each_engine(engine, gt, id)
-- 
2.20.1


More information about the Intel-gfx mailing list