Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09e14bf3 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm/i915: Capture the initial error-state when kicking stuck rings



We lost the ability to capture the first error for a stuck ring in the
recent hangcheck robustification. Whilst both error states are
interesting (why does the GPU not recover is also essential to debug),
our primary goal is to fix the initial hang and so we need to capture
the first error state upon taking hangcheck action.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4c445e0e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1988,6 +1988,7 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
	if (tmp & RING_WAIT) {
	if (tmp & RING_WAIT) {
		DRM_ERROR("Kicking stuck wait on %s\n",
		DRM_ERROR("Kicking stuck wait on %s\n",
			  ring->name);
			  ring->name);
		i915_handle_error(dev, false);
		I915_WRITE_CTL(ring, tmp);
		I915_WRITE_CTL(ring, tmp);
		return HANGCHECK_KICK;
		return HANGCHECK_KICK;
	}
	}
@@ -1999,6 +2000,7 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
		case 1:
		case 1:
			DRM_ERROR("Kicking stuck semaphore on %s\n",
			DRM_ERROR("Kicking stuck semaphore on %s\n",
				  ring->name);
				  ring->name);
			i915_handle_error(dev, false);
			I915_WRITE_CTL(ring, tmp);
			I915_WRITE_CTL(ring, tmp);
			return HANGCHECK_KICK;
			return HANGCHECK_KICK;
		case 0:
		case 0: