summaryrefslogtreecommitdiff
path: root/src/drmmode_display.h
diff options
context:
space:
mode:
authorIlija Hadzic <ilijahadzic@gmail.com>2013-05-08 22:39:38 -0400
committerMichel Dänzer <michel@daenzer.net>2013-05-29 15:06:27 +0200
commit373671d2eed30e30b3bdee7e40426cf58c127234 (patch)
tree2d26db3a50d2f34c51bf90686e4dc49ab5ba61f8 /src/drmmode_display.h
parent006fbbd1d38a089b50ab3197d32815689ed249fa (diff)
drmmode: add drmmode_get_current_ust function
The new helper function retrieves current time in the format that is compatible with vblank timestamps. v2: - fix an incorrect statement in a comment - add a #define so that don't depend on libdrm patches that have not yet been accepted upstream Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.h')
-rw-r--r--src/drmmode_display.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index b63ec8eb..add2ee48 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -34,6 +34,10 @@
#include "radeon_probe.h"
+#ifndef DRM_CAP_TIMESTAMP_MONOTONIC
+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
+#endif
+
typedef struct {
int fd;
unsigned fb_id;
@@ -115,6 +119,7 @@ extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *data, int ref_crtc_hw_id);
+int drmmode_get_current_ust(int drm_fd, CARD64 *ust);
#endif