summaryrefslogtreecommitdiff
path: root/include/uapi/drm
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2018-11-29 17:54:42 +0300
committerRob Clark <robdclark@gmail.com>2018-12-11 21:07:04 +0300
commit789d2e5a772ce312a7a2b81ffaf304946195beb5 (patch)
tree62f529a89adb976caf18f5f9aceb5513aaca87ef /include/uapi/drm
parent7a93d5c38e5ee68376ca88d9e3f9841451b9efb1 (diff)
downloadlinux-789d2e5a772ce312a7a2b81ffaf304946195beb5.tar.xz
drm/msm: rework GEM_INFO ioctl
Prep work to add a way to get/set the GEM objects debug name. Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'include/uapi/drm')
-rw-r--r--include/uapi/drm/msm_drm.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 3c3af92c4b3e..7b372c1bcc7d 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -105,14 +105,22 @@ struct drm_msm_gem_new {
__u32 handle; /* out */
};
-#define MSM_INFO_IOVA 0x01
-
-#define MSM_INFO_FLAGS (MSM_INFO_IOVA)
+/* Get or set GEM buffer info. The requested value can be passed
+ * directly in 'value', or for data larger than 64b 'value' is a
+ * pointer to userspace buffer, with 'len' specifying the number of
+ * bytes copied into that buffer. For info returned by pointer,
+ * calling the GEM_INFO ioctl with null 'value' will return the
+ * required buffer size in 'len'
+ */
+#define MSM_INFO_GET_OFFSET 0x00 /* get mmap() offset, returned by value */
+#define MSM_INFO_GET_IOVA 0x01 /* get iova, returned by value */
struct drm_msm_gem_info {
__u32 handle; /* in */
- __u32 flags; /* in - combination of MSM_INFO_* flags */
- __u64 offset; /* out, mmap() offset or iova */
+ __u32 info; /* in - one of MSM_INFO_* */
+ __u64 value; /* in or out */
+ __u32 len; /* in or out */
+ __u32 pad;
};
#define MSM_PREP_READ 0x01