aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTvrtko Ursulin2014-06-19 09:48:34 -0500
committerDamien Lespiau2014-06-19 12:35:05 -0500
commit4fddc92e04f5326d78b1bb0252e2f64725e96edb (patch)
tree2fb10124fc331337bdc28d2bcedc57a0da053ca5 /include/drm/i915_drm.h
parent20edfb9a16414688670439f8849488e08b64c5e7 (diff)
downloadexternal-libgbm-4fddc92e04f5326d78b1bb0252e2f64725e96edb.tar.gz
external-libgbm-4fddc92e04f5326d78b1bb0252e2f64725e96edb.tar.xz
external-libgbm-4fddc92e04f5326d78b1bb0252e2f64725e96edb.zip
intel: Add new userptr ioctl
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r--include/drm/i915_drm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 8eb0cb39..15dd01d4 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -223,6 +223,7 @@ typedef struct _drm_i915_sarea {
223#define DRM_I915_GEM_GET_CACHING 0x30 223#define DRM_I915_GEM_GET_CACHING 0x30
224#define DRM_I915_REG_READ 0x31 224#define DRM_I915_REG_READ 0x31
225#define DRM_I915_GET_RESET_STATS 0x32 225#define DRM_I915_GET_RESET_STATS 0x32
226#define DRM_I915_GEM_USERPTR 0x33
226 227
227#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 228#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
228#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 229#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -273,6 +274,7 @@ typedef struct _drm_i915_sarea {
273#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) 274#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
274#define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) 275#define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read)
275#define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) 276#define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats)
277#define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr)
276 278
277/* Allow drivers to submit batchbuffers directly to hardware, relying 279/* Allow drivers to submit batchbuffers directly to hardware, relying
278 * on the security mechanisms provided by hardware. 280 * on the security mechanisms provided by hardware.
@@ -1050,4 +1052,18 @@ struct drm_i915_reset_stats {
1050 __u32 pad; 1052 __u32 pad;
1051}; 1053};
1052 1054
1055struct drm_i915_gem_userptr {
1056 __u64 user_ptr;
1057 __u64 user_size;
1058 __u32 flags;
1059#define I915_USERPTR_READ_ONLY 0x1
1060#define I915_USERPTR_UNSYNCHRONIZED 0x80000000
1061 /**
1062 * Returned handle for the object.
1063 *
1064 * Object handles are nonzero.
1065 */
1066 __u32 handle;
1067};
1068
1053#endif /* _I915_DRM_H_ */ 1069#endif /* _I915_DRM_H_ */