diff mbox series

[2/2] drm/i915: Extend reset modparam to domain resets

Message ID 20190514164653.935-2-stuart.summers@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Re-add enable_rc6 modparam | expand

Commit Message

Summers, Stuart May 14, 2019, 4:46 p.m. UTC
In the event a platform does not properly implement reset,
do not go through reset flows for engine domains to avoid
an unlikely situation where writes are accepted but register
values are never cleared, as this can result in GPU wedges
in these cases.

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Chris Wilson May 14, 2019, 4:54 p.m. UTC | #1
Quoting Stuart Summers (2019-05-14 17:46:53)
> In the event a platform does not properly implement reset,

Then don't enable reset.
-Chris
Summers, Stuart May 14, 2019, 5:03 p.m. UTC | #2
On Tue, 2019-05-14 at 17:54 +0100, Chris Wilson wrote:
> Quoting Stuart Summers (2019-05-14 17:46:53)
> > In the event a platform does not properly implement reset,
> 
> Then don't enable reset.

Hey Chris,

I'm not sure I fully understand your comment here. The module parameter
is there to do just this. This patch simply extends the usage to apply
to these engine domains as well.

Thanks,
Stuart

> -Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index 464369bc55ad..81f9f9f73b1c 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -309,6 +309,12 @@  static int gen6_hw_domain_reset(struct drm_i915_private *i915,
 	struct intel_uncore *uncore = &i915->uncore;
 	int err;
 
+	if (!i915_modparams.reset) {
+		DRM_DEBUG_DRIVER("Skipping 0x%08x engines reset\n",
+				 hw_domain_mask);
+		return 0;
+	}
+
 	/*
 	 * GEN6_GDRST is not in the gt power well, no need to check
 	 * for fifo space for the write or forcewake the chip for
@@ -517,6 +523,13 @@  static int gen8_engine_reset_prepare(struct intel_engine_cs *engine)
 		return 0;
 	}
 
+	if (!i915_modparams.reset) {
+		DRM_DEBUG_DRIVER("Skipping %s reset request {request: %08x, RESET_CTL: %08x}\n",
+				 engine->name, request,
+				 intel_uncore_read_fw(uncore, reg));
+		return 0;
+	}
+
 	intel_uncore_write_fw(uncore, reg, _MASKED_BIT_ENABLE(request));
 	ret = __intel_wait_for_register_fw(uncore, reg, mask, ack,
 					   700, 0, NULL);