Skip to contentSkip to conversation

drm: Improve debug output for drm_wait_one_vblank

PATCH In review Daniel Vetter 2 participants 2 messages Sep 15, 2014

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

PATCH 1/1 drm: Improve debug output for drm_wait_one_vblank

This replicates what we've done in i915 in

commit 31e4b89acbd7b19c9a8557e6e660a583a0b97daa

Author: Damien Lespiau <[email protected]>
Date:   Mon Aug 18 13:51:00 2014 +0100

drm/i915: Print the pipe on which the vblank wait times out

to make sure that when we switch i915 to drm_wait_one_vblank that the debug output doesn't regress.

Cc Damien Lespiau <[email protected]>
Cc Thomas Wood <[email protected]>
---
 drivers/gpu/drm/drm_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_irq.c +2 -2
index e73cbdaa18df..5ef03c216a27 100644
@@ -1077,7 +1077,7 @@ void drm_wait_one_vblank(struct drm_device *dev, int crtc)
 	u32 last;
 
 	ret = drm_vblank_get(dev, crtc);
-	if (WARN_ON(ret))
+	if (WARN(ret, "vblank not available on crtc %i, ret=%i\n", crtc, ret))
 		return;
 
 	last = drm_vblank_count(dev, crtc);
@@ -1086,7 +1086,7 @@ void drm_wait_one_vblank(struct drm_device *dev, int crtc)
 				 last != drm_vblank_count(dev, crtc),
 				 msecs_to_jiffies(100));
 
-	WARN_ON(ret == 0);
+	WARN(ret == 0, "vblank wait timed out on crtc %i\n", crtc);
 
 	drm_vblank_put(dev, crtc);
 }
Signature · 1 line
2.0.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Daniel Vetter

This replicates what we've done in i915 in

commit 31e4b89acbd7b19c9a8557e6e660a583a0b97daa

Author: Damien Lespiau <[email protected]>
Date:   Mon Aug 18 13:51:00 2014 +0100
Quoted 8 lines

drm/i915: Print the pipe on which the vblank wait times out

to make sure that when we switch i915 to drm_wait_one_vblank that the debug output doesn't regress.

Cc Damien Lespiau <[email protected]>
Cc Thomas Wood <[email protected]>
Signature · 1 line
Damien
Quoted 29 lines
---
 drivers/gpu/drm/drm_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_irq.c +2 -2
index e73cbdaa18df..5ef03c216a27 100644
@@ -1077,7 +1077,7 @@ void drm_wait_one_vblank(struct drm_device *dev, int crtc)
 	u32 last;
 
 	ret = drm_vblank_get(dev, crtc);
-	if (WARN_ON(ret))
+	if (WARN(ret, "vblank not available on crtc %i, ret=%i\n", crtc, ret))
 		return;
 
 	last = drm_vblank_count(dev, crtc);
@@ -1086,7 +1086,7 @@ void drm_wait_one_vblank(struct drm_device *dev, int crtc)
 				 last != drm_vblank_count(dev, crtc),
 				 msecs_to_jiffies(100));
 
-	WARN_ON(ret == 0);
+	WARN(ret == 0, "vblank wait timed out on crtc %i\n", crtc);
 
 	drm_vblank_put(dev, crtc);
 }
Signature · 1 line
2.0.1