diff options
author | Rob Clark <robdclark@gmail.com> | 2018-11-29 09:54:42 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-12-11 13:07:04 -0500 |
commit | 789d2e5a772ce312a7a2b81ffaf304946195beb5 (patch) | |
tree | 62f529a89adb976caf18f5f9aceb5513aaca87ef /include | |
parent | 7a93d5c38e5ee68376ca88d9e3f9841451b9efb1 (diff) | |
download | linux-789d2e5a772ce312a7a2b81ffaf304946195beb5.tar.bz2 |
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')
-rw-r--r-- | include/uapi/drm/msm_drm.h | 18 |
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 |