Re: [PATCH 19/20] drm/i915: Squelch reset messages during selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/21/2017 5:32 AM, Chris Wilson wrote:
During our selftests, we try reseting the GPU tens of thousands of
times, flooding the dmesg with out reset spam drowning out any potential
warnings. Add an option to i915_reset()/i915_reset_engine() to specify a
quiet reset for selftesting.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_drv.c                  | 48 +++++++++++++-----------
  drivers/gpu/drm/i915/i915_drv.h                  |  8 +++-
  drivers/gpu/drm/i915/i915_gem_request.c          |  2 +-
  drivers/gpu/drm/i915/i915_irq.c                  |  4 +-
  drivers/gpu/drm/i915/selftests/intel_hangcheck.c |  8 ++--
  5 files changed, 39 insertions(+), 31 deletions(-)

...
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 5244fb16fa55..469f854dd395 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2624,7 +2624,7 @@ static void i915_reset_device(struct drm_i915_private *dev_priv)
  		 */
  		do {
  			if (mutex_trylock(&dev_priv->drm.struct_mutex)) {
-				i915_reset(dev_priv);
+				i915_reset(dev_priv, 0);

I guess adding a wrapper to make flags=0 the default it's an overkill, plus I see the benefit of not flooding dmesg.

Reviewed-by: Michel Thierry <michel.thierry@xxxxxxxxx>

  				mutex_unlock(&dev_priv->drm.struct_mutex);
  			}
  		} while (wait_on_bit_timeout(&dev_priv->gpu_error.flags,
@@ -2739,7 +2739,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
  					     &dev_priv->gpu_error.flags))
  				continue;
- if (i915_reset_engine(engine) == 0)
+			if (i915_reset_engine(engine, 0) == 0)
  				engine_mask &= ~intel_engine_flag(engine);
clear_bit(I915_RESET_ENGINE + engine->id,
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index e83503db3b66..4129d01b67a1 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -342,7 +342,7 @@ static int igt_global_reset(void *arg)
  	mutex_lock(&i915->drm.struct_mutex);
  	reset_count = i915_reset_count(&i915->gpu_error);
- i915_reset(i915);
+	i915_reset(i915, I915_RESET_QUIET);
if (i915_reset_count(&i915->gpu_error) == reset_count) {
  		pr_err("No GPU reset recorded!\n");
@@ -378,7 +378,7 @@ static int igt_reset_engine(void *arg)
  		reset_engine_count = i915_reset_engine_count(&i915->gpu_error,
  							     engine);
- err = i915_reset_engine(engine);
+		err = i915_reset_engine(engine, I915_RESET_QUIET);
  		if (err) {
  			pr_err("i915_reset_engine failed\n");
  			break;
@@ -512,7 +512,7 @@ static int igt_reset_active_engines(void *arg)
set_bit(I915_RESET_ENGINE + engine->id, &i915->gpu_error.flags);
  		do {
-			err = i915_reset_engine(engine);
+			err = i915_reset_engine(engine, I915_RESET_QUIET);
  			if (err) {
  				pr_err("i915_reset_engine(%s) failed, err=%d\n",
  				       engine->name, err);
@@ -716,7 +716,7 @@ static int igt_reset_queue(void *arg)
reset_count = fake_hangcheck(prev); - i915_reset(i915);
+			i915_reset(i915, I915_RESET_QUIET);
GEM_BUG_ON(test_bit(I915_RESET_HANDOFF,
  					    &i915->gpu_error.flags));

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux