Skip to contentSkip to conversation

drm/i915: Avoid stuck page flip waiters on GPU reset

PATCH Applied [email protected] 4 participants 28 messages Jan 29, 2013 – Feb 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover drm/i915: Avoid stuck page flip waiters on GPU reset

Someone mentioned on irc that intel_crtc_wait_for_pending_flips() was getting stuck in some cases. This rang a bell since I was poking around that stuff last year.

The issue that I'm trying to fix here is processes getting stuck in D state when a GPU reset happens while page flips have been scheduled.

Testing is easy 1) fire up 'glxgears -fullscreen', run 'gem_hang 0', try to VT switch. Without this series X and some kworker soon get stuck in D state and you're left with a useless box. With the patch set, you wait a while, the GPU hangcheck kicks in, and you get your console back.

The irc discussion was apparently about [1], but since the dmesg there doesn't show a GPU hang, I don't see this patch set fixing it. Frankly, I have no idea what's happening there.

Additional work after this would involve sending out pending page flip events. Currently if you don't do the VT switch after a hang, glxgears remains stuck because the X server didn't get the page flip event from the kernel. Also we should probably do an explicit intel_pipe_set_base() with the current fb, to make sure we show the correct fb after the hang. But I'm not going to touch these right now. Actually I'm hoping someone else will volunteer for these tasks ;)

[1] https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1097315

#1 lore raw

PATCH 1/6 drm/i915: Kill obj->pending_flip

From: Ville Syrjälä <[email protected]>

The pending flip mask no longer set anywhere, so trying to wait for while it's non-zero is a no-op. Remove it completely.

---
 drivers/gpu/drm/i915/i915_drv.h      | 7 -------
 drivers/gpu/drm/i915/intel_display.c | 6 ------
 2 files changed, 13 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -7
index 4a4d8bd..3a08a3a 100644
@@ -1208,13 +1208,6 @@ struct drm_i915_gem_object {
 
 	/** for phy allocated objects */
 	struct drm_i915_gem_phys_object *phys_obj;
-
-	/**
-	 * Number of crtcs where this object is currently the fb, but
-	 * will be page flipped away on the next vblank.  When it
-	 * reaches 0, dev_priv->pending_flip_queue will be woken up.
-	 */
-	atomic_t pending_flip;
 };
 #define to_gem_object(obj) (&((struct drm_i915_gem_object *)(obj))->base)
 
drivers/gpu/drm/i915/intel_display.c +0 -6
index 796090e..4097118 100644
@@ -2220,12 +2220,6 @@ intel_finish_fb(struct drm_framebuffer *old_fb)
 	bool was_interruptible = dev_priv->mm.interruptible;
 	int ret;
 
-	WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
-
-	wait_event(dev_priv->pending_flip_queue,
-		   i915_reset_in_progress(&dev_priv->gpu_error) ||
-		   atomic_read(&obj->pending_flip) == 0);
-
 	/* Big Hammer, we also need to ensure that any pending
 	 * MI_WAIT_FOR_EVENT inside a user batch buffer on the
 	 * current scanout is retired before unpinning the old
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 1/6] drm/i915: Kill obj->pending_flip

Quoted 9 lines · Damien Lespiau
Quoted 6 lines · On Tue, Jan 29, 2013 at 06:13:33PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

The pending flip mask no longer set anywhere, so trying to wait for while it's non-zero is a no-op. Remove it completely.

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#4 lore raw

PATCH 2/6 drm/i915: Don't wait for page flips if there was GPU reset

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

---
 drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++-
 drivers/gpu/drm/i915/intel_drv.h     |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +13 -1
index 4097118..e348a68 100644
@@ -2862,10 +2862,12 @@ static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	unsigned long flags;
 	bool pending;
 
-	if (i915_reset_in_progress(&dev_priv->gpu_error))
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
 		return false;
 
 	spin_lock_irqsave(&dev->event_lock, flags);
@@ -6912,6 +6914,8 @@ static int intel_gen2_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	/* Can't queue multiple flips, so wait for the previous
 	 * one to finish before executing the next.
 	 */
