Skip to contentSkip to conversation

drm/i915: Replace nondescript 'WARN_ON(!lret)' with a sensible error message

PATCH In review [email protected] 3 participants 5 messages Apr 18, 2016

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

PATCH 1/2 drm/i915: Replace nondescript 'WARN_ON(!lret)' with a sensible error message

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

When a vblank wait times out in intel_atomic_wait_for_vblanks() we just get a cryptic 'WARN_ON(!ret)' backtrace in dmesg. Repace it with something that tells you what actually happened.

Cc Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 4cca155376be..7bdbe4b03591 100644
@@ -13523,7 +13523,7 @@ static void intel_atomic_wait_for_vblanks(struct drm_device *dev,
 					drm_crtc_vblank_count(crtc),
 				msecs_to_jiffies(50));
 
-		WARN_ON(!lret);
+		WARN(!lret, "pipe %c vblank wait timed out\n", pipe_name(pipe));
 
 		drm_crtc_vblank_put(crtc);
 	}
Signature · 6 lines
2.7.4

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

PATCH 2/2 drm/atomic-helper: Print an error if vblank wait times out

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

Vblank waits timing out is no a normal thing to happen, so let's inform people when it happens.

---
 drivers/gpu/drm/drm_atomic_helper.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_atomic_helper.c +2 -0
index 7bf678ee7f81..40c7b268a9bc 100644
@@ -1103,6 +1103,8 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
 					drm_crtc_vblank_count(crtc),
 				msecs_to_jiffies(50));
 
+		WARN(!ret, "[CRTC:%d] vblank wait timed out\n", crtc->base.id);
+
 		drm_crtc_vblank_put(crtc);
 	}
 }
Signature · 6 lines
2.7.4

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

Re: [PATCH 2/2] drm/atomic-helper: Print an error if vblank wait times out

Quoted 6 lines · On Mon, Apr 18, 2016 at 02:29:33PM +0300, [email protected] wrote:

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

Vblank waits timing out is no a normal thing to happen, so let's inform people when it happens.

Applied to drm-misc, let's see how much it blows up. We /should/ be filtering out entirely defunct vblank implementations already by checking vblank_get() ...
-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_atomic_helper.c +2 -0
index 7bf678ee7f81..40c7b268a9bc 100644
@@ -1103,6 +1103,8 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
 					drm_crtc_vblank_count(crtc),
 				msecs_to_jiffies(50));
 
+		WARN(!ret, "[CRTC:%d] vblank wait timed out\n", crtc->base.id);
+
 		drm_crtc_vblank_put(crtc);
 	}
 }
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 1/2
#3 lore raw
In reply to [email protected]

Op 18-04-16 om 13:29 schreef [email protected]:

Quoted 17 lines

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

When a vblank wait times out in intel_atomic_wait_for_vblanks() we just get a cryptic 'WARN_ON(!ret)' backtrace in dmesg. Repace it with something that tells you what actually happened.

Cc Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 4cca155376be..7bdbe4b03591 100644

drivers/gpu/drm/i915/intel_display.c static void intel_atomic_wait_for_vblanks(struct drm_device *dev, · line 13529

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -13523,7 +13523,7 @@ static void intel_atomic_wait_for_vblanks(struct drm_device *dev,
 					drm_crtc_vblank_count(crtc),
 				msecs_to_jiffies(50));
 
-		WARN_ON(!lret);
+		WARN(!lret, "pipe %c vblank wait timed out\n", pipe_name(pipe));
 
 		drm_crtc_vblank_put(crtc);
 	}

This helper function was never meant to last as long as it did. :(

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Applied
#4 lore raw
Quoted 21 lines · Maarten Lankhorst

Op 18-04-16 om 13:29 schreef [email protected]:

Quoted 20 lines

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

When a vblank wait times out in intel_atomic_wait_for_vblanks() we just get a cryptic 'WARN_ON(!ret)' backtrace in dmesg. Repace it with something that tells you what actually happened.

Cc Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 4cca155376be..7bdbe4b03591 100644
@@ -13523,7 +13523,7 @@ static void intel_atomic_wait_for_vblanks(struct drm_device *dev,
 					drm_crtc_vblank_count(crtc),
 				msecs_to_jiffies(50));
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static void intel_atomic_wait_for_vblanks(struct drm_device *dev, · line 13529

Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
-		WARN_ON(!lret);
+		WARN(!lret, "pipe %c vblank wait timed out\n", pipe_name(pipe));
 
 		drm_crtc_vblank_put(crtc);
 	}

This helper function was never meant to last as long as it did. :(

Pushed to dinq. Thanks for the review.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel