diff options
author | Imre Deak <imre.deak@intel.com> | 2012-10-23 18:53:26 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 16:06:16 +1000 |
commit | c61eef726a78ae77b6ce223d01ea2130f465fe5c (patch) | |
tree | 7bd310556195005b5c4c1cbadadc9da1fbf5163c /include | |
parent | e62f2f5acba1d466da047983ae16f6b96b68b310 (diff) |
drm: add support for monotonic vblank timestamps
Jumps in the vblank and page flip event timestamps cause trouble for
clients, so we should avoid them. The timestamp we get currently with
gettimeofday can jump, so use instead monotonic timestamps.
For backward compatibility use a module flag to revert back to using
gettimeofday timestamps. Add also a DRM_CAP_TIMESTAMP_MONOTONIC flag
that is simply a read only version of the module flag, so that clients
can query this without depending on sysfs.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 1 | ||||
-rw-r--r-- | include/uapi/drm/drm.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 29eb23799aa..fad21c927a3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1505,6 +1505,7 @@ extern unsigned int drm_debug; extern unsigned int drm_vblank_offdelay; extern unsigned int drm_timestamp_precision; +extern unsigned int drm_timestamp_monotonic; extern struct class *drm_class; extern struct proc_dir_entry *drm_proc_root; diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 1e3481edf06..8d1e2bbee83 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -778,6 +778,7 @@ struct drm_event_vblank { #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 #define DRM_CAP_PRIME 0x5 +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #define DRM_PRIME_CAP_IMPORT 0x1 #define DRM_PRIME_CAP_EXPORT 0x2 |