@@ -6956,6 +6960,8 @@ static int intel_gen3_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	if (intel_crtc->plane)
 		flip_mask = MI_WAIT_FOR_PLANE_B_FLIP;
 	else
@@ -6997,6 +7003,8 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	/* i965+ uses the linear or tiled offsets from the
 	 * Display Registers (which do not change across a page-flip)
 	 * so we need only reprogram the base address.
@@ -7045,6 +7053,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP |
 			MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
 	intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode);
@@ -7111,6 +7121,8 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | plane_bit);
 	intel_ring_emit(ring, (fb->pitches[0] | obj->tiling_mode));
 	intel_ring_emit(ring, obj->gtt_offset + intel_crtc->dspaddr_offset);
drivers/gpu/drm/i915/intel_drv.h +3 -0
index fcdfe42..a5521d9 100644
@@ -235,6 +235,9 @@ struct intel_crtc {
 	/* We can share PLLs across outputs if the timings match */
 	struct intel_pch_pll *pch_pll;
 	uint32_t ddi_pll_sel;
+
+	/* reset counter value when the last flip was submitted */
+	unsigned int reset_counter;
 };
 
 struct intel_plane {
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/6
#5 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

Quoted 10 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

You might want to rename reset_counter to flip_reset_counter to indicate this field is specific to the flipping code. Other parts of the code might need something similar as well?

Signature · 1 line
Damien
#6 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

Quoted 10 lines · Damien Lespiau
Quoted 9 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

Quoted 7 lines
Quoted 1 line

You might want to rename reset_counter to flip_reset_counter to indicate this field is specific to the flipping code. Other parts of the code might need something similar as well?

IIRC I used flip_reset_counter initially but then I decided it's too long and dropped the flip_ part. I can change it back if that's what people prefer.

Signature · 2 lines
Ville Syrjälä
Intel OTC
#7 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Damien Lespiau
Quoted 10 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

Quoted 7 lines
Quoted 3 lines

You might want to rename reset_counter to flip_reset_counter to indicate this field is specific to the flipping code. Other parts of the code might need something similar as well?

IIRC I used flip_reset_counter initially but then I decided it's too long and dropped the flip_ part. I can change it back if that's what people prefer.

Imo the generic reset_counter name is ok. At least as long as we don't need to keep track of more than one of these per crtc for different things (or if we ever start to add more fine-grained reset domains). -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#8 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

In reply to [email protected]
Quoted 34 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

---
 drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++-
 drivers/gpu/drm/i915/intel_drv.h     |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +3 -1
index 4097118..e348a68 100644
@@ -2862,10 +2862,12 @@ static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	unsigned long flags;
 	bool pending;
 
-	if (i915_reset_in_progress(&dev_priv->gpu_error))
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
 		return false;
 
 	spin_lock_irqsave(&dev->event_lock, flags);

drivers/gpu/drm/i915/intel_display.c static int intel_gen2_queue_flip(struct drm_device *dev, · line 6917

Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -6912,6 +6914,8 @@ static int intel_gen2_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);

Ok no bikeshed about ->reset_counter, but a different one: Why does this need to be in the per-gen callback? Can't we just grab this before we call down into these callbacks? Imo races wrt the reset/hang code don't matter that much as long as we don't wait forever for a pageflip which won't happen. Hanging the gpu concurrently to pageflipping is undefined anyway right now ...
-Daniel

Quoted 61 lines
drivers/gpu/drm/i915/intel_display.c +9 -0
+
 	/* Can't queue multiple flips, so wait for the previous
 	 * one to finish before executing the next.
 	 */
@@ -6956,6 +6960,8 @@ static int intel_gen3_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	if (intel_crtc->plane)
 		flip_mask = MI_WAIT_FOR_PLANE_B_FLIP;
 	else
@@ -6997,6 +7003,8 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	/* i965+ uses the linear or tiled offsets from the
 	 * Display Registers (which do not change across a page-flip)
 	 * so we need only reprogram the base address.
@@ -7045,6 +7053,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP |
 			MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
 	intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode);
@@ -7111,6 +7121,8 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | plane_bit);
 	intel_ring_emit(ring, (fb->pitches[0] | obj->tiling_mode));
 	intel_ring_emit(ring, obj->gtt_offset + intel_crtc->dspaddr_offset);
drivers/gpu/drm/i915/intel_drv.h +3 -0
index fcdfe42..a5521d9 100644
@@ -235,6 +235,9 @@ struct intel_crtc {
 	/* We can share PLLs across outputs if the timings match */
 	struct intel_pch_pll *pch_pll;
 	uint32_t ddi_pll_sel;
+
+	/* reset counter value when the last flip was submitted */
+	unsigned int reset_counter;
 };
 
 struct intel_plane {
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#9 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

Quoted 38 lines · Daniel Vetter
Quoted 37 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

---
 drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++-
 drivers/gpu/drm/i915/intel_drv.h     |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +3 -1
index 4097118..e348a68 100644
@@ -2862,10 +2862,12 @@ static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	unsigned long flags;
 	bool pending;
 
-	if (i915_reset_in_progress(&dev_priv->gpu_error))
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
 		return false;
 
 	spin_lock_irqsave(&dev->event_lock, flags);
@@ -6912,6 +6914,8 @@ static int intel_gen2_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static int intel_gen2_queue_flip(struct drm_device *dev, · line 6917

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);

Ok no bikeshed about ->reset_counter, but a different one: Why does this need to be in the per-gen callback? Can't we just grab this before we call down into these callbacks? Imo races wrt the reset/hang code don't matter that much as long as we don't wait forever for a pageflip which won't happen. Hanging the gpu concurrently to pageflipping is undefined anyway right now ...

Yeah. It could be moved to happen a little earlier, and thus avoid the duplication.

Quoted 68 lines

-Daniel

Quoted 61 lines
drivers/gpu/drm/i915/intel_display.c +9 -0
+
 	/* Can't queue multiple flips, so wait for the previous
 	 * one to finish before executing the next.
 	 */
@@ -6956,6 +6960,8 @@ static int intel_gen3_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	if (intel_crtc->plane)
 		flip_mask = MI_WAIT_FOR_PLANE_B_FLIP;
 	else
@@ -6997,6 +7003,8 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	/* i965+ uses the linear or tiled offsets from the
 	 * Display Registers (which do not change across a page-flip)
 	 * so we need only reprogram the base address.
@@ -7045,6 +7053,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP |
 			MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
 	intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode);
@@ -7111,6 +7121,8 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
+
 	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | plane_bit);
 	intel_ring_emit(ring, (fb->pitches[0] | obj->tiling_mode));
 	intel_ring_emit(ring, obj->gtt_offset + intel_crtc->dspaddr_offset);
drivers/gpu/drm/i915/intel_drv.h +3 -0
index fcdfe42..a5521d9 100644
@@ -235,6 +235,9 @@ struct intel_crtc {
 	/* We can share PLLs across outputs if the timings match */
 	struct intel_pch_pll *pch_pll;
 	uint32_t ddi_pll_sel;
+
+	/* reset counter value when the last flip was submitted */
+	unsigned int reset_counter;
 };
 
 struct intel_plane {
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 2 lines
Ville Syrjälä
Intel OTC
#10 lore raw

Re: [PATCH 2/6] drm/i915: Don't wait for page flips if there was GPU reset

Quoted 48 lines · Ville Syrjälä
Quoted 38 lines · Daniel Vetter
Quoted 37 lines · On Tue, Jan 29, 2013 at 06:13:34PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If a GPU reset occurs while a page flip has been submitted to the ring, the flip will never complete once the ring has been reset.

The GPU reset can be detected by sampling the reset_counter before the flip is submitted, and then while waiting for the flip, the sampled counter is compared with the current reset_counter value.

---
 drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++-
 drivers/gpu/drm/i915/intel_drv.h     |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +3 -1
index 4097118..e348a68 100644
@@ -2862,10 +2862,12 @@ static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	unsigned long flags;
 	bool pending;
 
-	if (i915_reset_in_progress(&dev_priv->gpu_error))
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
 		return false;
 
 	spin_lock_irqsave(&dev->event_lock, flags);
@@ -6912,6 +6914,8 @@ static int intel_gen2_queue_flip(struct drm_device *dev,
 	if (ret)
 		goto err_unpin;
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static int intel_gen2_queue_flip(struct drm_device *dev, · line 6917

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+	intel_crtc->reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);

Ok no bikeshed about ->reset_counter, but a different one: Why does this need to be in the per-gen callback? Can't we just grab this before we call down into these callbacks? Imo races wrt the reset/hang code don't matter that much as long as we don't wait forever for a pageflip which won't happen. Hanging the gpu concurrently to pageflipping is undefined anyway right now ...

Quoted 2 lines

Yeah. It could be moved to happen a little earlier, and thus avoid the duplication.

Applied the patch and moved the assignment around a bit, thanks. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#11 lore raw

PATCH 3/6 drm/i915: Wake up pending_flip_queue as part of reset handling

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Someone may be waiting for a flip that will never complete due to a GPU reset. Wake up all such waiters when the hang is first detected, and after the reset processing has finished.

---
 drivers/gpu/drm/i915/i915_irq.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/i915_irq.c +4 -0
index 13bb8d3..8b1146b 100644
@@ -915,6 +915,8 @@ static void i915_error_work_func(struct work_struct *work)
 		for_each_ring(ring, dev_priv, i)
 			wake_up_all(&ring->irq_queue);
 
+		wake_up_all(&dev_priv->pending_flip_queue);
+
 		wake_up_all(&dev_priv->gpu_error.reset_queue);
 	}
 }
