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.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -104,10 +104,14 @@ struct drm_msm_gem_new { · 103 unmodified lines | ||
| 104 | 104 | __u32 handle; /* out */ |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | +#define MSM_INFO_IOVA 0x01 | |
| 108 | + | |
| 109 | +#define MSM_INFO_FLAGS (MSM_INFO_IOVA) | |
| 110 | + | |
| 107 | 111 | struct drm_msm_gem_info { |
| 108 | 112 | __u32 handle; /* in */ |
| 109 | − __u32 pad; | |
| 110 | − __u64 offset; /* out, offset to pass to mmap() */ | |
| 113 | + __u32 flags; /* in - combination of MSM_INFO_* flags */ | |
| 114 | + __u64 offset; /* out, mmap() offset or iova */ | |
| 111 | 115 | }; |
| 112 | 116 | |
| 113 | 117 | #define MSM_PREP_READ 0x01 |