diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2017-05-08 14:35:01 -0600 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-06-16 11:15:47 -0400 |
commit | 49fd08baa36ac10b13ea7b23fc6bbee8b4a6fcfe (patch) | |
tree | 9d167c6ce28adbf1aeed4bae9497dc315d96927c /include/uapi | |
parent | e895c7bd31f5ca7dbd315001cfbdcaee98ee16c4 (diff) | |
download | linux-49fd08baa36ac10b13ea7b23fc6bbee8b4a6fcfe.tar.bz2 |
drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA
Modify the 'pad' member of struct drm_msm_gem_info to 'flags'. If the
user sets 'flags' to non-zero it means that they want a IOVA for the
GEM object instead of a mmap() offset. Return the iova in the 'offset'
member.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
[robclark: s/hint/flags in commit msg]
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/drm/msm_drm.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index a9985fe6efcd..26c54f6d595d 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -104,10 +104,14 @@ struct drm_msm_gem_new { __u32 handle; /* out */ }; +#define MSM_INFO_IOVA 0x01 + +#define MSM_INFO_FLAGS (MSM_INFO_IOVA) + struct drm_msm_gem_info { __u32 handle; /* in */ - __u32 pad; - __u64 offset; /* out, offset to pass to mmap() */ + __u32 flags; /* in - combination of MSM_INFO_* flags */ + __u64 offset; /* out, mmap() offset or iova */ }; #define MSM_PREP_READ 0x01 |