Skip to contentSkip to conversation

drm/i915: Allow user to set cache at BO creation

PATCH In review [email protected] 5 participants 19 messages May 31, 2023 – Jun 6, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v15 cover drm/i915: Allow user to set cache at BO creation

From: Fei Yang <[email protected]>

This series introduce a new extension for GEM_CREATE,
1. end support for set caching ioctl [PATCH 1/2]
2. add set_pat extension for gem_create [PATCH 2/2]

v2: drop one patch that was merged separately

    commit 341ad0e8e254 ("drm/i915/mtl: Add PTE encode function")

v3: rebased on https://patchwork.freedesktop.org/series/117082/
v4: fix missing unlock introduced in v3, and
solve a rebase conflict
v5: replace obj->cache_level with pat_set_by_user,
fix i915_cache_level_str() for legacy platforms.
v6: rebased on https://patchwork.freedesktop.org/series/117480/
v7: rebased on https://patchwork.freedesktop.org/series/117528/
v8: dropped the two dependent patches that has been merged
separately. Add IGT link and Tested-by (MESA).
v9: addressing comments (Andi)
v10: acked-by and tested-by MESA
v11: drop "end support for set caching ioctl" (merged)
remove tools/include/uapi/drm/i915_drm.h
v12: drop Bspec reference in comment. add to commit message instead
v13: sent to test with igt@gem_create@create-ext-set-pat
v14: sent to test with igt@gem_create@create-ext-set-pat
v15: update commit message with documentation note and t-b/a-b from
Media driver folks.

Fei Yang (1):
drm/i915: Allow user to set cache at BO creation

 drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
 include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v15 1/1 drm/i915: Allow user to set cache at BO creation

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
 drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
 include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
 	unsigned int n_placements;
 	unsigned int placement_mask;
 	unsigned long flags;
+	unsigned int pat_index;
 };
 
 static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
 	return 0;
 }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+	struct create_ext *ext_data = data;
+	struct drm_i915_private *i915 = ext_data->i915;
+	struct drm_i915_gem_create_ext_set_pat ext;
+	unsigned int max_pat_index;
+
+	BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+		     offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+	if (copy_from_user(&ext, base, sizeof(ext)))
+		return -EFAULT;
+
+	max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+	if (ext.pat_index > max_pat_index) {
+		drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+			ext.pat_index);
+		return -EINVAL;
+	}
+
+	ext_data->pat_index = ext.pat_index;
+
+	return 0;
+}
+
 static const i915_user_extension_fn create_extensions[] = {
 	[I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
 	[I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+	[I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
 };
 
+#define PAT_INDEX_NOT_SET	0xffff
 /**
  * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
  * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
 	if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
 		return -EINVAL;
 
+	ext_data.pat_index = PAT_INDEX_NOT_SET;
 	ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
 				   create_extensions,
 				   ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
 	if (IS_ERR(obj))
 		return PTR_ERR(obj);
 
+	if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+		i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+		/* Mark pat_index is set by UMD */
+		obj->pat_set_by_user = true;
+	}
+
 	return i915_gem_publish(obj, file, &args->size, &args->handle);
 }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
 	if (!(obj->flags & I915_BO_ALLOC_USER))
 		return false;
 
+	/*
+	 * Always flush cache for UMD objects at creation time.
+	 */
+	if (obj->pat_set_by_user)
+		return true;
+
 	/*
 	 * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
 	 * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -0

56 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

Hi Fei,

Quoted 14 lines · On Wed, May 31, 2023 at 10:10:08AM -0700, [email protected] wrote:

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Quoted 3 lines

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

Documentation has been updated:

https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html

If it's OK with you, before pushing I can replace this Note with:

"
The documentation related to the PAT/MOCS tables is currently available for Tiger Lake here:

https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html
"

Thank you Tvrtko for the intution you had about the documentation and for pushing for the update. It is greate to have this uAPI well documented!

Andi

Quoted 181 lines

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
 drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
 include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
 	unsigned int n_placements;
 	unsigned int placement_mask;
 	unsigned long flags;
+	unsigned int pat_index;
 };
 
 static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
 	return 0;
 }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+	struct create_ext *ext_data = data;
+	struct drm_i915_private *i915 = ext_data->i915;
+	struct drm_i915_gem_create_ext_set_pat ext;
+	unsigned int max_pat_index;
+
+	BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+		     offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+	if (copy_from_user(&ext, base, sizeof(ext)))
+		return -EFAULT;
+
+	max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+	if (ext.pat_index > max_pat_index) {
+		drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+			ext.pat_index);
+		return -EINVAL;
+	}
+
+	ext_data->pat_index = ext.pat_index;
+
+	return 0;
+}
+
 static const i915_user_extension_fn create_extensions[] = {
 	[I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
 	[I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+	[I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
 };
 
+#define PAT_INDEX_NOT_SET	0xffff
 /**
  * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
  * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
 	if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
 		return -EINVAL;
 
+	ext_data.pat_index = PAT_INDEX_NOT_SET;
 	ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
 				   create_extensions,
 				   ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
 	if (IS_ERR(obj))
 		return PTR_ERR(obj);
 
+	if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+		i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+		/* Mark pat_index is set by UMD */
+		obj->pat_set_by_user = true;
+	}
+
 	return i915_gem_publish(obj, file, &args->size, &args->handle);
 }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
 	if (!(obj->flags & I915_BO_ALLOC_USER))
 		return false;
 
+	/*
+	 * Always flush cache for UMD objects at creation time.
+	 */
+	if (obj->pat_set_by_user)
+		return true;
+
 	/*
 	 * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
 	 * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -0
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
 	 *
 	 * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
 	 * struct drm_i915_gem_create_ext_protected_content.
+	 *
+	 * For I915_GEM_CREATE_EXT_SET_PAT usage see
+	 * struct drm_i915_gem_create_ext_set_pat.
 	 */
 #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
 #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
 	__u64 extensions;
 };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
 	__u32 flags;
 };
 
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+	/** @base: Extension link. See struct i915_user_extension. */
+	struct i915_user_extension base;
+	/**
+	 * @pat_index: PAT index to be set
+	 * PAT index is a bit field in Page Table Entry to control caching
+	 * behaviors for GPU accesses. The definition of PAT index is
+	 * platform dependent and can be found in hardware specifications,
+	 */
+	__u32 pat_index;
+	/** @rsvd: reserved for future use */
+	__u32 rsvd;
+};
+
 /* ID of the protected content session managed by i915 when PXP is active */
 #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
Signature · 1 line
2.25.1
author
#3 lore raw
Quoted 25 lines

Hi Fei,

Quoted 14 lines · On Wed, May 31, 2023 at 10:10:08AM -0700, [email protected] wrote:

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Quoted 3 lines

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