@@ -1540,6 +1542,8 @@ void i915_handle_error(struct drm_device *dev, bool wedged)
 		 */
 		for_each_ring(ring, dev_priv, i)
 			wake_up_all(&ring->irq_queue);
+
+		wake_up_all(&dev_priv->pending_flip_queue);
 	}
 
 	queue_work(dev_priv->wq, &dev_priv->gpu_error.work);
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 3/6
#12 lore raw

Re: [PATCH 3/6] drm/i915: Wake up pending_flip_queue as part of reset handling

Quoted 7 lines · On Tue, Jan 29, 2013 at 06:13:35PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Someone may be waiting for a flip that will never complete due to a GPU reset. Wake up all such waiters when the hang is first detected, and after the reset processing has finished.

Signature · 1 line
Damien
#13 lore raw

Re: [PATCH 3/6] drm/i915: Wake up pending_flip_queue as part of reset handling

In reply to [email protected]
Quoted 25 lines · On Tue, Jan 29, 2013 at 06:13:35PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Someone may be waiting for a flip that will never complete due to a GPU reset. Wake up all such waiters when the hang is first detected, and after the reset processing has finished.

---
 drivers/gpu/drm/i915/i915_irq.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/i915_irq.c +2 -0
index 13bb8d3..8b1146b 100644
@@ -915,6 +915,8 @@ static void i915_error_work_func(struct work_struct *work)
 		for_each_ring(ring, dev_priv, i)
 			wake_up_all(&ring->irq_queue);
 
