Skip to content

Commit

Permalink
drm: Add high-precision time to vblank trace event
Browse files Browse the repository at this point in the history
Store the timestamp of the current vblank in the new field 'time' of the
vblank trace event. If the timestamp is calculated by a driver that
supports high-precision vblank timing, set the field 'high-prec' to
'true'.

User space can now access actual hardware vblank times via the tracing
infrastructure. Tracing applications (such as GPUVis, see [0] for
related discussion), can use the newly added information to conduct a
more accurate analysis of display timing.

v2 Fix author name (missing last name)

[0] mikesart/gpuvis#30

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Heinrich Fink <heinrich.fink@daqri.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190902142412.27846-2-heinrich.fink@daqri.com
  • Loading branch information
Heinrich Fink authored and evadot committed Jun 7, 2021
1 parent 2c30246 commit 0d7efca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/drm_vblank.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,8 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
}

#ifdef __linux__
trace_drm_vblank_event(pipe, seq);
trace_drm_vblank_event(pipe, seq, now,
dev->driver->get_vblank_timestamp != NULL);
#endif
}

Expand Down

0 comments on commit 0d7efca

Please sign in to comment.