Documentation has been updated:

https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html

Quoted 8 lines

If it's OK with you, before pushing I can replace this Note with:

"
The documentation related to the PAT/MOCS tables is currently available for Tiger Lake here:

https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html
"

Looks good to me. Thank you Andi and Tvrtko for all your help.

-Fei

Quoted 187 lines

Thank you Tvrtko for the intution you had about the documentation and for pushing for the update. It is greate to have this uAPI well documented!

Andi

Quoted 181 lines

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
 drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
 include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
       unsigned int n_placements;
       unsigned int placement_mask;
       unsigned long flags;
+     unsigned int pat_index;
 };
 
 static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
       return 0;
 }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+     struct create_ext *ext_data = data;
+     struct drm_i915_private *i915 = ext_data->i915;
+     struct drm_i915_gem_create_ext_set_pat ext;
+     unsigned int max_pat_index;
+
+     BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+                  offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+     if (copy_from_user(&ext, base, sizeof(ext)))
+             return -EFAULT;
+
+     max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+     if (ext.pat_index > max_pat_index) {
+             drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+                     ext.pat_index);
+             return -EINVAL;
+     }
+
+     ext_data->pat_index = ext.pat_index;
+
+     return 0;
+}
+
 static const i915_user_extension_fn create_extensions[] = {
       [I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
       [I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+     [I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
 };
 
+#define PAT_INDEX_NOT_SET    0xffff
 /**
  * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
  * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
               return -EINVAL;
 
+     ext_data.pat_index = PAT_INDEX_NOT_SET;
       ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
                                  create_extensions,
                                  ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (IS_ERR(obj))
               return PTR_ERR(obj);
 
+     if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+             i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+             /* Mark pat_index is set by UMD */
+             obj->pat_set_by_user = true;
+     }
+
       return i915_gem_publish(obj, file, &args->size, &args->handle);
 }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
       if (!(obj->flags & I915_BO_ALLOC_USER))
               return false;
 
+     /*
+      * Always flush cache for UMD objects at creation time.
+      */
+     if (obj->pat_set_by_user)
+             return true;
+
       /*
        * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
        * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -1
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
        *
        * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
        * struct drm_i915_gem_create_ext_protected_content.
+      *
+      * For I915_GEM_CREATE_EXT_SET_PAT usage see
+      * struct drm_i915_gem_create_ext_set_pat.
        */
 #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
 #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
       __u64 extensions;
 };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
       __u32 flags;
 };
 
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+     /** @base: Extension link. See struct i915_user_extension. */
+     struct i915_user_extension base;
+     /**
+      * @pat_index: PAT index to be set
+      * PAT index is a bit field in Page Table Entry to control caching
+      * behaviors for GPU accesses. The definition of PAT index is
+      * platform dependent and can be found in hardware specifications,
+      */
+     __u32 pat_index;
+     /** @rsvd: reserved for future use */
+     __u32 rsvd;
+};
+
 /* ID of the protected content session managed by i915 when PXP is active */
 #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
--

2.25.1

#4 lore raw
In reply to [email protected]
Quoted 20 lines · On 31/05/2023 18:10, [email protected] wrote:

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

BSpec: 45101

Quoted 7 lines

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

On which platforms will media-driver use the uapi? I couldn't easily figure out myself from the links above and also in the master branch I couldn't find the implementation of CachePolicyGetPATIndex.

Now that PRMs for Tigerlake have been published and Meteorlake situation is documented indirectly in Mesa code, my only remaining concern is with the older platforms. So if there is no particular reason to have the extension working on those, I would strongly suggest we disable there.

For a precedent see I915_CONTEXT_PARAM_SSEU and how it allows the extension only on Gen11 and only for a very specific usecase (see restrictions in set_sseu() and i915_gem_user_to_context_sseu()).

Regards,

Tvrtko

Quoted 170 lines

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
  	unsigned int n_placements;
  	unsigned int placement_mask;
  	unsigned long flags;
+	unsigned int pat_index;
  };
 
  static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
  	return 0;
  }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+	struct create_ext *ext_data = data;
+	struct drm_i915_private *i915 = ext_data->i915;
+	struct drm_i915_gem_create_ext_set_pat ext;
+	unsigned int max_pat_index;
+
+	BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+		     offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+	if (copy_from_user(&ext, base, sizeof(ext)))
+		return -EFAULT;
+
+	max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+	if (ext.pat_index > max_pat_index) {
+		drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+			ext.pat_index);
+		return -EINVAL;
+	}
+
+	ext_data->pat_index = ext.pat_index;
+
+	return 0;
+}
+
  static const i915_user_extension_fn create_extensions[] = {
  	[I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
  	[I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+	[I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
  };
 
+#define PAT_INDEX_NOT_SET	0xffff
  /**
   * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
   * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
  	if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
  		return -EINVAL;
 
+	ext_data.pat_index = PAT_INDEX_NOT_SET;
  	ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
  				   create_extensions,
  				   ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
  	if (IS_ERR(obj))
  		return PTR_ERR(obj);
 
+	if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+		i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+		/* Mark pat_index is set by UMD */
+		obj->pat_set_by_user = true;
+	}
+
  	return i915_gem_publish(obj, file, &args->size, &args->handle);
  }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
  	if (!(obj->flags & I915_BO_ALLOC_USER))
  		return false;
 
+	/*
+	 * Always flush cache for UMD objects at creation time.
+	 */
+	if (obj->pat_set_by_user)
+		return true;
+
  	/*
  	 * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
  	 * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -0
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
  	 *
  	 * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
  	 * struct drm_i915_gem_create_ext_protected_content.
+	 *
+	 * For I915_GEM_CREATE_EXT_SET_PAT usage see
+	 * struct drm_i915_gem_create_ext_set_pat.
  	 */
  #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
  #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
  	__u64 extensions;
  };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
  	__u32 flags;
  };
 
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+	/** @base: Extension link. See struct i915_user_extension. */
+	struct i915_user_extension base;
+	/**
+	 * @pat_index: PAT index to be set
+	 * PAT index is a bit field in Page Table Entry to control caching
+	 * behaviors for GPU accesses. The definition of PAT index is
+	 * platform dependent and can be found in hardware specifications,
+	 */
+	__u32 pat_index;
+	/** @rsvd: reserved for future use */
+	__u32 rsvd;
+};
+
  /* ID of the protected content session managed by i915 when PXP is active */
  #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
author
#5 lore raw
Quoted 24 lines · On 31/05/2023 18:10, [email protected] wrote:
Quoted 23 lines

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

Quoted 8 lines
Quoted 4 lines

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

On which platforms will media-driver use the uapi? I couldn't easily figure out myself from the links above and also in the master branch I couldn't find the implementation of CachePolicyGetPATIndex.

These commits look like platform independent. Carl, could you chime in here?