+		wake_up_all(&dev_priv->pending_flip_queue);
+
 		wake_up_all(&dev_priv->gpu_error.reset_queue);
 	}
 }

drivers/gpu/drm/i915/i915_irq.c void i915_handle_error(struct drm_device *dev, bool wedged) · line 1546

Quoted 5 lines
drivers/gpu/drm/i915/i915_irq.c +2 -0
@@ -1540,6 +1542,8 @@ void i915_handle_error(struct drm_device *dev, bool wedged)
 		 */
 		for_each_ring(ring, dev_priv, i)
 			wake_up_all(&ring->irq_queue);
+
+		wake_up_all(&dev_priv->pending_flip_queue);

I don't quite follow why we need this one here. The wake up for the ring irq queues is to get people off the dev->struct_mutex lock, which the reset handler needs to acquire to do its job. But process stalling for pageflips to complete already can't hold dev->struct_mutex, since otherwise they'd block out the pageflip completion works and so would deadlock already.

Is there another reason why we need to kick waiters before the reset has completed that I'm missing here? One potential issue would be clarifying what exactly happens when the gpu hangs while pageflipping, i.e. whether the kernel should go out of it's way and re-issue the pageflip if it died meanwhile. But even that could be scheduled from a workqueue I think. And even if that'd require us to kick waiters of the pending flip queue I'd prefer to only add it once we really need it (plus a big comment explaining the tricks).
-Daniel

Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +0 -0
 	}
 
 	queue_work(dev_priv->wq, &dev_priv->gpu_error.work);
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#14 lore raw

