summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-04-03 08:29:34 -0600
committerJordan Crouse <jcrouse@codeaurora.org>2017-04-26 10:17:55 -0600
commitf567fc12bf30e7ffff689dbd528dfa24216bc8f8 (patch)
treee3ab274ee865f97e6967a3564eb9759ead89b4c0 /include/uapi
parent048c70075fecb8f92d923fc5595efa00f2a00082 (diff)
drm/msm: Add explicit sync operations
Add sync operations to give the user more control over the behavior of cached buffers. Change-Id: Ic0dedbad67e19a6b30b2cc5f6b2c7bbe52c2b708 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/msm_drm.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 8baf2bf6df2e..853bf9c88b62 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -312,6 +312,18 @@ struct drm_msm_counter_read {
__u32 nr_ops;
};
+#define MSM_GEM_SYNC_TO_DEV 0
+#define MSM_GEM_SYNC_TO_CPU 1
+
+struct drm_msm_gem_syncop {
+ __u32 handle;
+ __u32 op;
+};
+
+struct drm_msm_gem_sync {
+ __u32 nr_ops;
+ __u64 __user ops;
+};
#define DRM_MSM_GET_PARAM 0x00
/* placeholder:
@@ -330,6 +342,7 @@ struct drm_msm_counter_read {
#define DRM_MSM_COUNTER_GET 0x43
#define DRM_MSM_COUNTER_PUT 0x44
#define DRM_MSM_COUNTER_READ 0x45
+#define DRM_MSM_GEM_SYNC 0x46
/**
* Currently DRM framework supports only VSYNC event.
@@ -359,5 +372,6 @@ struct drm_msm_counter_read {
#define DRM_IOCTL_MSM_COUNTER_READ \
DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_COUNTER_READ, \
struct drm_msm_counter_read)
-
+#define DRM_IOCTL_MSM_GEM_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_SYNC,\
+ struct drm_msm_gem_sync)
#endif /* __MSM_DRM_H__ */