Quoted 4 lines

Now that PRMs for Tigerlake have been published and Meteorlake situation is documented indirectly in Mesa code, my only remaining concern is with the older platforms. So if there is no particular reason to have the extension working on those, I would strongly suggest we disable there.

What's the concern? There is no change required for older platforms, existing user space code should continue to work. And this extension should be made available for any new development because the cache settings for BO's need to be immutable. And that is platform independent.

Quoted 178 lines

For a precedent see I915_CONTEXT_PARAM_SSEU and how it allows the extension only on Gen11 and only for a very specific usecase (see restrictions in set_sseu() and i915_gem_user_to_context_sseu()).

Regards,

Tvrtko

Quoted 170 lines

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
       unsigned int n_placements;
       unsigned int placement_mask;
       unsigned long flags;
+     unsigned int pat_index;
  };
 
  static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
       return 0;
  }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+     struct create_ext *ext_data = data;
+     struct drm_i915_private *i915 = ext_data->i915;
+     struct drm_i915_gem_create_ext_set_pat ext;
+     unsigned int max_pat_index;
+
+     BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+                  offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+     if (copy_from_user(&ext, base, sizeof(ext)))
+             return -EFAULT;
+
+     max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+     if (ext.pat_index > max_pat_index) {
+             drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+                     ext.pat_index);
+             return -EINVAL;
+     }
+
+     ext_data->pat_index = ext.pat_index;
+
+     return 0;
+}
+
  static const i915_user_extension_fn create_extensions[] = {
       [I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
       [I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+     [I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
  };
 
+#define PAT_INDEX_NOT_SET    0xffff
  /**
   * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
   * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
               return -EINVAL;
 
+     ext_data.pat_index = PAT_INDEX_NOT_SET;
       ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
                                  create_extensions,
                                  ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (IS_ERR(obj))
               return PTR_ERR(obj);
 
+     if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+             i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+             /* Mark pat_index is set by UMD */
+             obj->pat_set_by_user = true;
+     }
+
       return i915_gem_publish(obj, file, &args->size, &args->handle);
  }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
       if (!(obj->flags & I915_BO_ALLOC_USER))
               return false;
 
+     /*
+      * Always flush cache for UMD objects at creation time.
+      */
+     if (obj->pat_set_by_user)
+             return true;
+
       /*
        * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
        * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -0
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
        *
        * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
        * struct drm_i915_gem_create_ext_protected_content.
+      *
+      * For I915_GEM_CREATE_EXT_SET_PAT usage see
+      * struct drm_i915_gem_create_ext_set_pat.
        */
  #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
  #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
       __u64 extensions;
  };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
       __u32 flags;
  };
 
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+     /** @base: Extension link. See struct i915_user_extension. */
+     struct i915_user_extension base;
+     /**
+      * @pat_index: PAT index to be set
+      * PAT index is a bit field in Page Table Entry to control caching
+      * behaviors for GPU accesses. The definition of PAT index is
+      * platform dependent and can be found in hardware specifications,
+      */
+     __u32 pat_index;
+     /** @rsvd: reserved for future use */
+     __u32 rsvd;
+};
+
  /* ID of the protected content session managed by i915 when PXP is active */
  #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
author
#6 lore raw
Quoted 29 lines
Quoted 29 lines · On 31/05/2023 18:10, [email protected] wrote:
Quoted 27 lines

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000

Quoted 5 lines
Quoted 3 lines

On which platforms will media-driver use the uapi? I couldn't easily figure out myself from the links above and also in the master branch I couldn't find the implementation of CachePolicyGetPATIndex.

These commits look like platform independent. Carl, could you chime in here?

Confirmed with Carl and Lihao offline that the media driver is calling set_pat extension in common code path, so the use of set_pat extension is platform independent. The only problem right now is that the gmm library is not returning correct PAT index for all hardware platforms, so on some platforms the call would be bypassed and fall back to the old way.
I think this is the correct implementation. It should be platform independent as long as the application knows what PAT index to set. Updating the gmm library to understand PAT index for each hardware platform is a separate issue.

Quoted 188 lines
Quoted 4 lines

Now that PRMs for Tigerlake have been published and Meteorlake situation is documented indirectly in Mesa code, my only remaining concern is with the older platforms. So if there is no particular reason to have the extension working on those, I would strongly suggest we disable there.

What's the concern? There is no change required for older platforms, existing user space code should continue to work. And this extension should be made available for any new development because the cache settings for BO's need to be immutable. And that is platform independent.

Quoted 178 lines

For a precedent see I915_CONTEXT_PARAM_SSEU and how it allows the extension only on Gen11 and only for a very specific usecase (see restrictions in set_sseu() and i915_gem_user_to_context_sseu()).

Regards,

Tvrtko

Quoted 170 lines

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_create.c +36 -0
index bfe1dbda4cb7..644a936248ad 100644
@@ -245,6 +245,7 @@ struct create_ext {
       unsigned int n_placements;
       unsigned int placement_mask;
       unsigned long flags;
+     unsigned int pat_index;
  };
 
  static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct i915_user_extension __user *base, void *data
       return 0;
  }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void *data)
+{
+     struct create_ext *ext_data = data;
+     struct drm_i915_private *i915 = ext_data->i915;
+     struct drm_i915_gem_create_ext_set_pat ext;
+     unsigned int max_pat_index;
+
+     BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+                  offsetofend(struct drm_i915_gem_create_ext_set_pat, rsvd));
+
+     if (copy_from_user(&ext, base, sizeof(ext)))
+             return -EFAULT;
+
+     max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+     if (ext.pat_index > max_pat_index) {
+             drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+                     ext.pat_index);
+             return -EINVAL;
+     }
+
+     ext_data->pat_index = ext.pat_index;
+
+     return 0;
+}
+
  static const i915_user_extension_fn create_extensions[] = {
       [I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
       [I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+     [I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
  };
 
+#define PAT_INDEX_NOT_SET    0xffff
  /**
   * i915_gem_create_ext_ioctl - Creates a new mm object and returns a handle to it.
   * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
               return -EINVAL;
 
+     ext_data.pat_index = PAT_INDEX_NOT_SET;
       ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
                                  create_extensions,
                                  ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void *data,
       if (IS_ERR(obj))
               return PTR_ERR(obj);
 
+     if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+             i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+             /* Mark pat_index is set by UMD */
+             obj->pat_set_by_user = true;
+     }
+
       return i915_gem_publish(obj, file, &args->size, &args->handle);
  }
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
index 46a19b099ec8..97ac6fb37958 100644
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj)
       if (!(obj->flags & I915_BO_ALLOC_USER))
               return false;
 
+     /*
+      * Always flush cache for UMD objects at creation time.
+      */
+     if (obj->pat_set_by_user)
+             return true;
+
       /*
        * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
        * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +41 -0
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
        *
        * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
        * struct drm_i915_gem_create_ext_protected_content.
+      *
+      * For I915_GEM_CREATE_EXT_SET_PAT usage see
+      * struct drm_i915_gem_create_ext_set_pat.
        */
  #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
  #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
       __u64 extensions;
  };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
       __u32 flags;
  };
 
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+     /** @base: Extension link. See struct i915_user_extension. */
+     struct i915_user_extension base;
+     /**
+      * @pat_index: PAT index to be set
+      * PAT index is a bit field in Page Table Entry to control caching
+      * behaviors for GPU accesses. The definition of PAT index is
+      * platform dependent and can be found in hardware specifications,
+      */
+     __u32 pat_index;
+     /** @rsvd: reserved for future use */
+     __u32 rsvd;
+};
+
  /* ID of the protected content session managed by i915 when PXP is active */
  #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
maintainer
#7 lore raw

Quoting Yang, Fei (2023-06-06 09:51:06)

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines · On 31/05/2023 18:10, [email protected] wrote:
Quoted 23 lines

From: Fei Yang <[email protected]>

To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at object creation time. The current code applies a default (platform dependent) cache setting for all objects. However this is not optimal for performance tuning. The patch extends the existing gem_create uAPI to let user set PAT index for the object at creation time.
The new extension is platform independent, so UMD's can switch to using this extension for older platforms as well, while {set, get}_caching are still supported on these legacy paltforms for compatibility reason.

Note: The detailed description of PAT index is missing in current PRM even for older hardware and will be added by the next PRM update under chapter name "Memory Views".

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The media driver is supported by the following commits:
https://github.com/intel/media-driver/commit/

92c00a857433ebb34ec575e9834f473c6fcb6341

Quoted 1 line
Quoted 1 line
Quoted 1 line

https://github.com/intel/media-driver/commit/

fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd

Quoted 1 line
Quoted 1 line
Quoted 1 line

https://github.com/intel/media-driver/commit/

08dd244b22484770a33464c2c8ae85430e548000

We absolutely should not have merged this code to master branch yet.

These should be reverted immediately and any releases that include the code must be pulled back.

This is clearly explained in:

https://www.kernel.org/doc/html/latest/gpu/drm-uapi.html#open-source-userspace-requirements

"The kernel patch can only be merged after all the above requirements are met, but it *must* be merged to either drm-next or drm-misc-next *before* the userspace patches land. uAPI always flows from the kernel, doing things the other way round risks divergence of the uAPI definitions and header files."

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

On which platforms will media-driver use the uapi? I couldn't easily figure out myself from the links above and also in the master branch I couldn't find the implementation of CachePolicyGetPATIndex.

These commits look like platform independent. Carl, could you chime in here?

Quoted 7 lines

Confirmed with Carl and Lihao offline that the media driver is calling set_pat extension in common code path, so the use of set_pat extension is platform independent. The only problem right now is that the gmm library is not returning
correct PAT index for all hardware platforms, so on some platforms the call would
be bypassed and fall back to the old way.

That means the code is unused for older platforms. The fact that there is potential to be used is not alone a reason for merging it.

So I agree with Tvrtko that we should only limit this to the newer platforms where we have actual use that is ready and reviewed.

We can extend to older platforms later, but in order not to block the progress please move the code for older platform to later series and only apply to platforms where this is needed.

Quoted 5 lines

I think this is the correct implementation. It should be platform independent as
long as the application knows what PAT index to set. Updating the gmm library to
understand PAT index for each hardware platform is a separate issue.

If we don't have userspace ready, we don't merge the code.

Regards, Joonas

Quoted 201 lines
Quoted 37 lines
Quoted 4 lines

Now that PRMs for Tigerlake have been published and Meteorlake situation is documented indirectly in Mesa code, my only remaining concern is with the older platforms. So if there is no particular reason to have the extension working on those, I would strongly suggest we disable there.

What's the concern? There is no change required for older platforms, existing user space code should continue to work. And this extension should be made available for any new development because the cache settings for BO's need to be immutable. And that is platform independent.

Quoted 27 lines

For a precedent see I915_CONTEXT_PARAM_SSEU and how it allows the extension only on Gen11 and only for a very specific usecase (see restrictions in set_sseu() and i915_gem_user_to_context_sseu()).

Regards,

Tvrtko

Quoted 19 lines

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

---
  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/

Quoted 1 line
drivers/gpu/drm/ renamed from drivers/gpu/drm/i915/gem/i915_gem_create.c +0 -0

i915/gem/i915_gem_create.c

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

index bfe1dbda4cb7..644a936248ad 100644

drivers/gpu/drm/i915/gem/i915_gem_create.c +1 -0
@@ -245,6 +245,7 @@ struct create_ext {
       unsigned int n_placements;
       unsigned int placement_mask;
       unsigned long flags;
+     unsigned int pat_index;
  };
 
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c static int ext_set_protected(struct

Quoted 2 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +0 -0
  static void repr_placements(char *buf, size_t size,
@@ -394,11 +395,39 @@ static int ext_set_protected(struct

i915_user_extension __user *base, void *data

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c static int ext_set_protected(struct i915_user_extension __user *base, void *data

Quoted 4 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +1 -0
       return 0;
  }
 
+static int ext_set_pat(struct i915_user_extension __user *base, void

*data)

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c static int ext_set_protected(struct i915_user_extension __user *base, void *data

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +8 -0
+{
+     struct create_ext *ext_data = data;
+     struct drm_i915_private *i915 = ext_data->i915;
+     struct drm_i915_gem_create_ext_set_pat ext;
+     unsigned int max_pat_index;
+
+     BUILD_BUG_ON(sizeof(struct drm_i915_gem_create_ext_set_pat) !=
+                  offsetofend(struct drm_i915_gem_create_ext_set_pat,

rsvd));

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +18 -0
+
+     if (copy_from_user(&ext, base, sizeof(ext)))
+             return -EFAULT;
+
+     max_pat_index = INTEL_INFO(i915)->max_pat_index;
+
+     if (ext.pat_index > max_pat_index) {
+             drm_dbg(&i915->drm, "PAT index is invalid: %u\n",
+                     ext.pat_index);
+             return -EINVAL;
+     }
+
+     ext_data->pat_index = ext.pat_index;
+
+     return 0;
+}
+
  static const i915_user_extension_fn create_extensions[] = {
       [I915_GEM_CREATE_EXT_MEMORY_REGIONS] = ext_set_placements,
       [I915_GEM_CREATE_EXT_PROTECTED_CONTENT] = ext_set_protected,
+     [I915_GEM_CREATE_EXT_SET_PAT] = ext_set_pat,
  };
 
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c static int ext_set_protected(struct i915_user_extension __user *base, void *data

Quoted 3 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +1 -0
+#define PAT_INDEX_NOT_SET    0xffff
  /**
   * i915_gem_create_ext_ioctl - Creates a new mm object and returns a

handle to it.

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c i915_gem_create_ext_ioctl(struct drm_device *dev, void

Quoted 2 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +0 -0
   * @dev: drm device pointer
@@ -418,6 +447,7 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void

*data,

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/gem/i915_gem_create.c i915_gem_create_ext_ioctl(struct drm_device *dev, void

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +1 -0
       if (args->flags & ~I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS)
               return -EINVAL;
 
+     ext_data.pat_index = PAT_INDEX_NOT_SET;
       ret = i915_user_extensions(u64_to_user_ptr(args->extensions),
                                  create_extensions,
                                  ARRAY_SIZE(create_extensions),
@@ -454,5 +484,11 @@ i915_gem_create_ext_ioctl(struct drm_device *dev, void

*data,

Quoted 12 lines
Quoted 12 lines

drivers/gpu/drm/

Quoted 12 lines
drivers/gpu/drm/i915/gem/i915_gem_create.c +6 -0
       if (IS_ERR(obj))
               return PTR_ERR(obj);
 
+     if (ext_data.pat_index != PAT_INDEX_NOT_SET) {
+             i915_gem_object_set_pat_index(obj, ext_data.pat_index);
+             /* Mark pat_index is set by UMD */
+             obj->pat_set_by_user = true;
+     }
+
       return i915_gem_publish(obj, file, &args->size, &args->handle);
  }
drivers/gpu/drm/ renamed from drivers/gpu/drm/i915/gem/i915_gem_object.c +0 -0

i915/gem/i915_gem_object.c

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/i915/gem/i915_gem_object.c bool i915_gem_object_can_bypass_llc(struct

Quoted 4 lines

index 46a19b099ec8..97ac6fb37958 100644

drivers/gpu/drm/i915/gem/i915_gem_object.c +0 -0
@@ -208,6 +208,12 @@ bool i915_gem_object_can_bypass_llc(struct

drm_i915_gem_object *obj)

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c +6 -0
       if (!(obj->flags & I915_BO_ALLOC_USER))
               return false;
 
+     /*
+      * Always flush cache for UMD objects at creation time.
+      */
+     if (obj->pat_set_by_user)
+             return true;
+
       /*
        * EHL and JSL add the 'Bypass LLC' MOCS entry, which should make it
        * possible for userspace to bypass the GTT caching bits set by the
include/uapi/drm/i915_drm.h +4 -0
index f31dfacde601..4083a23e0614 100644
@@ -3679,9 +3679,13 @@ struct drm_i915_gem_create_ext {
        *
        * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see
        * struct drm_i915_gem_create_ext_protected_content.
+      *
+      * For I915_GEM_CREATE_EXT_SET_PAT usage see
+      * struct drm_i915_gem_create_ext_set_pat.
        */
  #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
  #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1
+#define I915_GEM_CREATE_EXT_SET_PAT 2
       __u64 extensions;
  };
 
@@ -3796,6 +3800,43 @@ struct drm_i915_gem_create_ext_protected_content {
       __u32 flags;
  };
 
Quoted 5 lines
Quoted 5 lines

include/uapi/drm/i915_drm.h struct drm_i915_gem_create_ext_protected_content {

Quoted 5 lines
include/uapi/drm/i915_drm.h +5 -0
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index)

is

Quoted 3 lines
Quoted 3 lines

include/uapi/drm/i915_drm.h struct drm_i915_gem_create_ext_protected_content {

Quoted 3 lines
include/uapi/drm/i915_drm.h +3 -0
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching

policy:

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
include/uapi/drm/i915_drm.h +22 -0
+ *
+ * .. code-block:: C
+ *
+ *      struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ *              .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ *              .pat_index = 0,
+ *      };
+ *      struct drm_i915_gem_create_ext create_ext = {
+ *              .size = PAGE_SIZE,
+ *              .extensions = (uintptr_t)&set_pat_ext,
+ *      };
+ *
+ *      int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ *      if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+     /** @base: Extension link. See struct i915_user_extension. */
+     struct i915_user_extension base;
+     /**
+      * @pat_index: PAT index to be set
+      * PAT index is a bit field in Page Table Entry to control caching
+      * behaviors for GPU accesses. The definition of PAT index is
Quoted 8 lines
Quoted 8 lines

include/uapi/drm/i915_drm.h struct drm_i915_gem_create_ext_protected_content {

Quoted 8 lines
include/uapi/drm/i915_drm.h +7 -0
+      * platform dependent and can be found in hardware specifications,
+      */
+     __u32 pat_index;
+     /** @rsvd: reserved for future use */
+     __u32 rsvd;
+};
+
  /* ID of the protected content session managed by i915 when PXP is active

*/

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/uapi/drm/i915_drm.h +0 -0
  #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
#8 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Allow user to set cache at BO creation

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Allow user to set cache at BO creation
URL : https://patchwork.freedesktop.org/series/118660/
State : warning

== Summary ==

Error: dim checkpatch failed
d46f34f8bb0e drm/i915: Allow user to set cache at BO creation
-:28: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #28:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341

total: 0 errors, 1 warnings, 0 checks, 132 lines checked

#10 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Allow user to set cache at BO creation

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Allow user to set cache at BO creation
URL : https://patchwork.freedesktop.org/series/118660/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13210 -> Patchwork_118660v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_118660v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_118660v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/index.html

Participating hosts (37 -> 38)
------------------------------

Additional (1): fi-kbl-soraka

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_118660v1:

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s0@smem:
- fi-kbl-x1275: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/fi-kbl-x1275/igt@gem_exec_suspend@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-x1275/igt@gem_exec_suspend@[email protected]

Known issues
------------

Here are the changes found in Patchwork_118660v1 that come from known issues:

### CI changes ###

#### Possible fixes ####

* boot:
- fi-kbl-8809g: [FAIL][3] ([i915#8293] / [i915#8298]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/fi-kbl-8809g/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/boot.html

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- fi-kbl-8809g: NOTRUN -> [ABORT][5] ([i915#8298] / [i915#8299] / [i915#8397])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-kbl-8809g: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#2190])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-soraka/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#4613]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-soraka/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-hsw-4770: [PASS][9] -> [SKIP][10] ([fdo#109271])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/fi-hsw-4770/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-hsw-4770/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- fi-hsw-4770: [PASS][11] -> [FAIL][12] ([i915#7364])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/fi-hsw-4770/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-hsw-4770/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][13] ([i915#1886] / [i915#7913])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@guc:
- bat-rpls-1: [PASS][14] -> [DMESG-WARN][15] ([i915#7852])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/bat-rpls-1/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-skl-guc: [PASS][16] -> [DMESG-WARN][17] ([i915#8073])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/fi-skl-guc/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-skl-guc/igt@i915_selftest@[email protected]

* igt@kms_addfb_basic@too-high:
- fi-kbl-8809g: NOTRUN -> [FAIL][18] ([i915#8296]) +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]

* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][19] ([fdo#109271]) +14 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-soraka/igt@[email protected]

* igt@kms_force_connector_basic@force-connector-state:
- fi-kbl-8809g: NOTRUN -> [DMESG-FAIL][20] ([i915#8299])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]

* igt@kms_force_connector_basic@force-edid:
- fi-kbl-8809g: NOTRUN -> [CRASH][21] ([i915#8299])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]

* igt@kms_psr@cursor_plane_move:
- fi-kbl-8809g: NOTRUN -> [SKIP][22] ([fdo#109271]) +59 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@kms_psr@cursor_plane_move.html

* igt@kms_setmode@basic-clone-single-crtc:
- fi-kbl-soraka: NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#4579])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-soraka/igt@[email protected]
- fi-kbl-8809g: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#4579])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/fi-kbl-8809g/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@load:
- {bat-adlp-11}: [ABORT][25] ([i915#4423] / [i915#8189]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/bat-adlp-11/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/bat-adlp-11/igt@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-1: [DMESG-WARN][27] ([i915#6367]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/bat-rpls-1/igt@i915_selftest@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/bat-rpls-1/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][29] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#7981] / [i915#8347]) -> [ABORT][30] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/bat-rpls-2/igt@i915_selftest@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-rplp-1: [SKIP][31] ([i915#3555] / [i915#4579]) -> [ABORT][32] ([i915#4579] / [i915#8260])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13210/bat-rplp-1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/bat-rplp-1/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6121]: https://gitlab.freedesktop.org/drm/intel/issues/6121
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
[i915#7364]: https://gitlab.freedesktop.org/drm/intel/issues/7364
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7852]: https://gitlab.freedesktop.org/drm/intel/issues/7852
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8073]: https://gitlab.freedesktop.org/drm/intel/issues/8073
[i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189
[i915#8260]: https://gitlab.freedesktop.org/drm/intel/issues/8260
[i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
[i915#8296]: https://gitlab.freedesktop.org/drm/intel/issues/8296
[i915#8298]: https://gitlab.freedesktop.org/drm/intel/issues/8298
[i915#8299]: https://gitlab.freedesktop.org/drm/intel/issues/8299
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8397]: https://gitlab.freedesktop.org/drm/intel/issues/8397
[i915#8497]: https://gitlab.freedesktop.org/drm/intel/issues/8497

Build changes
-------------

* Linux: CI_DRM_13210 -> Patchwork_118660v1

CI-20190529: 20190529
CI_DRM_13210: a66da4c33d8ede541aea9ba6d0d73b556a072d54 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7314: ab70dfcdecf93a17fcaddb774855f726325fa0dd @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118660v1: a66da4c33d8ede541aea9ba6d0d73b556a072d54 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

eb294127af63 drm/i915: Allow user to set cache at BO creation

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v1/index.html

#11 lore raw
In reply to [email protected]
Quoted 27 lines · On 31/05/2023 18:10, [email protected] wrote:

From: Fei Yang <[email protected]>

This series introduce a new extension for GEM_CREATE,
1. end support for set caching ioctl [PATCH 1/2]
2. add set_pat extension for gem_create [PATCH 2/2]

v2: drop one patch that was merged separately

     commit 341ad0e8e254 ("drm/i915/mtl: Add PTE encode function")

v3: rebased on https://patchwork.freedesktop.org/series/117082/
v4: fix missing unlock introduced in v3, and
solve a rebase conflict
v5: replace obj->cache_level with pat_set_by_user,
fix i915_cache_level_str() for legacy platforms.
v6: rebased on https://patchwork.freedesktop.org/series/117480/
v7: rebased on https://patchwork.freedesktop.org/series/117528/
v8: dropped the two dependent patches that has been merged
separately. Add IGT link and Tested-by (MESA).
v9: addressing comments (Andi)
v10: acked-by and tested-by MESA
v11: drop "end support for set caching ioctl" (merged)
remove tools/include/uapi/drm/i915_drm.h
v12: drop Bspec reference in comment. add to commit message instead
v13: sent to test with igt@gem_create@create-ext-set-pat
v14: sent to test with igt@gem_create@create-ext-set-pat
v15: update commit message with documentation note and t-b/a-b from
Media driver folks.

Quoted 8 lines

Fei Yang (1):
drm/i915: Allow user to set cache at BO creation

  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)

Try with:

Test-with: [email protected]

That is how it is supposed to be done, to do a CI run against a test case not yet merged that is.

Regards,

Tvrtko

#12 lore raw
Quoted 38 lines · Tvrtko Ursulin
Quoted 27 lines · On 31/05/2023 18:10, [email protected] wrote:

From: Fei Yang <[email protected]>

This series introduce a new extension for GEM_CREATE,
1. end support for set caching ioctl [PATCH 1/2]
2. add set_pat extension for gem_create [PATCH 2/2]

v2: drop one patch that was merged separately
     commit 341ad0e8e254 ("drm/i915/mtl: Add PTE encode function")
v3: rebased on https://patchwork.freedesktop.org/series/117082/
v4: fix missing unlock introduced in v3, and
     solve a rebase conflict
v5: replace obj->cache_level with pat_set_by_user,
     fix i915_cache_level_str() for legacy platforms.
v6: rebased on https://patchwork.freedesktop.org/series/117480/
v7: rebased on https://patchwork.freedesktop.org/series/117528/
v8: dropped the two dependent patches that has been merged separately. Add IGT link and Tested-by (MESA).
v9: addressing comments (Andi)
v10: acked-by and tested-by MESA
v11: drop "end support for set caching ioctl" (merged) remove tools/include/uapi/drm/i915_drm.h
v12: drop Bspec reference in comment. add to commit message instead
v13: sent to test with igt@gem_create@create-ext-set-pat
v14: sent to test with igt@gem_create@create-ext-set-pat
v15: update commit message with documentation note and t-b/a-b from Media driver folks.

Quoted 8 lines

Fei Yang (1):
   drm/i915: Allow user to set cache at BO creation

  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++ include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++

  3 files changed, 83 insertions(+)
Quoted 5 lines

Try with:

Test-with: [email protected]

That is how it is supposed to be done, to do a CI run against a test case not yet merged that is.

Or I see that IGT has been since merged so you probably have results already?

Regards,

Tvrtko

#13 lore raw
Quoted 42 lines · Tvrtko Ursulin
Quoted 40 lines · Tvrtko Ursulin
Quoted 27 lines · On 31/05/2023 18:10, [email protected] wrote:

From: Fei Yang <[email protected]>

This series introduce a new extension for GEM_CREATE,
1. end support for set caching ioctl [PATCH 1/2]
2. add set_pat extension for gem_create [PATCH 2/2]

v2: drop one patch that was merged separately
     commit 341ad0e8e254 ("drm/i915/mtl: Add PTE encode function")
v3: rebased on https://patchwork.freedesktop.org/series/117082/
v4: fix missing unlock introduced in v3, and
     solve a rebase conflict
v5: replace obj->cache_level with pat_set_by_user,
     fix i915_cache_level_str() for legacy platforms.
v6: rebased on https://patchwork.freedesktop.org/series/117480/
v7: rebased on https://patchwork.freedesktop.org/series/117528/
v8: dropped the two dependent patches that has been merged separately. Add IGT link and Tested-by (MESA).
v9: addressing comments (Andi)
v10: acked-by and tested-by MESA
v11: drop "end support for set caching ioctl" (merged) remove tools/include/uapi/drm/i915_drm.h
v12: drop Bspec reference in comment. add to commit message instead
v13: sent to test with igt@gem_create@create-ext-set-pat
v14: sent to test with igt@gem_create@create-ext-set-pat
v15: update commit message with documentation note and t-b/a-b from Media driver folks.

Quoted 8 lines

Fei Yang (1):
   drm/i915: Allow user to set cache at BO creation

  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++ include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++

  3 files changed, 83 insertions(+)

Try with:

Quoted 7 lines
Quoted 4 lines

Test-with: [email protected]

That is how it is supposed to be done, to do a CI run against a test case not yet merged that is.

Or I see that IGT has been since merged so you probably have results already?

CI has stopped somewhere in the BAT tests. Can anyone hit the "Test revision 1 again" button? Fei, would you?

We had it tested some revisions back, though.

Andi

author
#14 lore raw
In reply to Tvrtko Ursulin
Quoted 38 lines · Tvrtko Ursulin
Quoted 37 lines · On 31/05/2023 18:10, [email protected] wrote:
Quoted 35 lines

From: Fei Yang <[email protected]>

This series introduce a new extension for GEM_CREATE,
1. end support for set caching ioctl [PATCH 1/2]
2. add set_pat extension for gem_create [PATCH 2/2]

v2: drop one patch that was merged separately

     commit 341ad0e8e254 ("drm/i915/mtl: Add PTE encode function")

v3: rebased on https://patchwork.freedesktop.org/series/117082/
v4: fix missing unlock introduced in v3, and
solve a rebase conflict
v5: replace obj->cache_level with pat_set_by_user,
fix i915_cache_level_str() for legacy platforms.
v6: rebased on https://patchwork.freedesktop.org/series/117480/
v7: rebased on https://patchwork.freedesktop.org/series/117528/
v8: dropped the two dependent patches that has been merged
separately. Add IGT link and Tested-by (MESA).
v9: addressing comments (Andi)
v10: acked-by and tested-by MESA
v11: drop "end support for set caching ioctl" (merged)
remove tools/include/uapi/drm/i915_drm.h
v12: drop Bspec reference in comment. add to commit message instead
v13: sent to test with igt@gem_create@create-ext-set-pat
v14: sent to test with igt@gem_create@create-ext-set-pat
v15: update commit message with documentation note and t-b/a-b from
Media driver folks.

Fei Yang (1):
drm/i915: Allow user to set cache at BO creation

  drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++++++++++++
  drivers/gpu/drm/i915/gem/i915_gem_object.c |  6 ++++
  include/uapi/drm/i915_drm.h                | 41 ++++++++++++++++++++++
  3 files changed, 83 insertions(+)
Quoted 6 lines
Quoted 6 lines

Try with:

Test-with: [email protected]

That is how it is supposed to be done, to do a CI run against a test case not yet merged that is.

Yes, the result can be found at https://patchwork.freedesktop.org/series/116870/
, under rev14, expand Fi.CI.IGT, you would see,

New IGT tests (1)
igt@gem_create@create-ext-set-pat:
Statuses : 6 pass(s)
Exec time: [0.0] s

Quoted 2 lines

Or I see that IGT has been since merged so you probably have results already?

Seems like the last update ran into some random failure which caused CI to stop.

Quoted 3 lines

Regards,

Tvrtko

#15 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Allow user to set cache at BO creation (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Allow user to set cache at BO creation (rev2)
URL : https://patchwork.freedesktop.org/series/118660/
State : warning

== Summary ==

Error: dim checkpatch failed
50bed5f80c75 drm/i915: Allow user to set cache at BO creation
-:28: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #28:
https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341

total: 0 errors, 1 warnings, 0 checks, 132 lines checked

#17 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Allow user to set cache at BO creation (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Allow user to set cache at BO creation (rev2)
URL : https://patchwork.freedesktop.org/series/118660/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13232 -> Patchwork_118660v2
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/index.html

Participating hosts (37 -> 36)
------------------------------

Additional (1): bat-rpls-2
Missing (2): fi-kbl-soraka fi-snb-2520m

Known issues
------------

Here are the changes found in Patchwork_118660v2 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-rpls-2: NOTRUN -> [SKIP][1] ([i915#7456])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@fbdev@read:
- bat-rpls-2: NOTRUN -> [SKIP][2] ([i915#2582]) +4 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@gem_lmem_swapping@verify-random:
- bat-rpls-2: NOTRUN -> [SKIP][3] ([i915#4613]) +3 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-rpls-2: NOTRUN -> [SKIP][4] ([i915#3282])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@gem_tiled_pread_basic.html

* igt@i915_pm_backlight@basic-brightness:
- bat-rpls-2: NOTRUN -> [SKIP][5] ([i915#7561])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@i915_pm_rps@basic-api:
- bat-rpls-2: NOTRUN -> [SKIP][6] ([i915#6621])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- bat-jsl-3: [PASS][7] -> [DMESG-FAIL][8] ([i915#5334])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/bat-jsl-3/igt@i915_selftest@live@gt_heartbeat.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-jsl-3/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_lrc:
- bat-adlp-9: [PASS][9] -> [INCOMPLETE][10] ([i915#7913])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/bat-adlp-9/igt@i915_selftest@live@gt_lrc.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-adlp-9/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@gt_pm:
- bat-rpls-2: NOTRUN -> [DMESG-FAIL][11] ([i915#4258] / [i915#7913])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@reset:
- bat-rpls-2: NOTRUN -> [ABORT][12] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-1: NOTRUN -> [DMESG-WARN][13] ([i915#6367])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- bat-rpls-1: NOTRUN -> [ABORT][14] ([i915#6687] / [i915#7978])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-1/igt@[email protected]

* igt@kms_busy@basic:
- bat-rpls-2: NOTRUN -> [SKIP][15] ([i915#1845]) +14 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@kms_chamelium_edid@hdmi-edid-read:
- bat-rpls-2: NOTRUN -> [SKIP][16] ([i915#7828]) +7 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@kms_flip@basic-flip-vs-dpms:
- bat-rpls-2: NOTRUN -> [SKIP][17] ([i915#3637]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-rpls-2: NOTRUN -> [SKIP][18] ([fdo#109285])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- bat-rpls-2: NOTRUN -> [SKIP][19] ([i915#1849])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1:
- bat-dg2-8: [PASS][20] -> [FAIL][21] ([i915#7932])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@sprite_plane_onoff:
- bat-rpls-2: NOTRUN -> [SKIP][22] ([i915#1072]) +3 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_setmode@basic-clone-single-crtc:
- bat-rpls-2: NOTRUN -> [SKIP][23] ([i915#3555] / [i915#4579])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- bat-rpls-2: NOTRUN -> [SKIP][24] ([fdo#109295] / [i915#1845] / [i915#3708])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

* igt@prime_vgem@basic-fence-read:
- bat-rpls-2: NOTRUN -> [SKIP][25] ([fdo#109295] / [i915#3708]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@reset:
- bat-rpls-1: [ABORT][26] ([i915#4983] / [i915#7461] / [i915#7981] / [i915#8347] / [i915#8384]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/bat-rpls-1/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@kms_busy@basic@flip:
- {bat-adlp-11}: [ABORT][28] ([i915#4423]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/bat-adlp-11/igt@kms_busy@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/bat-adlp-11/igt@kms_busy@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
[i915#7269]: https://gitlab.freedesktop.org/drm/intel/issues/7269
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7953]: https://gitlab.freedesktop.org/drm/intel/issues/7953
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8384]: https://gitlab.freedesktop.org/drm/intel/issues/8384

Build changes
-------------

* Linux: CI_DRM_13232 -> Patchwork_118660v2

CI-20190529: 20190529
CI_DRM_13232: 450d228e38403a48aa273ec1e22b463dc64aaae6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7319: 2e1bcd49944452b5f9516eecee48e1fa3ae6a636 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118660v2: 450d228e38403a48aa273ec1e22b463dc64aaae6 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

87a514ddeda2 drm/i915: Allow user to set cache at BO creation

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/index.html

#18 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Allow user to set cache at BO creation (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Allow user to set cache at BO creation (rev2)
URL : https://patchwork.freedesktop.org/series/118660/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13232_full -> Patchwork_118660v2_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (7 -> 6)
------------------------------

Missing (1): shard-dg1

Known issues
------------

Here are the changes found in Patchwork_118660v2_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_lmem_swapping@random:
- shard-glk: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#4613])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk2/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-apl: [PASS][2] -> [ABORT][3] ([i915#5566])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-apl6/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl1/igt@[email protected]

* igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#3886]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk2/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#3886]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl6/igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_ccs:
- shard-apl: NOTRUN -> [SKIP][6] ([fdo#109271]) +31 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl6/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_ccs.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#2346])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-glk8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk7/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-upscaling@pipe-a-valid-mode:
- shard-glk: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4579]) +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk2/igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-upscaling@pipe-a-valid-mode.html

* igt@kms_plane_scaling@planes-downscale-factor-0-75-unity-scaling@pipe-b-vga-1:
- shard-snb: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#4579]) +12 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-snb7/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-a-vga-1:
- shard-snb: NOTRUN -> [SKIP][11] ([fdo#109271]) +17 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-snb4/igt@kms_plane_scaling@[email protected]

* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf:
- shard-glk: NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#658])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk2/igt@[email protected]

* igt@kms_setmode@clone-exclusive-crtc:
- shard-apl: NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#4579])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl6/igt@[email protected]

* igt@v3d/v3d_perfmon@create-perfmon-exceed:
- shard-glk: NOTRUN -> [SKIP][14] ([fdo#109271]) +49 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk2/igt@v3d/[email protected]

#### Possible fixes ####

* igt@drm_fdinfo@most-busy-check-all@rcs0:
- {shard-rkl}: [FAIL][15] ([i915#7742]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-rkl-7/igt@drm_fdinfo@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-rkl-4/igt@drm_fdinfo@[email protected]

* igt@gem_create@create-ext-set-pat:
- shard-glk: [SKIP][17] ([fdo#109271]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-glk3/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-glk9/igt@[email protected]
- {shard-rkl}: [SKIP][19] ([i915#8562]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-rkl-6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-rkl-2/igt@[email protected]
- shard-snb: [SKIP][21] ([fdo#109271]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-snb2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-snb2/igt@[email protected]
- shard-apl: [SKIP][23] ([fdo#109271]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-apl7/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl6/igt@[email protected]
- {shard-tglu}: [SKIP][25] ([i915#8562]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-tglu-4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-tglu-8/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- {shard-tglu}: [FAIL][27] ([i915#2842]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-tglu-3/igt@gem_exec_fair@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-tglu-3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- {shard-rkl}: [FAIL][29] ([i915#2842]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-rkl-2/igt@gem_exec_fair@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-rkl-6/igt@gem_exec_fair@[email protected]

* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- {shard-rkl}: [SKIP][31] ([i915#1397]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-rkl-6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-rkl-7/igt@[email protected]

* igt@kms_cursor_crc@cursor-suspend@pipe-a-dp-1:
- shard-apl: [ABORT][33] ([i915#180]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-apl4/igt@kms_cursor_crc@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl6/igt@kms_cursor_crc@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-apl: [FAIL][35] ([i915#2346]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-apl1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-apl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@single-bo@pipe-b:
- {shard-rkl}: [INCOMPLETE][37] ([i915#8011]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13232/shard-rkl-7/igt@kms_cursor_legacy@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/shard-rkl-4/igt@kms_cursor_legacy@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6755]: https://gitlab.freedesktop.org/drm/intel/issues/6755
[i915#7392]: https://gitlab.freedesktop.org/drm/intel/issues/7392
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
[i915#8234]: https://gitlab.freedesktop.org/drm/intel/issues/8234
[i915#8502]: https://gitlab.freedesktop.org/drm/intel/issues/8502
[i915#8562]: https://gitlab.freedesktop.org/drm/intel/issues/8562

Build changes
-------------

* Linux: CI_DRM_13232 -> Patchwork_118660v2
* Piglit: None -> piglit_4509

CI-20190529: 20190529
CI_DRM_13232: 450d228e38403a48aa273ec1e22b463dc64aaae6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7319: 2e1bcd49944452b5f9516eecee48e1fa3ae6a636 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118660v2: 450d228e38403a48aa273ec1e22b463dc64aaae6 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118660v2/index.html