PATCH 4/6 drm/i915: Move intel_crtc_has_pending_flip() earlier

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Just shuffle the code around. No functional changes.

---
 drivers/gpu/drm/i915/intel_display.c | 38 ++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/intel_display.c +19 -19
index e348a68..6c21985 100644
@@ -2262,6 +2262,25 @@ static void intel_crtc_update_sarea_pos(struct drm_crtc *crtc, int x, int y)
 	}
 }
 
+static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
+{
+	struct drm_device *dev = crtc->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+	unsigned long flags;
+	bool pending;
+
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
+		return false;
+
+	spin_lock_irqsave(&dev->event_lock, flags);
+	pending = to_intel_crtc(crtc)->unpin_work != NULL;
+	spin_unlock_irqrestore(&dev->event_lock, flags);
+
+	return pending;
+}
+
 static int
 intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 		    struct drm_framebuffer *fb)
@@ -2858,25 +2877,6 @@ static void ironlake_fdi_disable(struct drm_crtc *crtc)
 	udelay(100);
 }
 
-static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
-{
-	struct drm_device *dev = crtc->dev;
-	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-	unsigned long flags;
-	bool pending;
-
-	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
-	    intel_crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
-		return false;
-
-	spin_lock_irqsave(&dev->event_lock, flags);
-	pending = to_intel_crtc(crtc)->unpin_work != NULL;
-	spin_unlock_irqrestore(&dev->event_lock, flags);
-
-	return pending;
-}
-
 static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw

PATCH 5/6 drm/i915: Add intel_crtc_wait_for_pending_flips_locked()

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Move the functionality of intel_crtc_wait_for_pending_flips() into intel_crtc_wait_for_pending_flips_locked().

intel_crtc_wait_for_pending_flips() is now just a wrapper that grab struct_mutex and calls intel_crtc_wait_for_pending_flips_locked().

This changes the behaviour of intel_crtc_wait_for_pending_flips() so that it now holds struct_mutex while waiting for pending flips.

---
 drivers/gpu/drm/i915/intel_display.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +17 -7
index 6c21985..a2e04f7 100644
@@ -2281,6 +2281,22 @@ static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
 	return pending;
 }
 
+static void intel_crtc_wait_for_pending_flips_locked(struct drm_crtc *crtc)
+{
+	struct drm_device *dev = crtc->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (crtc->fb == NULL)
+		return;
+
+	WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
+
+	wait_event(dev_priv->pending_flip_queue,
+		   !intel_crtc_has_pending_flip(crtc));
+
+	intel_finish_fb(crtc->fb);
+}
+
 static int
 intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 		    struct drm_framebuffer *fb)
@@ -2880,18 +2896,12 @@ static void ironlake_fdi_disable(struct drm_crtc *crtc)
 static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
-	struct drm_i915_private *dev_priv = dev->dev_private;
 
 	if (crtc->fb == NULL)
 		return;
 
