drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug
authorVille Syrjälä <[email protected]>
Mon, 23 Oct 2017 15:25:40 +0000 (18:25 +0300)
committerVille Syrjälä <[email protected]>
Tue, 7 Nov 2017 19:07:02 +0000 (21:07 +0200)
commita111fbc4c44d2981f1a8fef64418685be5e30280
tree26d73e11f6eebf83bd7a166b0a15ad6cc8fbb0c0
parent30cfcf01665f3c8d8dc3ebb3dfb1a8248f53404a
drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug

Since commit 632c6e4edef1 ("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: [email protected]
Cc: Daniel Vetter <[email protected]>
Cc: "Szyprowski, Marek" <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Reported-by: Andrzej Hajda <[email protected]>
Fixes: 632c6e4edef1 ("drm/vblank: Fix flip event vblank count")
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Acked-by: Benjamin Gaignard <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
drivers/gpu/drm/drm_vblank.c