summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-12-21 19:36:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-12-21 19:36:43 +0000
commit83aaa9d3e884a3ccc658c47eae40804c7ff81b7d (patch)
treefa42417c4c3b58b969e36cbbe2fa62c7faab4643 /sys/dev/pci
parent45834281aca02d043cae32052d109dd0c3246b74 (diff)
Advertise that we provide monotonic timestamps.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/drmP.h4
-rw-r--r--sys/dev/pci/drm/drm_drv.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 01e1471e988..fbec77b709a 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drmP.h,v 1.157 2013/12/15 22:09:36 kettenis Exp $ */
+/* $OpenBSD: drmP.h,v 1.158 2013/12/21 19:36:41 kettenis Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*/
@@ -949,6 +949,8 @@ struct drm_display_mode *
drm_mode_create_from_cmdline_mode(struct drm_device *,
struct drm_cmdline_mode *);
+extern unsigned int drm_timestamp_monotonic;
+
/* AGP/PCI Express/GART support (drm_agpsupport.c) */
struct drm_agp_head *drm_agp_init(void);
void drm_agp_takedown(struct drm_device *);
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index 177186fa81d..314d2a5fc61 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_drv.c,v 1.119 2013/12/16 19:57:09 kettenis Exp $ */
+/* $OpenBSD: drm_drv.c,v 1.120 2013/12/21 19:36:42 kettenis Exp $ */
/*-
* Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org>
* Copyright © 2008 Intel Corporation
@@ -1090,6 +1090,9 @@ drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
case DRM_CAP_DUMB_PREFER_SHADOW:
req->value = dev->mode_config.prefer_shadow;
break;
+ case DRM_CAP_TIMESTAMP_MONOTONIC:
+ req->value = drm_timestamp_monotonic;
+ break;
default:
return EINVAL;
}