-	WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
-
-	wait_event(dev_priv->pending_flip_queue,
-		   !intel_crtc_has_pending_flip(crtc));
-
 	mutex_lock(&dev->struct_mutex);
-	intel_finish_fb(crtc->fb);
+	intel_crtc_wait_for_pending_flips_locked(crtc);
 	mutex_unlock(&dev->struct_mutex);
 }
 
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 5/6
#17 lore raw

Re: [PATCH 5/6] drm/i915: Add intel_crtc_wait_for_pending_flips_locked()

Quoted 5 lines · On Tue, Jan 29, 2013 at 06:13:37PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Move the functionality of intel_crtc_wait_for_pending_flips() into intel_crtc_wait_for_pending_flips_locked().

Quoted 7 lines

intel_crtc_wait_for_pending_flips() is now just a wrapper that grab struct_mutex and calls intel_crtc_wait_for_pending_flips_locked().

This changes the behaviour of intel_crtc_wait_for_pending_flips() so that it now holds struct_mutex while waiting for pending flips.

Signature · 1 line
Damien
#18 lore raw

PATCH 6/6 drm/i915: Really wait for pending flips in intel_pipe_set_base()

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Since obj->pending_flips was never set, intel_pipe_set_base() never actually waited for pending page flips to complete.

We really do want to wait for the pending flips, because otherwise the mmio surface base address update could overtake the flip, and you could end up with an old frame on the screen once the flip really completes.

Just call intel_crtc_wait_pending_flips_locked() instead of intel_finish_fb() from intel_pipe_set_base() to achieve the desired result.

---
 drivers/gpu/drm/i915/intel_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
index a2e04f7..7e047c1 100644
@@ -2330,8 +2330,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 		return ret;
 	}
 
-	if (crtc->fb)
-		intel_finish_fb(crtc->fb);
+	intel_crtc_wait_for_pending_flips_locked(crtc);
 
 	ret = dev_priv->display.update_plane(crtc, fb, x, y);
 	if (ret) {
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 6/6
#19 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

Quoted 10 lines · On Tue, Jan 29, 2013 at 06:13:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since obj->pending_flips was never set, intel_pipe_set_base() never actually waited for pending page flips to complete.

We really do want to wait for the pending flips, because otherwise the mmio surface base address update could overtake the flip, and you could end up with an old frame on the screen once the flip really completes.

Quoted 5 lines

Just call intel_crtc_wait_pending_flips_locked() instead of intel_finish_fb() from intel_pipe_set_base() to achieve the desired result.

Signature · 1 line
Damien
#20 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

In reply to [email protected]
Quoted 24 lines · On Tue, Jan 29, 2013 at 06:13:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since obj->pending_flips was never set, intel_pipe_set_base() never actually waited for pending page flips to complete.

We really do want to wait for the pending flips, because otherwise the mmio surface base address update could overtake the flip, and you could end up with an old frame on the screen once the flip really completes.

Just call intel_crtc_wait_pending_flips_locked() instead of intel_finish_fb() from intel_pipe_set_base() to achieve the desired result.

---
 drivers/gpu/drm/i915/intel_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index a2e04f7..7e047c1 100644

drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2333

Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +1 -2
@@ -2330,8 +2330,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 		return ret;
 	}
 
-	if (crtc->fb)
-		intel_finish_fb(crtc->fb);
+	intel_crtc_wait_for_pending_flips_locked(crtc);

Ah, I see now why you grab dev->struct_mutex and need to kick waiters from the pending flip queue. I think grabbing the mutex twice isn't a major offense, since both the crtc disable code and set_base are slowpaths used rarely. So what about simply calling wait_for_pending_flips before grabbing the mutex in intel_pipe_set_base? We could then also inline finish_fb into it's only callsite ...
-Daniel

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
 	ret = dev_priv->display.update_plane(crtc, fb, x, y);
 	if (ret) {
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#21 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Tue, Jan 29, 2013 at 06:13:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since obj->pending_flips was never set, intel_pipe_set_base() never actually waited for pending page flips to complete.

We really do want to wait for the pending flips, because otherwise the mmio surface base address update could overtake the flip, and you could end up with an old frame on the screen once the flip really completes.

Just call intel_crtc_wait_pending_flips_locked() instead of intel_finish_fb() from intel_pipe_set_base() to achieve the desired result.

---
 drivers/gpu/drm/i915/intel_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index a2e04f7..7e047c1 100644
@@ -2330,8 +2330,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 		return ret;
 	}
 
