---
name: "drm_get_last_vbltimestamp"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drm_get_last_vbltimestamp"
---

# drm\_get\_last\_vbltimestamp(9)

retrieve raw timestamp for the most recent vblank interval

## NAME

drm\_get\_last\_vbltimestamp - retrieve raw timestamp for the most recent vblank interval

## SYNOPSIS

**u32 drm\_get\_last\_vbltimestamp(struct drm\_device \*** *dev***, int** *crtc***, struct timeval \*** *tvblank***, unsigned** *flags***);**

## ARGUMENTS

*dev*

DRM device

*crtc*

which CRTC's vblank timestamp to retrieve

*tvblank*

Pointer to target struct timeval which should receive the timestamp

*flags*

Flags to pass to driver: 0 = Default, DRM\_CALLED\_FROM\_VBLIRQ = If function is called from vbl IRQ handler

## DESCRIPTION

Fetches the system timestamp corresponding to the time of the most recent vblank interval on specified CRTC. May call into kms-driver to compute the timestamp with a high-precision GPU specific method.

Returns zero if timestamp originates from uncorrected **do\_gettimeofday** call, i.e., it isn't very precisely locked to the true vblank.

## RETURNS

Non-zero if timestamp is considered to be very precise, zero otherwise.

## AUTHORS

**Jesse Barnes** \<jesse.barnes@intel.com\>\
 Intel Corporation,

Initial version

**Laurent Pinchart** \<laurent.pinchart@ideasonboard.com\>\
 Ideas on board SPRL,

Driver internals

**Daniel Vetter** \<daniel.vetter@ffwll.ch\>\
 Intel Corporation,

Contributions all over the place

## COPYRIGHT
