aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Roberts2015-03-19 12:11:08 -0500
committerDamien Lespiau2015-03-19 12:19:46 -0500
commit8576527cfacaf42af8316e1030c192193e94225a (patch)
treeaaeb0b5d5068e9c8121e0099ecfb73ff127284f9 /include/drm/i915_drm.h
parent5f7b6723e1bed755c230817eea0563bab5b2a8a7 (diff)
downloadexternal-libgbm-8576527cfacaf42af8316e1030c192193e94225a.tar.gz
external-libgbm-8576527cfacaf42af8316e1030c192193e94225a.tar.xz
external-libgbm-8576527cfacaf42af8316e1030c192193e94225a.zip
intel: Merge latest i915_drm.h
The main incentive to do this is to get I915_PARAM_REVISION. v2: Rebase on top of some changes that were made to the header without copying the whole file from the kernel source. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Neil Roberts <neil@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r--include/drm/i915_drm.h48
1 files changed, 42 insertions, 6 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index b037e569..ded43b1c 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -224,6 +224,8 @@ typedef struct _drm_i915_sarea {
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#define DRM_I915_GEM_USERPTR 0x33
227#define DRM_I915_GEM_CONTEXT_GETPARAM 0x34
228#define DRM_I915_GEM_CONTEXT_SETPARAM 0x35
227 229
228#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 230#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
229#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 231#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -274,7 +276,9 @@ typedef struct _drm_i915_sarea {
274#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) 276#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
275#define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) 277#define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read)
276#define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) 278#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) 279#define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr)
280#define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param)
281#define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param)
278 282
279/* Allow drivers to submit batchbuffers directly to hardware, relying 283/* Allow drivers to submit batchbuffers directly to hardware, relying
280 * on the security mechanisms provided by hardware. 284 * on the security mechanisms provided by hardware.
@@ -340,6 +344,10 @@ typedef struct drm_i915_irq_wait {
340#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 344#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26
341#define I915_PARAM_HAS_WT 27 345#define I915_PARAM_HAS_WT 27
342#define I915_PARAM_CMD_PARSER_VERSION 28 346#define I915_PARAM_CMD_PARSER_VERSION 28
347#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
348#define I915_PARAM_MMAP_VERSION 30
349#define I915_PARAM_HAS_BSD2 31
350#define I915_PARAM_REVISION 32
343#define I915_PARAM_SUBSLICE_TOTAL 33 351#define I915_PARAM_SUBSLICE_TOTAL 33
344#define I915_PARAM_EU_TOTAL 34 352#define I915_PARAM_EU_TOTAL 34
345 353
@@ -489,6 +497,14 @@ struct drm_i915_gem_mmap {
489 * This is a fixed-size type for 32/64 compatibility. 497 * This is a fixed-size type for 32/64 compatibility.
490 */ 498 */
491 __u64 addr_ptr; 499 __u64 addr_ptr;
500
501 /**
502 * Flags for extended behaviour.
503 *
504 * Added in version 2.
505 */
506 __u64 flags;
507#define I915_MMAP_WC 0x1
492}; 508};
493 509
494struct drm_i915_gem_mmap_gtt { 510struct drm_i915_gem_mmap_gtt {
@@ -738,7 +754,13 @@ struct drm_i915_gem_execbuffer2 {
738 */ 754 */
739#define I915_EXEC_HANDLE_LUT (1<<12) 755#define I915_EXEC_HANDLE_LUT (1<<12)
740 756
741#define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_HANDLE_LUT<<1) 757/** Used for switching BSD rings on the platforms with two BSD rings */
758#define I915_EXEC_BSD_MASK (3<<13)
759#define I915_EXEC_BSD_DEFAULT (0<<13) /* default ping-pong mode */
760#define I915_EXEC_BSD_RING1 (1<<13)
761#define I915_EXEC_BSD_RING2 (2<<13)
762
763#define __I915_EXEC_UNKNOWN_FLAGS -(1<<15)
742 764
743#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) 765#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
744#define i915_execbuffer2_set_context_id(eb2, context) \ 766#define i915_execbuffer2_set_context_id(eb2, context) \
@@ -878,6 +900,12 @@ struct drm_i915_gem_get_tiling {
878 * mmap mapping. 900 * mmap mapping.
879 */ 901 */
880 __u32 swizzle_mode; 902 __u32 swizzle_mode;
903
904 /**
905 * Returned address bit 6 swizzling required for CPU access through
906 * mmap mapping whilst bound.
907 */
908 __u32 phys_swizzle_mode;
881}; 909};
882 910
883struct drm_i915_gem_get_aperture { 911struct drm_i915_gem_get_aperture {
@@ -1061,11 +1089,19 @@ struct drm_i915_gem_userptr {
1061#define I915_USERPTR_READ_ONLY 0x1 1089#define I915_USERPTR_READ_ONLY 0x1
1062#define I915_USERPTR_UNSYNCHRONIZED 0x80000000 1090#define I915_USERPTR_UNSYNCHRONIZED 0x80000000
1063 /** 1091 /**
1064 * Returned handle for the object. 1092 * Returned handle for the object.
1065 * 1093 *
1066 * Object handles are nonzero. 1094 * Object handles are nonzero.
1067 */ 1095 */
1068 __u32 handle; 1096 __u32 handle;
1069}; 1097};
1070 1098
1099struct drm_i915_gem_context_param {
1100 __u32 ctx_id;
1101 __u32 size;
1102 __u64 param;
1103#define I915_CONTEXT_PARAM_BAN_PERIOD 0x1
1104 __u64 value;
1105};
1106
1071#endif /* _I915_DRM_H_ */ 1107#endif /* _I915_DRM_H_ */