Quoted 10 lines

drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2333

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1 -2
-	if (crtc->fb)
-		intel_finish_fb(crtc->fb);
+	intel_crtc_wait_for_pending_flips_locked(crtc);

Ah, I see now why you grab dev->struct_mutex and need to kick waiters from the pending flip queue. I think grabbing the mutex twice isn't a major offense, since both the crtc disable code and set_base are slowpaths used rarely. So what about simply calling wait_for_pending_flips before grabbing the mutex in intel_pipe_set_base? We could then also inline finish_fb into it's only callsite ...

I didn't want to slow down intel_pipe_set_base() too much. If we wait for pending flips before pinning the new fb, we can never achieve any parallelism there. But if no-one cares about that, we can reorder.

Signature · 2 lines
Ville Syrjälä
Intel OTC
#22 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

Quoted 19 lines · Ville Syrjälä
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
index a2e04f7..7e047c1 100644
@@ -2330,8 +2330,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
            return ret;
    }
 
Quoted 10 lines

drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2333

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1 -2
-   if (crtc->fb)
-           intel_finish_fb(crtc->fb);
+   intel_crtc_wait_for_pending_flips_locked(crtc);

Ah, I see now why you grab dev->struct_mutex and need to kick waiters from the pending flip queue. I think grabbing the mutex twice isn't a major offense, since both the crtc disable code and set_base are slowpaths used rarely. So what about simply calling wait_for_pending_flips before grabbing the mutex in intel_pipe_set_base? We could then also inline finish_fb into it's only callsite ...

Quoted 3 lines

I didn't want to slow down intel_pipe_set_base() too much. If we wait for pending flips before pinning the new fb, we can never achieve any parallelism there. But if no-one cares about that, we can reorder.

I'm confused here - where can we extract parallelism in set_base between waiting for pending flips and the pinning? And imo set_base isn't really critical: It's officially a synchronous thing (we have a vblank wait in there), and if we want to fix that imo the nuclear pageflip should be the answer.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#23 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

Quoted 25 lines · Daniel Vetter
Quoted 19 lines · Ville Syrjälä
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
index a2e04f7..7e047c1 100644
@@ -2330,8 +2330,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
            return ret;
    }
 
Quoted 10 lines

drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2333

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1 -2
-   if (crtc->fb)
-           intel_finish_fb(crtc->fb);
+   intel_crtc_wait_for_pending_flips_locked(crtc);

Ah, I see now why you grab dev->struct_mutex and need to kick waiters from the pending flip queue. I think grabbing the mutex twice isn't a major offense, since both the crtc disable code and set_base are slowpaths used rarely. So what about simply calling wait_for_pending_flips before grabbing the mutex in intel_pipe_set_base? We could then also inline finish_fb into it's only callsite ...

Quoted 3 lines

I didn't want to slow down intel_pipe_set_base() too much. If we wait for pending flips before pinning the new fb, we can never achieve any parallelism there. But if no-one cares about that, we can reorder.

Quoted 5 lines

I'm confused here - where can we extract parallelism in set_base between waiting for pending flips and the pinning? And imo set_base isn't really critical: It's officially a synchronous thing (we have a vblank wait in there), and if we want to fix that imo the nuclear pageflip should be the answer.

The flip is making progress on the GPU side, and at the same time the CPU side can make some progress with the pin operation. At least that was my theory.

Signature · 2 lines
Ville Syrjälä
Intel OTC
#24 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

