Re: [PATCH 042/190] drm/i915: Clean up GPU hang message

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

 



On 11/01/2016 09:16, Chris Wilson wrote:
Remove some redundant kernel messages as we deduce a hung GPU and
capture the error state.

v2: Fix "hang" vs "no progress" message whilst I was there

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_irq.c | 21 +++++++--------------
  1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d9757d227c86..ce52d7d9ad91 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3031,8 +3031,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
  	struct drm_device *dev = dev_priv->dev;
  	struct intel_engine_cs *ring;
  	int i;
-	int busy_count = 0, rings_hung = 0;
-	bool stuck[I915_NUM_RINGS] = { 0 };
+	int busy_count = 0;
  #define BUSY 1
  #define KICK 5
  #define HUNG 20
@@ -3108,7 +3107,6 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
  					break;
  				case HANGCHECK_HUNG:
  					ring->hangcheck.score += HUNG;
-					stuck[i] = true;
  					break;
  				}
  			}
@@ -3134,17 +3132,12 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
  		busy_count += busy;
  	}

-	for_each_ring(ring, dev_priv, i) {
-		if (ring->hangcheck.score >= HANGCHECK_SCORE_RING_HUNG) {
-			DRM_INFO("%s on %s\n",
-				 stuck[i] ? "stuck" : "no progress",
-				 ring->name);
-			rings_hung++;

this is required when engine resets are supported. I am converting this to an engine_mask and send it directly to i915_handle_error().

regards
Arun

-		}
-	}
-
-	if (rings_hung)
-		return i915_handle_error(dev, true, "Ring hung");
+	for_each_ring(ring, dev_priv, i)
+		if (ring->hangcheck.score >= HANGCHECK_SCORE_RING_HUNG)
+			return i915_handle_error(dev, true,
+						 "%s on %s",
+						 ring->hangcheck.action == HANGCHECK_HUNG ? "Hang" : "No progress" ,
+						 ring->name);

  	/* Reset timer in case GPU hangs without another request being added */
  	if (busy_count)


_______________________________________________
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