[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2019-01-17 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

Sync with latest drm headers from drm-tip.

Acked-by: Chris Wilson 
---
 include/drm-uapi/drm_fourcc.h | 25 +-
 include/drm-uapi/drm_mode.h   | 19 +++
 include/drm-uapi/i915_drm.h   | 64 +++
 include/drm-uapi/msm_drm.h| 25 ++
 include/drm-uapi/v3d_drm.h| 33 ++
 5 files changed, 159 insertions(+), 7 deletions(-)

diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h
index 4ddf754bab09..41106c835747 100644
--- a/include/drm-uapi/drm_fourcc.h
+++ b/include/drm-uapi/drm_fourcc.h
@@ -151,7 +151,7 @@ extern "C" {
 #define DRM_FORMAT_VYUYfourcc_code('V', 'Y', 'U', 'Y') /* 
[31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
 
 #define DRM_FORMAT_AYUVfourcc_code('A', 'Y', 'U', 'V') /* 
[31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
-#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* [31:0] 
X:Y:Cb:Cr 8:8:8:8 little endian */
+#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* 
[31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
 /*
  * packed YCbCr420 2x2 tiled formats
@@ -581,10 +581,18 @@ extern "C" {
  * Indicates the superblock size(s) used for the AFBC buffer. The buffer
  * size (in pixels) must be aligned to a multiple of the superblock size.
  * Four lowest significant bits(LSBs) are reserved for block size.
+ *
+ * Where one superblock size is specified, it applies to all planes of the
+ * buffer (e.g. 16x16, 32x8). When multiple superblock sizes are specified,
+ * the first applies to the Luma plane and the second applies to the Chroma
+ * plane(s). e.g. (32x8_64x4 means 32x8 Luma, with 64x4 Chroma).
+ * Multiple superblock sizes are only valid for multi-plane YCbCr formats.
  */
 #define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK  0xf
 #define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL)
 #define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8  (2ULL)
+#define AFBC_FORMAT_MOD_BLOCK_SIZE_64x4  (3ULL)
+#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8_64x4 (4ULL)
 
 /*
  * AFBC lossless colorspace transform
@@ -644,6 +652,21 @@ extern "C" {
  */
 #define AFBC_FORMAT_MOD_SC  (1ULL <<  9)
 
+/*
+ * AFBC double-buffer
+ *
+ * Indicates that the buffer is allocated in a layout safe for front-buffer
+ * rendering.
+ */
+#define AFBC_FORMAT_MOD_DB  (1ULL << 10)
+
+/*
+ * AFBC buffer content hints
+ *
+ * Indicates that the buffer includes per-superblock content hints.
+ */
+#define AFBC_FORMAT_MOD_BCH (1ULL << 11)
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index d3e0fe31efc5..a439c2e67896 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -888,6 +888,25 @@ struct drm_mode_revoke_lease {
__u32 lessee_id;
 };
 
+/**
+ * struct drm_mode_rect - Two dimensional rectangle.
+ * @x1: Horizontal starting coordinate (inclusive).
+ * @y1: Vertical starting coordinate (inclusive).
+ * @x2: Horizontal ending coordinate (exclusive).
+ * @y2: Vertical ending coordinate (exclusive).
+ *
+ * With drm subsystem using struct drm_rect to manage rectangular area this
+ * export it to user-space.
+ *
+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
+ */
+struct drm_mode_rect {
+   __s32 x1;
+   __s32 y1;
+   __s32 x2;
+   __s32 y2;
+};
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index e39b26d4bb3d..d2792ab3640b 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1486,9 +1486,73 @@ struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY   1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY0
 #define   I915_CONTEXT_MIN_USER_PRIORITY   -1023 /* inclusive */
+   /*
+* When using the following param, value should be a pointer to
+* drm_i915_gem_context_param_sseu.
+*/
+#define I915_CONTEXT_PARAM_SSEU0x7
__u64 value;
 };
 
+/**
+ * Context SSEU programming
+ *
+ * It may be necessary for either functional or performance reason to configure
+ * a context to run with a reduced number of SSEU (where SSEU stands for Slice/
+ * Sub-slice/EU).
+ *
+ * This is done by configuring SSEU configuration using the below
+ * @struct drm_i915_gem_context_param_sseu for every supported engine which
+ * userspace intends to use.
+ *
+ * Not all GPUs or engines support this functionality in which case an error
+ * code -ENODEV will be returned.
+ *
+ * Also, flexibility of possible SSEU configuration permutations varies between
+ * GPU generations and software imposed limitations. Requesting such a
+ * combination will return an error code of -EINVAL.
+ *
+ * NOTE: When perf/OA is active the context's SSEU configuration is ignored in
+ * favour of a single global setting.
+ */
+struct drm_i915_gem_context_param_sseu {
+   /*
+* Engine class & ins

[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2019-01-14 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

Sync with latest drm headers from drm-tip.

Acked-by: Chris Wilson 
---
 include/drm-uapi/drm_fourcc.h |  2 +-
 include/drm-uapi/drm_mode.h   | 19 +++
 include/drm-uapi/i915_drm.h   | 64 +++
 include/drm-uapi/msm_drm.h| 25 ++
 include/drm-uapi/v3d_drm.h| 33 ++
 5 files changed, 136 insertions(+), 7 deletions(-)

diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h
index 4ddf754bab09..0b44260a5ee9 100644
--- a/include/drm-uapi/drm_fourcc.h
+++ b/include/drm-uapi/drm_fourcc.h
@@ -151,7 +151,7 @@ extern "C" {
 #define DRM_FORMAT_VYUYfourcc_code('V', 'Y', 'U', 'Y') /* 
[31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
 
 #define DRM_FORMAT_AYUVfourcc_code('A', 'Y', 'U', 'V') /* 
[31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
-#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* [31:0] 
X:Y:Cb:Cr 8:8:8:8 little endian */
+#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* 
[31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
 /*
  * packed YCbCr420 2x2 tiled formats
diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index d3e0fe31efc5..a439c2e67896 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -888,6 +888,25 @@ struct drm_mode_revoke_lease {
__u32 lessee_id;
 };
 
+/**
+ * struct drm_mode_rect - Two dimensional rectangle.
+ * @x1: Horizontal starting coordinate (inclusive).
+ * @y1: Vertical starting coordinate (inclusive).
+ * @x2: Horizontal ending coordinate (exclusive).
+ * @y2: Vertical ending coordinate (exclusive).
+ *
+ * With drm subsystem using struct drm_rect to manage rectangular area this
+ * export it to user-space.
+ *
+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
+ */
+struct drm_mode_rect {
+   __s32 x1;
+   __s32 y1;
+   __s32 x2;
+   __s32 y2;
+};
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index e39b26d4bb3d..d2792ab3640b 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1486,9 +1486,73 @@ struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY   1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY0
 #define   I915_CONTEXT_MIN_USER_PRIORITY   -1023 /* inclusive */
+   /*
+* When using the following param, value should be a pointer to
+* drm_i915_gem_context_param_sseu.
+*/
+#define I915_CONTEXT_PARAM_SSEU0x7
__u64 value;
 };
 
+/**
+ * Context SSEU programming
+ *
+ * It may be necessary for either functional or performance reason to configure
+ * a context to run with a reduced number of SSEU (where SSEU stands for Slice/
+ * Sub-slice/EU).
+ *
+ * This is done by configuring SSEU configuration using the below
+ * @struct drm_i915_gem_context_param_sseu for every supported engine which
+ * userspace intends to use.
+ *
+ * Not all GPUs or engines support this functionality in which case an error
+ * code -ENODEV will be returned.
+ *
+ * Also, flexibility of possible SSEU configuration permutations varies between
+ * GPU generations and software imposed limitations. Requesting such a
+ * combination will return an error code of -EINVAL.
+ *
+ * NOTE: When perf/OA is active the context's SSEU configuration is ignored in
+ * favour of a single global setting.
+ */
+struct drm_i915_gem_context_param_sseu {
+   /*
+* Engine class & instance to be configured or queried.
+*/
+   __u16 engine_class;
+   __u16 engine_instance;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 flags;
+
+   /*
+* Mask of slices to enable for the context. Valid values are a subset
+* of the bitmask value returned for I915_PARAM_SLICE_MASK.
+*/
+   __u64 slice_mask;
+
+   /*
+* Mask of subslices to enable for the context. Valid values are a
+* subset of the bitmask value return by I915_PARAM_SUBSLICE_MASK.
+*/
+   __u64 subslice_mask;
+
+   /*
+* Minimum/Maximum number of EUs to enable per subslice for the
+* context. min_eus_per_subslice must be inferior or equal to
+* max_eus_per_subslice.
+*/
+   __u16 min_eus_per_subslice;
+   __u16 max_eus_per_subslice;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 rsvd;
+};
+
 enum drm_i915_oa_format {
I915_OA_FORMAT_A13 = 1, /* HSW only */
I915_OA_FORMAT_A29, /* HSW only */
diff --git a/include/drm-uapi/msm_drm.h b/include/drm-uapi/msm_drm.h
index c06d0a5bdd80..91a16b333c69 100644
--- a/include/drm-uapi/msm_drm.h
+++ b/include/drm-uapi/msm_drm.h
@@ -105,14 +105,24 @@ struct drm_msm_gem_new {
__u32 handle; /* out */
 };
 
-#define MSM_INFO_IOVA  0x01
-
-#d

[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2019-01-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

Sync with latest drm headers from drm-tip.

Acked-by: Chris Wilson 
---
 include/drm-uapi/drm_fourcc.h |  2 +-
 include/drm-uapi/drm_mode.h   | 19 
 include/drm-uapi/i915_drm.h   | 43 +++
 include/drm-uapi/msm_drm.h| 25 +++-
 include/drm-uapi/v3d_drm.h| 33 +++
 5 files changed, 115 insertions(+), 7 deletions(-)

diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h
index 4ddf754bab09..0b44260a5ee9 100644
--- a/include/drm-uapi/drm_fourcc.h
+++ b/include/drm-uapi/drm_fourcc.h
@@ -151,7 +151,7 @@ extern "C" {
 #define DRM_FORMAT_VYUYfourcc_code('V', 'Y', 'U', 'Y') /* 
[31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
 
 #define DRM_FORMAT_AYUVfourcc_code('A', 'Y', 'U', 'V') /* 
[31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
-#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* [31:0] 
X:Y:Cb:Cr 8:8:8:8 little endian */
+#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* 
[31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
 /*
  * packed YCbCr420 2x2 tiled formats
diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index d3e0fe31efc5..a439c2e67896 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -888,6 +888,25 @@ struct drm_mode_revoke_lease {
__u32 lessee_id;
 };
 
+/**
+ * struct drm_mode_rect - Two dimensional rectangle.
+ * @x1: Horizontal starting coordinate (inclusive).
+ * @y1: Vertical starting coordinate (inclusive).
+ * @x2: Horizontal ending coordinate (exclusive).
+ * @y2: Vertical ending coordinate (exclusive).
+ *
+ * With drm subsystem using struct drm_rect to manage rectangular area this
+ * export it to user-space.
+ *
+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
+ */
+struct drm_mode_rect {
+   __s32 x1;
+   __s32 y1;
+   __s32 x2;
+   __s32 y2;
+};
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index e39b26d4bb3d..bc658583a2b1 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1486,9 +1486,52 @@ struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY   1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY0
 #define   I915_CONTEXT_MIN_USER_PRIORITY   -1023 /* inclusive */
+   /*
+* When using the following param, value should be a pointer to
+* drm_i915_gem_context_param_sseu.
+*/
+#define I915_CONTEXT_PARAM_SSEU0x7
__u64 value;
 };
 
+struct drm_i915_gem_context_param_sseu {
+   /*
+* Engine class & instance to be configured or queried.
+*/
+   __u16 class;
+   __u16 instance;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 flags;
+
+   /*
+* Mask of slices to enable for the context. Valid values are a subset
+* of the bitmask value returned for I915_PARAM_SLICE_MASK.
+*/
+   __u64 slice_mask;
+
+   /*
+* Mask of subslices to enable for the context. Valid values are a
+* subset of the bitmask value return by I915_PARAM_SUBSLICE_MASK.
+*/
+   __u64 subslice_mask;
+
+   /*
+* Minimum/Maximum number of EUs to enable per subslice for the
+* context. min_eus_per_subslice must be inferior or equal to
+* max_eus_per_subslice.
+*/
+   __u16 min_eus_per_subslice;
+   __u16 max_eus_per_subslice;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 rsvd;
+};
+
 enum drm_i915_oa_format {
I915_OA_FORMAT_A13 = 1, /* HSW only */
I915_OA_FORMAT_A29, /* HSW only */
diff --git a/include/drm-uapi/msm_drm.h b/include/drm-uapi/msm_drm.h
index c06d0a5bdd80..91a16b333c69 100644
--- a/include/drm-uapi/msm_drm.h
+++ b/include/drm-uapi/msm_drm.h
@@ -105,14 +105,24 @@ 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_OFFSET0x00   /* get mmap() offset, returned by value 
*/
+#define MSM_INFO_GET_IOVA  0x01   /* get iova, returned by value */
+#define MSM_INFO_SET_NAME  0x02   /* set the debug name (by pointer) */
+#define MSM_INFO_GET_NAME  0x03   /* get debug name, returned by pointer */
 
 struct drm_msm_gem_info {
__u32 handle; /* in */
-   __u32 flags;  /* in - combination of MSM

[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2019-01-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

---
 include/drm-uapi/drm_fourcc.h |  2 +-
 include/drm-uapi/drm_mode.h   | 19 
 include/drm-uapi/i915_drm.h   | 43 +++
 include/drm-uapi/msm_drm.h| 25 +++-
 include/drm-uapi/v3d_drm.h| 33 +++
 5 files changed, 115 insertions(+), 7 deletions(-)

diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h
index 4ddf754bab09..0b44260a5ee9 100644
--- a/include/drm-uapi/drm_fourcc.h
+++ b/include/drm-uapi/drm_fourcc.h
@@ -151,7 +151,7 @@ extern "C" {
 #define DRM_FORMAT_VYUYfourcc_code('V', 'Y', 'U', 'Y') /* 
[31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
 
 #define DRM_FORMAT_AYUVfourcc_code('A', 'Y', 'U', 'V') /* 
[31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
-#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* [31:0] 
X:Y:Cb:Cr 8:8:8:8 little endian */
+#define DRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U', 'V') /* 
[31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
 /*
  * packed YCbCr420 2x2 tiled formats
diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index d3e0fe31efc5..a439c2e67896 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -888,6 +888,25 @@ struct drm_mode_revoke_lease {
__u32 lessee_id;
 };
 
+/**
+ * struct drm_mode_rect - Two dimensional rectangle.
+ * @x1: Horizontal starting coordinate (inclusive).
+ * @y1: Vertical starting coordinate (inclusive).
+ * @x2: Horizontal ending coordinate (exclusive).
+ * @y2: Vertical ending coordinate (exclusive).
+ *
+ * With drm subsystem using struct drm_rect to manage rectangular area this
+ * export it to user-space.
+ *
+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
+ */
+struct drm_mode_rect {
+   __s32 x1;
+   __s32 y1;
+   __s32 x2;
+   __s32 y2;
+};
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index e39b26d4bb3d..bc658583a2b1 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1486,9 +1486,52 @@ struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY   1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY0
 #define   I915_CONTEXT_MIN_USER_PRIORITY   -1023 /* inclusive */
+   /*
+* When using the following param, value should be a pointer to
+* drm_i915_gem_context_param_sseu.
+*/
+#define I915_CONTEXT_PARAM_SSEU0x7
__u64 value;
 };
 
+struct drm_i915_gem_context_param_sseu {
+   /*
+* Engine class & instance to be configured or queried.
+*/
+   __u16 class;
+   __u16 instance;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 flags;
+
+   /*
+* Mask of slices to enable for the context. Valid values are a subset
+* of the bitmask value returned for I915_PARAM_SLICE_MASK.
+*/
+   __u64 slice_mask;
+
+   /*
+* Mask of subslices to enable for the context. Valid values are a
+* subset of the bitmask value return by I915_PARAM_SUBSLICE_MASK.
+*/
+   __u64 subslice_mask;
+
+   /*
+* Minimum/Maximum number of EUs to enable per subslice for the
+* context. min_eus_per_subslice must be inferior or equal to
+* max_eus_per_subslice.
+*/
+   __u16 min_eus_per_subslice;
+   __u16 max_eus_per_subslice;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 rsvd;
+};
+
 enum drm_i915_oa_format {
I915_OA_FORMAT_A13 = 1, /* HSW only */
I915_OA_FORMAT_A29, /* HSW only */
diff --git a/include/drm-uapi/msm_drm.h b/include/drm-uapi/msm_drm.h
index c06d0a5bdd80..91a16b333c69 100644
--- a/include/drm-uapi/msm_drm.h
+++ b/include/drm-uapi/msm_drm.h
@@ -105,14 +105,24 @@ 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_OFFSET0x00   /* get mmap() offset, returned by value 
*/
+#define MSM_INFO_GET_IOVA  0x01   /* get iova, returned by value */
+#define MSM_INFO_SET_NAME  0x02   /* set the debug name (by pointer) */
+#define MSM_INFO_GET_NAME  0x03   /* get debug name, returned by pointer */
 
 struct drm_msm_gem_info {
__u32 handle; /* in */
-   __u32 flags;  /* in - combination of MSM_INFO_* flags */
-   __u64 offset; /* out, mmap() offset

[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2018-12-13 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

---
 include/drm-uapi/drm_mode.h | 19 
 include/drm-uapi/i915_drm.h | 43 +
 include/drm-uapi/msm_drm.h  | 25 +++--
 include/drm-uapi/v3d_drm.h  | 33 
 4 files changed, 114 insertions(+), 6 deletions(-)

diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index d3e0fe31efc5..a439c2e67896 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -888,6 +888,25 @@ struct drm_mode_revoke_lease {
__u32 lessee_id;
 };
 
+/**
+ * struct drm_mode_rect - Two dimensional rectangle.
+ * @x1: Horizontal starting coordinate (inclusive).
+ * @y1: Vertical starting coordinate (inclusive).
+ * @x2: Horizontal ending coordinate (exclusive).
+ * @y2: Vertical ending coordinate (exclusive).
+ *
+ * With drm subsystem using struct drm_rect to manage rectangular area this
+ * export it to user-space.
+ *
+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
+ */
+struct drm_mode_rect {
+   __s32 x1;
+   __s32 y1;
+   __s32 x2;
+   __s32 y2;
+};
+
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index e39b26d4bb3d..6b43c34bc436 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1486,9 +1486,52 @@ struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY   1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY0
 #define   I915_CONTEXT_MIN_USER_PRIORITY   -1023 /* inclusive */
+   /*
+* When using the following param, value should be a pointer to
+* drm_i915_gem_context_param_sseu.
+*/
+#define I915_CONTEXT_PARAM_SSEU0x7
__u64 value;
 };
 
+struct drm_i915_gem_context_param_sseu {
+   /*
+* Engine class & instance to be configured or queried.
+*/
+   __u16 class;
+   __u16 instance;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 rsvd1;
+
+   /*
+* Mask of slices to enable for the context. Valid values are a subset
+* of the bitmask value returned for I915_PARAM_SLICE_MASK.
+*/
+   __u64 slice_mask;
+
+   /*
+* Mask of subslices to enable for the context. Valid values are a
+* subset of the bitmask value return by I915_PARAM_SUBSLICE_MASK.
+*/
+   __u64 subslice_mask;
+
+   /*
+* Minimum/Maximum number of EUs to enable per subslice for the
+* context. min_eus_per_subslice must be inferior or equal to
+* max_eus_per_subslice.
+*/
+   __u16 min_eus_per_subslice;
+   __u16 max_eus_per_subslice;
+
+   /*
+* Unused for now. Must be cleared to zero.
+*/
+   __u32 rsvd2;
+};
+
 enum drm_i915_oa_format {
I915_OA_FORMAT_A13 = 1, /* HSW only */
I915_OA_FORMAT_A29, /* HSW only */
diff --git a/include/drm-uapi/msm_drm.h b/include/drm-uapi/msm_drm.h
index c06d0a5bdd80..91a16b333c69 100644
--- a/include/drm-uapi/msm_drm.h
+++ b/include/drm-uapi/msm_drm.h
@@ -105,14 +105,24 @@ 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_OFFSET0x00   /* get mmap() offset, returned by value 
*/
+#define MSM_INFO_GET_IOVA  0x01   /* get iova, returned by value */
+#define MSM_INFO_SET_NAME  0x02   /* set the debug name (by pointer) */
+#define MSM_INFO_GET_NAME  0x03   /* get debug name, returned by pointer */
 
 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_READ0x01
@@ -188,8 +198,11 @@ struct drm_msm_gem_submit_cmd {
  */
 #define MSM_SUBMIT_BO_READ 0x0001
 #define MSM_SUBMIT_BO_WRITE0x0002
+#define MSM_SUBMIT_BO_DUMP 0x0004
 
-#define MSM_SUBMIT_BO_FLAGS(MSM_SUBMIT_BO_READ | 
MSM_SUBMIT_BO_WRITE)
+#define MSM_SUBMIT_BO_FLAGS(MSM_SUBMIT_BO_READ | \
+   MSM_SUBMIT_BO_WRITE | \
+   MSM_SUBMIT_BO_DUMP)
 
 struct drm_msm_gem_submit_bo {
__u32 flags;  /* in, mask of M

[Intel-gfx] [PATCH i-g-t 1/4] headers: bump

2018-11-13 Thread Tvrtko Ursulin
From: Lionel Landwerlin 

---
 include/drm-uapi/amdgpu_drm.h  |  52 +++-
 include/drm-uapi/drm.h |  17 ++
 include/drm-uapi/drm_fourcc.h  | 224 +++
 include/drm-uapi/drm_mode.h|  26 +-
 include/drm-uapi/etnaviv_drm.h |   6 +
 include/drm-uapi/exynos_drm.h  | 240 
 include/drm-uapi/i915_drm.h|  80 ++
 include/drm-uapi/msm_drm.h |   2 +
 include/drm-uapi/tegra_drm.h   | 492 -
 include/drm-uapi/v3d_drm.h | 204 ++
 include/drm-uapi/vc4_drm.h |  13 +-
 include/drm-uapi/virtgpu_drm.h |   1 +
 include/drm-uapi/vmwgfx_drm.h  | 166 ---
 13 files changed, 1467 insertions(+), 56 deletions(-)
 create mode 100644 include/drm-uapi/v3d_drm.h

diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h
index 1816bd8200d1..370e9a5536ef 100644
--- a/include/drm-uapi/amdgpu_drm.h
+++ b/include/drm-uapi/amdgpu_drm.h
@@ -72,12 +72,41 @@ extern "C" {
 #define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + 
DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle)
 #define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + 
DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
 
+/**
+ * DOC: memory domains
+ *
+ * %AMDGPU_GEM_DOMAIN_CPU  System memory that is not GPU accessible.
+ * Memory in this pool could be swapped out to disk if there is pressure.
+ *
+ * %AMDGPU_GEM_DOMAIN_GTT  GPU accessible system memory, mapped into the
+ * GPU's virtual address space via gart. Gart memory linearizes non-contiguous
+ * pages of system memory, allows GPU access system memory in a linezrized
+ * fashion.
+ *
+ * %AMDGPU_GEM_DOMAIN_VRAM Local video memory. For APUs, it is memory
+ * carved out by the BIOS.
+ *
+ * %AMDGPU_GEM_DOMAIN_GDS  Global on-chip data storage used to share data
+ * across shader threads.
+ *
+ * %AMDGPU_GEM_DOMAIN_GWS  Global wave sync, used to synchronize the
+ * execution of all the waves on a device.
+ *
+ * %AMDGPU_GEM_DOMAIN_OA   Ordered append, used by 3D or Compute engines
+ * for appending data.
+ */
 #define AMDGPU_GEM_DOMAIN_CPU  0x1
 #define AMDGPU_GEM_DOMAIN_GTT  0x2
 #define AMDGPU_GEM_DOMAIN_VRAM 0x4
 #define AMDGPU_GEM_DOMAIN_GDS  0x8
 #define AMDGPU_GEM_DOMAIN_GWS  0x10
 #define AMDGPU_GEM_DOMAIN_OA   0x20
+#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
+AMDGPU_GEM_DOMAIN_GTT | \
+AMDGPU_GEM_DOMAIN_VRAM | \
+AMDGPU_GEM_DOMAIN_GDS | \
+AMDGPU_GEM_DOMAIN_GWS | \
+AMDGPU_GEM_DOMAIN_OA)
 
 /* Flag that CPU access will be required for the case of VRAM domain */
 #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED  (1 << 0)
@@ -95,6 +124,10 @@ extern "C" {
 #define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID  (1 << 6)
 /* Flag that BO sharing will be explicitly synchronized */
 #define AMDGPU_GEM_CREATE_EXPLICIT_SYNC(1 << 7)
+/* Flag that indicates allocating MQD gart on GFX9, where the mtype
+ * for the second page onward should be set to NC.
+ */
+#define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8)
 
 struct drm_amdgpu_gem_create_in  {
/** the requested memory size */
@@ -473,7 +506,8 @@ struct drm_amdgpu_gem_va {
 #define AMDGPU_HW_IP_UVD_ENC  5
 #define AMDGPU_HW_IP_VCN_DEC  6
 #define AMDGPU_HW_IP_VCN_ENC  7
-#define AMDGPU_HW_IP_NUM  8
+#define AMDGPU_HW_IP_VCN_JPEG 8
+#define AMDGPU_HW_IP_NUM  9
 
 #define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
 
@@ -482,6 +516,7 @@ struct drm_amdgpu_gem_va {
 #define AMDGPU_CHUNK_ID_DEPENDENCIES   0x03
 #define AMDGPU_CHUNK_ID_SYNCOBJ_IN  0x04
 #define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05
+#define AMDGPU_CHUNK_ID_BO_HANDLES  0x06
 
 struct drm_amdgpu_cs_chunk {
__u32   chunk_id;
@@ -520,6 +555,10 @@ union drm_amdgpu_cs {
 /* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */
 #define AMDGPU_IB_FLAG_PREEMPT (1<<2)
 
+/* The IB fence should do the L2 writeback but not invalidate any shader
+ * caches (L2/vL1/sL1/I$). */
+#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3)
+
 struct drm_amdgpu_cs_chunk_ib {
__u32 _pad;
/** AMDGPU_IB_FLAG_* */
@@ -618,6 +657,16 @@ struct drm_amdgpu_cs_chunk_data {
#define AMDGPU_INFO_FW_SOS  0x0c
/* Subquery id: Query PSP ASD firmware version */
#define AMDGPU_INFO_FW_ASD  0x0d
+   /* Subquery id: Query VCN firmware version */
+   #define AMDGPU_INFO_FW_VCN  0x0e
+   /* Subquery id: Query GFX RLC SRLC firmware version */
+   #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f
+   /* Subquery id: Query GFX RLC SRLG firmware version */
+   #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10
+   /* Subquery id: Query GFX RL