Quoted 3 lines · Ville Syrjälä

The flip is making progress on the GPU side, and at the same time the CPU side can make some progress with the pin operation. At least that was my theory.

The pin should be a no-op when moving a given framebuffer around. It's only really expensive when we need to clflush (and lesser so when we need to rewrite ptes), which should only happen on fresh framebuffers. As long as userspace does it's job and caches scanout buffers we should be fine. The other thing is waiting for outstanding rendering (to avoid hanging on an MI_WAIT_SCANLINE cmd), which just blocks. So doesn't really matter imo.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#25 lore raw

Re: [PATCH 6/6] drm/i915: Really wait for pending flips in intel_pipe_set_base()

In reply to Daniel Vetter
Quoted 5 lines · Daniel Vetter

I'm confused here - where can we extract parallelism in set_base between waiting for pending flips and the pinning? And imo set_base isn't really critical: It's officially a synchronous thing (we have a vblank wait in there), and if we want to fix that imo the nuclear pageflip should be the answer.

Speaking of which I've had a patch to remove that extra synchronous wait for over a year...
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#26 lore raw
In reply to [email protected]
Quoted 11 lines · On Tue, Jan 29, 2013 at 06:13:32PM +0200, [email protected] wrote:

Someone mentioned on irc that intel_crtc_wait_for_pending_flips() was getting stuck in some cases. This rang a bell since I was poking around that stuff last year.

The issue that I'm trying to fix here is processes getting stuck in D state when a GPU reset happens while page flips have been scheduled.

Testing is easy 1) fire up 'glxgears -fullscreen', run 'gem_hang 0', try to VT switch. Without this series X and some kworker soon get stuck in D state and you're left with a useless box. With the patch set, you wait a while, the GPU hangcheck kicks in, and you get your console back.

Broken record maintainer request: Can you please bake that into an i-g-t? I think (hope) that running one of the delayed flip tests vs. the hangman (gem_hang is a bit evil since it can kill boxes for real) should do the trick. Then maybe also run one of the wf-vblank tests vs. hangman to check that we cancel those correctly, too.

Quoted 11 lines

The irc discussion was apparently about [1], but since the dmesg there doesn't show a GPU hang, I don't see this patch set fixing it. Frankly, I have no idea what's happening there.

Additional work after this would involve sending out pending page flip events. Currently if you don't do the VT switch after a hang, glxgears remains stuck because the X server didn't get the page flip event from the kernel. Also we should probably do an explicit intel_pipe_set_base() with the current fb, to make sure we show the correct fb after the hang. But I'm not going to touch these right now. Actually I'm hoping someone else will volunteer for these tasks ;)

Hm ... I guess we need to walk the file_priv event list somewhere an fire them all off, indicating somehow that things went kaboom. I think we should aim for a drm generic way to singal those even. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#27 lore raw
Quoted 13 lines · Daniel Vetter
Quoted 11 lines · On Tue, Jan 29, 2013 at 06:13:32PM +0200, [email protected] wrote:

Someone mentioned on irc that intel_crtc_wait_for_pending_flips() was getting stuck in some cases. This rang a bell since I was poking around that stuff last year.

The issue that I'm trying to fix here is processes getting stuck in D state when a GPU reset happens while page flips have been scheduled.

Testing is easy 1) fire up 'glxgears -fullscreen', run 'gem_hang 0', try to VT switch. Without this series X and some kworker soon get stuck in D state and you're left with a useless box. With the patch set, you wait a while, the GPU hangcheck kicks in, and you get your console back.

Quoted 5 lines

Broken record maintainer request: Can you please bake that into an i-g-t? I think (hope) that running one of the delayed flip tests vs. the hangman (gem_hang is a bit evil since it can kill boxes for real) should do the trick. Then maybe also run one of the wf-vblank tests vs. hangman to check that we cancel those correctly, too.

Actually for the case you're fixing here we probably need a delayed flip vs. modeset (without flip event checks) against a simulated gpu hang. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch