Commit a5851fdb authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Greg Kroah-Hartman

drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug

commit a111fbc4 upstream.

Since commit 632c6e4e ("drm/vblank: Fix flip event vblank count")
even drivers that don't implement accurate vblank timestamps will end
up using drm_crtc_accurate_vblank_count(). That leads to a WARN every
time drm_crtc_arm_vblank_event() gets called. The could be as often
as every frame for each active crtc.

Considering drm_crtc_accurate_vblank_count() is never any worse than
the drm_vblank_count() we used previously, let's just skip the WARN
unless DRM_UT_VBL is enabled. That way people won't be bothered by
this unless they're debugging vblank code. And let's also change it
to WARN_ONCE() so that even when you're debugging vblank code you
won't get drowned by constant WARNs.

Cc: Daniel Vetter <>
Cc: "Szyprowski, Marek" <>
Cc: Andrzej Hajda <>
Reported-by: default avatarAndrzej Hajda <>
Fixes: 632c6e4e ("drm/vblank: Fix flip event vblank count")
Signed-off-by: default avatarVille Syrjälä <>
Link: default avatarBenjamin Gaignard <>
Reviewed-by: default avatarDaniel Vetter <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 7c33c32d
......@@ -311,8 +311,8 @@ u32 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
u32 vblank;
unsigned long flags;
"This function requires support for accurate vblank timestamps.");
WARN_ONCE(drm_debug & DRM_UT_VBL && !dev->driver->get_vblank_timestamp,
"This function requires support for accurate vblank timestamps.");
spin_lock_irqsave(&dev->vblank_time_lock, flags);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment