summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_vblank.c
diff options
context:
space:
mode:
authorOleg Vasilev <oleg.vasilev@intel.com>2019-06-13 15:18:00 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-06-14 19:10:04 +0300
commit41ff5bd834356a310ad909152f19bf23963527ce (patch)
tree2e0d48b143b09cb71af305e32b326f7178e11569 /drivers/gpu/drm/drm_vblank.c
parenta0e93c41eb75ab05bd07d4bd8027f30d484b3966 (diff)
downloadlinux-41ff5bd834356a310ad909152f19bf23963527ce.tar.xz
drm: add debug print to update_vblank_count
Since we are logging all vblank counter updates 30 lines below, it is also good to have some details whether and how vblank count difference is calculated. Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190613121802.2193-1-oleg.vasilev@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_vblank.c')
-rw-r--r--drivers/gpu/drm/drm_vblank.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 0d704bddb1a6..603ab105125d 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -241,12 +241,16 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
* on the difference in the timestamps and the
* frame/field duration.
*/
+
+ DRM_DEBUG_VBL("crtc %u: Calculating number of vblanks."
+ " diff_ns = %lld, framedur_ns = %d)\n",
+ pipe, (long long) diff_ns, framedur_ns);
+
diff = DIV_ROUND_CLOSEST_ULL(diff_ns, framedur_ns);
if (diff == 0 && in_vblank_irq)
- DRM_DEBUG_VBL("crtc %u: Redundant vblirq ignored."
- " diff_ns = %lld, framedur_ns = %d)\n",
- pipe, (long long) diff_ns, framedur_ns);
+ DRM_DEBUG_VBL("crtc %u: Redundant vblirq ignored\n",
+ pipe);
} else {
/* some kind of default for drivers w/o accurate vbl timestamping */
diff = in_vblank_irq ? 1 : 0;