Skip to contentSkip to conversation

drm/i915: Add TTM offset argument to mmap.

PATCH Superseded Maarten Lankhorst 4 participants 9 messages Jul 1, 2021 – Jul 9, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Maarten Lankhorst

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: Add TTM offset argument to mmap.

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +16 -1
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
 		return -ENODEV;
 
 	if (obj->ops->mmap_offset)  {
+		if (mmap_type != I915_MMAP_TYPE_TTM)
+			return -ENODEV;
+
 		*offset = obj->ops->mmap_offset(obj);
 		return 0;
 	}
 
+	if (mmap_type == I915_MMAP_TYPE_TTM)
+		return -ENODEV;
+
 	if (mmap_type != I915_MMAP_TYPE_GTT &&
 	    !i915_gem_object_has_struct_page(obj) &&
 	    !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
 	enum i915_mmap_type mmap_type;
 
-	if (boot_cpu_has(X86_FEATURE_PAT))
+	if (HAS_LMEM(to_i915(dev)))
+		mmap_type = I915_MMAP_TYPE_TTM;
+	else if (boot_cpu_has(X86_FEATURE_PAT))
 		mmap_type = I915_MMAP_TYPE_WC;
 	else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
 		return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
 		type = I915_MMAP_TYPE_UC;
 		break;
 
+	case I915_MMAP_OFFSET_TTM:
+		type = I915_MMAP_TYPE_TTM;
+		break;
+
 	default:
 		return -EINVAL;
 	}
@@ -968,6 +980,9 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 		vma->vm_ops = &vm_ops_cpu;
 		break;
 
+	case I915_MMAP_TYPE_TTM:
+		GEM_WARN_ON(mmo->mmap_type == I915_MMAP_TYPE_TTM);
+		/* fall-through */
 	case I915_MMAP_TYPE_WB:
 		vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
 		vma->vm_ops = &vm_ops_cpu;
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1 -0
index 441f913c87e6..8b872b22a7ec 100644
@@ -96,6 +96,7 @@ enum i915_mmap_type {
 	I915_MMAP_TYPE_WC,
 	I915_MMAP_TYPE_WB,
 	I915_MMAP_TYPE_UC,
+	I915_MMAP_TYPE_TTM,
 };
 
 struct i915_mmap_offset {
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +25 -2
index 607b7d2d4c29..321271bd2fa1 100644
@@ -573,6 +573,14 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
 	return 0;
 }
 
+static enum i915_mmap_type default_mapping(struct drm_i915_private *i915)
+{
+	if (HAS_LMEM(i915))
+		return I915_MMAP_TYPE_TTM;
+
+	return I915_MMAP_TYPE_GTT;
+}
+
 static bool assert_mmap_offset(struct drm_i915_private *i915,
 			       unsigned long size,
 			       int expected)
@@ -585,7 +593,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
 	if (IS_ERR(obj))
 		return expected && expected == PTR_ERR(obj);
 
-	ret = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+	ret = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
 	i915_gem_object_put(obj);
 
 	return ret == expected;
@@ -689,7 +697,7 @@ static int igt_mmap_offset_exhaustion(void *arg)
 		goto out;
 	}
 
-	err = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+	err = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
 	if (err) {
 		pr_err("Unable to insert object into reclaimed hole\n");
 		goto err_obj;
@@ -831,8 +839,14 @@ static int wc_check(struct drm_i915_gem_object *obj)
 
 static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
 {
+	struct drm_i915_private *i915 = to_i915(obj->base.dev);
 	bool no_map;
 
+	if (HAS_LMEM(i915))
+		return type == I915_MMAP_TYPE_TTM;
+	else if (type == I915_MMAP_TYPE_TTM)
+		return false;
+
 	if (type == I915_MMAP_TYPE_GTT &&
 	    !i915_ggtt_has_aperture(&to_i915(obj->base.dev)->ggtt))
 		return false;
@@ -970,6 +984,8 @@ static int igt_mmap(void *arg)
 			err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
 			if (err == 0)
 				err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
+			if (err == 0)
+				err = __igt_mmap(i915, obj, I915_MMAP_TYPE_TTM);
 
 			i915_gem_object_put(obj);
 			if (err)
@@ -987,6 +1003,7 @@ static const char *repr_mmap_type(enum i915_mmap_type type)
 	case I915_MMAP_TYPE_WB: return "wb";
 	case I915_MMAP_TYPE_WC: return "wc";
 	case I915_MMAP_TYPE_UC: return "uc";
+	case I915_MMAP_TYPE_TTM: return "ttm";
 	default: return "unknown";
 	}
 }
@@ -1100,6 +1117,8 @@ static int igt_mmap_access(void *arg)
 			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WC);
 		if (err == 0)
 			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_UC);
+		if (err == 0)
+			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
@@ -1241,6 +1260,8 @@ static int igt_mmap_gpu(void *arg)
 		err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
 		if (err == 0)
 			err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
+		if (err == 0)
+			err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
@@ -1396,6 +1417,8 @@ static int igt_mmap_revoke(void *arg)
 		err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
 		if (err == 0)
 			err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
+		if (err == 0)
+			err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
include/uapi/drm/i915_drm.h +5 -4
index 2f70c48567c0..12ec9c7f1711 100644
@@ -867,10 +867,11 @@ struct drm_i915_gem_mmap_offset {
 	 * (GTT, WC, WB, UC, etc) should be included.
 	 */
 	__u64 flags;
-#define I915_MMAP_OFFSET_GTT 0
-#define I915_MMAP_OFFSET_WC  1
-#define I915_MMAP_OFFSET_WB  2
-#define I915_MMAP_OFFSET_UC  3
+#define I915_MMAP_OFFSET_GTT	0
+#define I915_MMAP_OFFSET_WC	1
+#define I915_MMAP_OFFSET_WB	2
+#define I915_MMAP_OFFSET_UC	3
+#define I915_MMAP_OFFSET_TTM	4
 
 	/*
 	 * Zero-terminated chain of extensions.
Signature · 6 lines
2.31.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#1 lore raw

Op 01-07-2021 om 13:42 schreef Maarten Lankhorst:

Quoted 183 lines

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +16 -1
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
 		return -ENODEV;
 
 	if (obj->ops->mmap_offset)  {
+		if (mmap_type != I915_MMAP_TYPE_TTM)
+			return -ENODEV;
+
 		*offset = obj->ops->mmap_offset(obj);
 		return 0;
 	}
 
+	if (mmap_type == I915_MMAP_TYPE_TTM)
+		return -ENODEV;
+
 	if (mmap_type != I915_MMAP_TYPE_GTT &&
 	    !i915_gem_object_has_struct_page(obj) &&
 	    !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
 	enum i915_mmap_type mmap_type;
 
-	if (boot_cpu_has(X86_FEATURE_PAT))
+	if (HAS_LMEM(to_i915(dev)))
+		mmap_type = I915_MMAP_TYPE_TTM;
+	else if (boot_cpu_has(X86_FEATURE_PAT))
 		mmap_type = I915_MMAP_TYPE_WC;
 	else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
 		return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
 		type = I915_MMAP_TYPE_UC;
 		break;
 
+	case I915_MMAP_OFFSET_TTM:
+		type = I915_MMAP_TYPE_TTM;
+		break;
+
 	default:
 		return -EINVAL;
 	}
@@ -968,6 +980,9 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 		vma->vm_ops = &vm_ops_cpu;
 		break;
 
+	case I915_MMAP_TYPE_TTM:
+		GEM_WARN_ON(mmo->mmap_type == I915_MMAP_TYPE_TTM);
+		/* fall-through */
 	case I915_MMAP_TYPE_WB:
 		vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
 		vma->vm_ops = &vm_ops_cpu;
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1 -0
index 441f913c87e6..8b872b22a7ec 100644
@@ -96,6 +96,7 @@ enum i915_mmap_type {
 	I915_MMAP_TYPE_WC,
 	I915_MMAP_TYPE_WB,
 	I915_MMAP_TYPE_UC,
+	I915_MMAP_TYPE_TTM,
 };
 
 struct i915_mmap_offset {
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +25 -2
index 607b7d2d4c29..321271bd2fa1 100644
@@ -573,6 +573,14 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
 	return 0;
 }
 
+static enum i915_mmap_type default_mapping(struct drm_i915_private *i915)
+{
+	if (HAS_LMEM(i915))
+		return I915_MMAP_TYPE_TTM;
+
+	return I915_MMAP_TYPE_GTT;
+}
+
 static bool assert_mmap_offset(struct drm_i915_private *i915,
 			       unsigned long size,
 			       int expected)
@@ -585,7 +593,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
 	if (IS_ERR(obj))
 		return expected && expected == PTR_ERR(obj);
 
-	ret = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+	ret = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
 	i915_gem_object_put(obj);
 
 	return ret == expected;
@@ -689,7 +697,7 @@ static int igt_mmap_offset_exhaustion(void *arg)
 		goto out;
 	}
 
-	err = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+	err = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
 	if (err) {
 		pr_err("Unable to insert object into reclaimed hole\n");
 		goto err_obj;
@@ -831,8 +839,14 @@ static int wc_check(struct drm_i915_gem_object *obj)
 
 static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
 {
+	struct drm_i915_private *i915 = to_i915(obj->base.dev);
 	bool no_map;
 
+	if (HAS_LMEM(i915))
+		return type == I915_MMAP_TYPE_TTM;
+	else if (type == I915_MMAP_TYPE_TTM)
+		return false;
+
 	if (type == I915_MMAP_TYPE_GTT &&
 	    !i915_ggtt_has_aperture(&to_i915(obj->base.dev)->ggtt))
 		return false;
@@ -970,6 +984,8 @@ static int igt_mmap(void *arg)
 			err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
 			if (err == 0)
 				err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
+			if (err == 0)
+				err = __igt_mmap(i915, obj, I915_MMAP_TYPE_TTM);
 
 			i915_gem_object_put(obj);
 			if (err)
@@ -987,6 +1003,7 @@ static const char *repr_mmap_type(enum i915_mmap_type type)
 	case I915_MMAP_TYPE_WB: return "wb";
 	case I915_MMAP_TYPE_WC: return "wc";
 	case I915_MMAP_TYPE_UC: return "uc";
+	case I915_MMAP_TYPE_TTM: return "ttm";
 	default: return "unknown";
 	}
 }
@@ -1100,6 +1117,8 @@ static int igt_mmap_access(void *arg)
 			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WC);
 		if (err == 0)
 			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_UC);
+		if (err == 0)
+			err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
@@ -1241,6 +1260,8 @@ static int igt_mmap_gpu(void *arg)
 		err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
 		if (err == 0)
 			err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
+		if (err == 0)
+			err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
@@ -1396,6 +1417,8 @@ static int igt_mmap_revoke(void *arg)
 		err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
 		if (err == 0)
 			err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
+		if (err == 0)
+			err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_TTM);
 
 		i915_gem_object_put(obj);
 		if (err)
include/uapi/drm/i915_drm.h +0 -2
index 2f70c48567c0..12ec9c7f1711 100644
@@ -867,10 +867,11 @@ struct drm_i915_gem_mmap_offset {
 	 * (GTT, WC, WB, UC, etc) should be included.
 	 */
 	__u64 flags;
-#define I915_MMAP_OFFSET_GTT 0
-#define I915_MMAP_OFFSET_WC  1

include/uapi/drm/i915_drm.h struct drm_i915_gem_mmap_offset { · line 877

Quoted 10 lines
include/uapi/drm/i915_drm.h +5 -2
-#define I915_MMAP_OFFSET_WB  2
-#define I915_MMAP_OFFSET_UC  3
+#define I915_MMAP_OFFSET_GTT	0
+#define I915_MMAP_OFFSET_WC	1
+#define I915_MMAP_OFFSET_WB	2
+#define I915_MMAP_OFFSET_UC	3
+#define I915_MMAP_OFFSET_TTM	4
 
 	/*
 	 * Zero-terminated chain of extensions.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 39 lines · Maarten Lankhorst

Op 01-07-2021 om 13:42 schreef Maarten Lankhorst:

Quoted 37 lines

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +6 -0
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
              return -ENODEV;
 
      if (obj->ops->mmap_offset)  {
+             if (mmap_type != I915_MMAP_TYPE_TTM)
+                     return -ENODEV;
+
              *offset = obj->ops->mmap_offset(obj);
              return 0;
      }
 
+     if (mmap_type == I915_MMAP_TYPE_TTM)
+             return -ENODEV;
+
      if (mmap_type != I915_MMAP_TYPE_GTT &&
          !i915_gem_object_has_struct_page(obj) &&
          !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
      enum i915_mmap_type mmap_type;
 
Quoted 5 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_dumb_mmap_offset(struct drm_file *file, · line 739

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -1
-     if (boot_cpu_has(X86_FEATURE_PAT))
+     if (HAS_LMEM(to_i915(dev)))
+             mmap_type = I915_MMAP_TYPE_TTM;
+     else if (boot_cpu_has(X86_FEATURE_PAT))
              mmap_type = I915_MMAP_TYPE_WC;

Hmm, I think we still need to check for X86_FEATURE_PAT somewhere, since this is still just WC for lmem?

Quoted 9 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data, · line 811

Quoted 9 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -0
      else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
              return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
              type = I915_MMAP_TYPE_UC;
              break;
 
+     case I915_MMAP_OFFSET_TTM:
+             type = I915_MMAP_TYPE_TTM;
+             break;

Would it not be simpler to just convert to WC or WB here, if we encounter _TTM? With that we also don't need to touch the dumb mmap stuff and i915_gem_mmap()?

if (IS_DGFX()) {
        if (args->type != OFFSET_TTM)
               return -ENODEV:

       GEM_BUG_ON(!obj->mm.n_placements);
       if (i915_gem_object_placement_possible(obj, INTEL_MEMORY_LOCAL)) {
              type = TYPE_WC;
      else
              ttype = TYPE_WB;
}

https://patchwork.freedesktop.org/patch/442579/?series=92209&rev=1

Quoted 11 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) · line 985

Quoted 11 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +4 -0
+
      default:
              return -EINVAL;
      }
@@ -968,6 +980,9 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
              vma->vm_ops = &vm_ops_cpu;
              break;
 
+     case I915_MMAP_TYPE_TTM:
+             GEM_WARN_ON(mmo->mmap_type == I915_MMAP_TYPE_TTM);
+             /* fall-through */

Hmm, we still want WC for lmem, or if it's possible for it to be placed there.

Quoted 129 lines
Quoted 129 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +0 -0
      case I915_MMAP_TYPE_WB:
              vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
              vma->vm_ops = &vm_ops_cpu;
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1 -0
index 441f913c87e6..8b872b22a7ec 100644
@@ -96,6 +96,7 @@ enum i915_mmap_type {
      I915_MMAP_TYPE_WC,
      I915_MMAP_TYPE_WB,
      I915_MMAP_TYPE_UC,
+     I915_MMAP_TYPE_TTM,
 };
 
 struct i915_mmap_offset {
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +25 -2
index 607b7d2d4c29..321271bd2fa1 100644
@@ -573,6 +573,14 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
      return 0;
 }
 
+static enum i915_mmap_type default_mapping(struct drm_i915_private *i915)
+{
+     if (HAS_LMEM(i915))
+             return I915_MMAP_TYPE_TTM;
+
+     return I915_MMAP_TYPE_GTT;
+}
+
 static bool assert_mmap_offset(struct drm_i915_private *i915,
                             unsigned long size,
                             int expected)
@@ -585,7 +593,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
      if (IS_ERR(obj))
              return expected && expected == PTR_ERR(obj);
 
-     ret = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+     ret = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
      i915_gem_object_put(obj);
 
      return ret == expected;
@@ -689,7 +697,7 @@ static int igt_mmap_offset_exhaustion(void *arg)
              goto out;
      }
 
-     err = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+     err = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
      if (err) {
              pr_err("Unable to insert object into reclaimed hole\n");
              goto err_obj;
@@ -831,8 +839,14 @@ static int wc_check(struct drm_i915_gem_object *obj)
 
 static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
 {
+     struct drm_i915_private *i915 = to_i915(obj->base.dev);
      bool no_map;
 
+     if (HAS_LMEM(i915))
+             return type == I915_MMAP_TYPE_TTM;
+     else if (type == I915_MMAP_TYPE_TTM)
+             return false;
+
      if (type == I915_MMAP_TYPE_GTT &&
          !i915_ggtt_has_aperture(&to_i915(obj->base.dev)->ggtt))
              return false;
@@ -970,6 +984,8 @@ static int igt_mmap(void *arg)
                      err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
                      if (err == 0)
                              err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
+                     if (err == 0)
+                             err = __igt_mmap(i915, obj, I915_MMAP_TYPE_TTM);
 
                      i915_gem_object_put(obj);
                      if (err)
@@ -987,6 +1003,7 @@ static const char *repr_mmap_type(enum i915_mmap_type type)
      case I915_MMAP_TYPE_WB: return "wb";
      case I915_MMAP_TYPE_WC: return "wc";
      case I915_MMAP_TYPE_UC: return "uc";
+     case I915_MMAP_TYPE_TTM: return "ttm";
      default: return "unknown";
      }
 }
@@ -1100,6 +1117,8 @@ static int igt_mmap_access(void *arg)
                      err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WC);
              if (err == 0)
                      err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_UC);
+             if (err == 0)
+                     err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_TTM);
 
              i915_gem_object_put(obj);
              if (err)
@@ -1241,6 +1260,8 @@ static int igt_mmap_gpu(void *arg)
              err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
              if (err == 0)
                      err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
+             if (err == 0)
+                     err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_TTM);
 
              i915_gem_object_put(obj);
              if (err)
@@ -1396,6 +1417,8 @@ static int igt_mmap_revoke(void *arg)
              err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
              if (err == 0)
                      err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
+             if (err == 0)
+                     err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_TTM);
 
              i915_gem_object_put(obj);
              if (err)
include/uapi/drm/i915_drm.h +5 -4
index 2f70c48567c0..12ec9c7f1711 100644
@@ -867,10 +867,11 @@ struct drm_i915_gem_mmap_offset {
       * (GTT, WC, WB, UC, etc) should be included.
       */
      __u64 flags;
-#define I915_MMAP_OFFSET_GTT 0
-#define I915_MMAP_OFFSET_WC  1
-#define I915_MMAP_OFFSET_WB  2
-#define I915_MMAP_OFFSET_UC  3
+#define I915_MMAP_OFFSET_GTT 0
+#define I915_MMAP_OFFSET_WC  1
+#define I915_MMAP_OFFSET_WB  2
+#define I915_MMAP_OFFSET_UC  3
+#define I915_MMAP_OFFSET_TTM 4
 
Quoted 8 lines

include/uapi/drm/i915_drm.h struct drm_i915_gem_mmap_offset { · line 877

Quoted 2 lines
include/uapi/drm/i915_drm.h +0 -0
      /*
       * Zero-terminated chain of extensions.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 76 lines · Matthew Auld
Quoted 39 lines · Maarten Lankhorst

Op 01-07-2021 om 13:42 schreef Maarten Lankhorst:

Quoted 37 lines

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +6 -0
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
              return -ENODEV;
 
      if (obj->ops->mmap_offset)  {
+             if (mmap_type != I915_MMAP_TYPE_TTM)
+                     return -ENODEV;
+
              *offset = obj->ops->mmap_offset(obj);
              return 0;
      }
 
+     if (mmap_type == I915_MMAP_TYPE_TTM)
+             return -ENODEV;
+
      if (mmap_type != I915_MMAP_TYPE_GTT &&
          !i915_gem_object_has_struct_page(obj) &&
          !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
      enum i915_mmap_type mmap_type;
 
Quoted 5 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_dumb_mmap_offset(struct drm_file *file, · line 739

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -1
-     if (boot_cpu_has(X86_FEATURE_PAT))
+     if (HAS_LMEM(to_i915(dev)))
+             mmap_type = I915_MMAP_TYPE_TTM;
+     else if (boot_cpu_has(X86_FEATURE_PAT))
              mmap_type = I915_MMAP_TYPE_WC;

Hmm, I think we still need to check for X86_FEATURE_PAT somewhere, since this is still just WC for lmem?

Quoted 9 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data, · line 811

Quoted 9 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -0
      else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
              return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
              type = I915_MMAP_TYPE_UC;
              break;
 
+     case I915_MMAP_OFFSET_TTM:
+             type = I915_MMAP_TYPE_TTM;
+             break;

Would it not be simpler to just convert to WC or WB here, if we encounter _TTM? With that we also don't need to touch the dumb mmap stuff and i915_gem_mmap()?

if (IS_DGFX()) {
        if (args->type != OFFSET_TTM)
               return -ENODEV:

       GEM_BUG_ON(!obj->mm.n_placements);
       if (i915_gem_object_placement_possible(obj, INTEL_MEMORY_LOCAL)) {
              type = TYPE_WC;
      else
              ttype = TYPE_WB;
}
Quoted 1 line

https://patchwork.freedesktop.org/patch/442579/?series=92209&rev=1

fyi this patch is now merged, in case you need the i915_gem_object_placement_possible() helper.
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#4 lore raw

Op 09-07-2021 om 11:30 schreef Matthew Auld:

Quoted 74 lines
Quoted 72 lines · Matthew Auld
Quoted 38 lines · Maarten Lankhorst

Op 01-07-2021 om 13:42 schreef Maarten Lankhorst:

Quoted 37 lines

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +6 -0
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
              return -ENODEV;
 
      if (obj->ops->mmap_offset)  {
+             if (mmap_type != I915_MMAP_TYPE_TTM)
+                     return -ENODEV;
+
              *offset = obj->ops->mmap_offset(obj);
              return 0;
      }
 
+     if (mmap_type == I915_MMAP_TYPE_TTM)
+             return -ENODEV;
+
      if (mmap_type != I915_MMAP_TYPE_GTT &&
          !i915_gem_object_has_struct_page(obj) &&
          !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
      enum i915_mmap_type mmap_type;
 
Quoted 5 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_dumb_mmap_offset(struct drm_file *file, · line 739

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -1
-     if (boot_cpu_has(X86_FEATURE_PAT))
+     if (HAS_LMEM(to_i915(dev)))
+             mmap_type = I915_MMAP_TYPE_TTM;
+     else if (boot_cpu_has(X86_FEATURE_PAT))
              mmap_type = I915_MMAP_TYPE_WC;

Hmm, I think we still need to check for X86_FEATURE_PAT somewhere, since this is still just WC for lmem?

Quoted 9 lines

drivers/gpu/drm/i915/gem/i915_gem_mman.c i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data, · line 811

Quoted 9 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +3 -0
      else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
              return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
              type = I915_MMAP_TYPE_UC;
              break;
 
+     case I915_MMAP_OFFSET_TTM:
+             type = I915_MMAP_TYPE_TTM;
+             break;

Would it not be simpler to just convert to WC or WB here, if we encounter _TTM? With that we also don't need to touch the dumb mmap stuff and i915_gem_mmap()?

if (IS_DGFX()) {
        if (args->type != OFFSET_TTM)
               return -ENODEV:

       GEM_BUG_ON(!obj->mm.n_placements);
       if (i915_gem_object_placement_possible(obj, INTEL_MEMORY_LOCAL)) {
              type = TYPE_WC;
      else
              ttype = TYPE_WB;
}
Quoted 3 lines
Quoted 1 line

https://patchwork.freedesktop.org/patch/442579/?series=92209&rev=1

fyi this patch is now merged, in case you need the i915_gem_object_placement_possible() helper.

I think a separate type is better, as it could still be mapped WB if evicted to system memory?

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add TTM offset argument to mmap.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm/i915: Add TTM offset argument to mmap.
URL : https://patchwork.freedesktop.org/series/92103/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
182e2988c2da drm/i915: Add TTM offset argument to mmap.
-:61: WARNING:PREFER_FALLTHROUGH: Prefer 'fallthrough;' over fallthrough comment
#61: FILE: drivers/gpu/drm/i915/gem/i915_gem_mman.c:985:
+		/* fall-through */

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Add TTM offset argument to mmap.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm/i915: Add TTM offset argument to mmap.
URL : https://patchwork.freedesktop.org/series/92103/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10297 -> Patchwork_20505
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600: NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/fi-snb-2600/igt@amdgpu/[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [INCOMPLETE][2] ([i915#2782]) -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/fi-snb-2600/igt@i915_selftest@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/fi-snb-2600/igt@i915_selftest@[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#2782]: https://gitlab.freedesktop.org/drm/intel/issues/2782
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3717]: https://gitlab.freedesktop.org/drm/intel/issues/3717

Participating hosts (37 -> 34)
------------------------------

Missing (3): fi-kbl-soraka fi-bsw-cyan fi-bdw-samus

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

* Linux: CI_DRM_10297 -> Patchwork_20505

CI-20190529: 20190529
CI_DRM_10297: 96c7ad60de68518bdcd0d0e6381a2359034a0226 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6125: 5bb62cb290fa32777934de4b39e107ccd282f7e8 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20505: 182e2988c2da3bcc301241b71dd643b3ce0e6b27 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

182e2988c2da drm/i915: Add TTM offset argument to mmap.

== Logs ==

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Add TTM offset argument to mmap.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm/i915: Add TTM offset argument to mmap.
URL : https://patchwork.freedesktop.org/series/92103/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10297_full -> Patchwork_20505_full
====================================================

Summary
-------

**FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_big_fb@yf-tiled-16bpp-rotate-0:
- shard-glk: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk2/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
- shard-skl: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@read_all_entries_display_on:
- shard-skl: [PASS][4] -> [DMESG-WARN][5] ([i915#1982]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl9/igt@debugfs_test@read_all_entries_display_on.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl5/igt@debugfs_test@read_all_entries_display_on.html

* igt@gem_ctx_persistence@many-contexts:
- shard-tglb: [PASS][6] -> [FAIL][7] ([i915#2410])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-tglb7/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-tglb5/igt@[email protected]

* igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][8] -> [TIMEOUT][9] ([i915#2369] / [i915#3063] / [i915#3648])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-tglb3/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-tglb7/igt@[email protected]

* igt@gem_exec_fair@basic-none@vecs0:
- shard-kbl: [PASS][10] -> [FAIL][11] ([i915#2842]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-kbl3/igt@gem_exec_fair@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-glk: NOTRUN -> [FAIL][12] ([i915#2842])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_flush@basic-batch-kernel-default-cmd:
- shard-iclb: NOTRUN -> [SKIP][13] ([fdo#109313])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-big-copy-xy:
- shard-iclb: [PASS][14] -> [FAIL][15] ([i915#2428])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb3/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb7/igt@[email protected]

* igt@gen9_exec_parse@bb-large:
- shard-skl: NOTRUN -> [FAIL][16] ([i915#3296])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@[email protected]
- shard-glk: NOTRUN -> [FAIL][17] ([i915#3296])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk7/igt@[email protected]
- shard-kbl: NOTRUN -> [FAIL][18] ([i915#3296])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl7/igt@[email protected]

* igt@i915_pm_rpm@modeset-pc8-residency-stress:
- shard-apl: NOTRUN -> [SKIP][19] ([fdo#109271]) +111 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl3/igt@[email protected]

* igt@i915_query@query-topology-known-pci-ids:
- shard-iclb: NOTRUN -> [SKIP][20] ([fdo#109303])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@kms_color@pipe-b-ctm-0-25:
- shard-skl: NOTRUN -> [DMESG-WARN][21] ([i915#1982])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-ctm-limited-range:
- shard-apl: NOTRUN -> [SKIP][22] ([fdo#109271] / [fdo#111827]) +5 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-ctm-max:
- shard-iclb: NOTRUN -> [SKIP][23] ([fdo#109284] / [fdo#111827]) +2 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-ctm-negative:
- shard-kbl: NOTRUN -> [SKIP][24] ([fdo#109271] / [fdo#111827]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl7/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][25] ([fdo#109271] / [fdo#111827]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk7/igt@[email protected]

* igt@kms_color_chamelium@pipe-c-degamma:
- shard-skl: NOTRUN -> [SKIP][26] ([fdo#109271] / [fdo#111827]) +6 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl2/igt@[email protected]

* igt@kms_content_protection@atomic:
- shard-apl: NOTRUN -> [TIMEOUT][27] ([i915#1319])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl8/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-512x170-rapid-movement:
- shard-iclb: NOTRUN -> [SKIP][28] ([fdo#109278]) +4 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque:
- shard-skl: NOTRUN -> [FAIL][29] ([i915#3444])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-32x32-sliding:
- shard-kbl: NOTRUN -> [SKIP][30] ([fdo#109271]) +27 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl7/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipa-toggle:
- shard-iclb: NOTRUN -> [SKIP][31] ([fdo#109274] / [fdo#109278])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-skl: [PASS][32] -> [FAIL][33] ([i915#79])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl8/igt@kms_flip@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl2/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@a-dp1:
- shard-apl: [PASS][34] -> [DMESG-WARN][35] ([i915#180]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-apl6/igt@kms_flip@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl1/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1:
- shard-skl: [PASS][36] -> [FAIL][37] ([i915#2122])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl3/igt@kms_flip@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl10/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-glk: [PASS][38] -> [FAIL][39] ([i915#2546] / [i915#49])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html

* igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack-mmap-gtt:
- shard-skl: NOTRUN -> [SKIP][40] ([fdo#109271]) +83 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-suspend:
- shard-glk: NOTRUN -> [SKIP][41] ([fdo#109271]) +36 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk7/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render:
- shard-skl: [PASS][42] -> [FAIL][43] ([i915#49])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render.html

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-skl: [PASS][44] -> [FAIL][45] ([i915#2546] / [i915#49]) +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html

* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-wc:
- shard-iclb: NOTRUN -> [SKIP][46] ([fdo#109280]) +3 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-wc.html

* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][47] -> [FAIL][48] ([i915#1188])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: NOTRUN -> [FAIL][49] ([fdo#108145] / [i915#265])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl8/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][50] ([i915#265])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
- shard-skl: NOTRUN -> [FAIL][51] ([fdo#108145] / [i915#265])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl2/igt@[email protected]

* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5:
- shard-skl: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#658])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl5/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][53] ([fdo#109271] / [i915#658]) +1 similar issue
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [PASS][54] -> [SKIP][55] ([fdo#109441]) +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb5/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@kms_sysfs_edid_timing:
- shard-apl: NOTRUN -> [FAIL][56] ([IGT#2])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@kms_sysfs_edid_timing.html

* igt@nouveau_crc@pipe-c-source-outp-inactive:
- shard-iclb: NOTRUN -> [SKIP][57] ([i915#2530])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@perf@polling-parameterized:
- shard-glk: [PASS][58] -> [FAIL][59] ([i915#1542])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk5/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk8/igt@[email protected]

* igt@perf@polling-small-buf:
- shard-skl: [PASS][60] -> [FAIL][61] ([i915#1722])
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl1/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl4/igt@[email protected]

* igt@prime_nv_test@i915_import_pread_pwrite:
- shard-iclb: NOTRUN -> [SKIP][62] ([fdo#109291])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@prime_nv_test@i915_import_pread_pwrite.html

* igt@sysfs_clients@create:
- shard-apl: NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#2994]) +2 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl8/igt@[email protected]

* igt@sysfs_clients@fair-0:
- shard-skl: NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#2994])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#2994])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk7/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#2994])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl7/igt@[email protected]

* igt@sysfs_clients@recycle:
- shard-iclb: NOTRUN -> [SKIP][67] ([i915#2994])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-apl: [DMESG-WARN][68] ([i915#180]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-apl2/igt@gem_ctx_isolation@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl3/igt@gem_ctx_isolation@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][70] ([i915#2842]) -> [PASS][71] +1 similar issue
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk1/igt@gem_exec_fair@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk4/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-sync@rcs0:
- shard-kbl: [SKIP][72] ([fdo#109271]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-kbl3/igt@gem_exec_fair@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl1/igt@gem_exec_fair@[email protected]

* igt@i915_pm_dc@dc5-psr:
- shard-iclb: [DMESG-WARN][74] ([i915#3698]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb7/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp:
- shard-iclb: [FAIL][76] -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb8/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb6/igt@[email protected]

* igt@kms_async_flips@alternate-sync-async-flip:
- shard-skl: [FAIL][78] ([i915#2521]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl1/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl6/igt@[email protected]

* igt@kms_big_fb@y-tiled-32bpp-rotate-0:
- shard-glk: [DMESG-WARN][80] ([i915#118] / [i915#95]) -> [PASS][81] +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk1/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk4/igt@[email protected]

* igt@kms_color@pipe-a-ctm-0-25:
- shard-skl: [DMESG-WARN][82] ([i915#1982]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl2/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl3/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-64x21-offscreen:
- shard-skl: [FAIL][84] ([i915#3444]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl4/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl7/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:
- shard-glk: [FAIL][86] ([i915#79]) -> [PASS][87]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-glk4/igt@kms_flip@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-glk6/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-fb-recreate-interruptible@a-edp1:
- shard-skl: [FAIL][88] ([i915#2122]) -> [PASS][89] +1 similar issue
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl3/igt@kms_flip@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl10/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-blt:
- shard-skl: [FAIL][90] ([i915#49]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl7/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl8/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [INCOMPLETE][92] ([i915#123]) -> [PASS][93]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl8/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl1/igt@[email protected]

* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][94] ([i915#1188]) -> [PASS][95] +1 similar issue
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl9/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl5/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][96] ([fdo#108145] / [i915#265]) -> [PASS][97] +1 similar issue
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl10/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl4/igt@[email protected]

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [SKIP][98] ([fdo#109441]) -> [PASS][99] +1 similar issue
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html

* igt@perf_pmu@rc6-suspend:
- shard-kbl: [INCOMPLETE][100] ([i915#155] / [i915#794]) -> [PASS][101]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-kbl3/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl7/igt@[email protected]

#### Warnings ####

* igt@gem_exec_fair@basic-pace@vcs1:
- shard-kbl: [FAIL][102] ([i915#2842]) -> [SKIP][103] ([fdo#109271])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-kbl2/igt@gem_exec_fair@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-kbl4/igt@gem_exec_fair@[email protected]

* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: [SKIP][104] ([i915#658]) -> [SKIP][105] ([i915#588])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb1/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb2/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-skl: [FAIL][106] ([i915#454]) -> [INCOMPLETE][107] ([i915#198])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-skl10/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-skl6/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][108] ([i915#2684]) -> [WARN][109] ([i915#1804] / [i915#2684])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb8/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb6/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][110] ([i915#1804] / [i915#2684]) -> [WARN][111] ([i915#2684])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb4/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb1/igt@[email protected]

* igt@kms_psr2_sf@plane-move-sf-dmg-area-3:
- shard-iclb: [SKIP][112] ([i915#658]) -> [SKIP][113] ([i915#2920]) +3 similar issues
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb1/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb2/igt@[email protected]

* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-4:
- shard-iclb: [SKIP][114] ([i915#2920]) -> [SKIP][115] ([i915#658]) +3 similar issues
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb2/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb5/igt@[email protected]

* igt@runner@aborted:
- shard-iclb: ([FAIL][116], [FAIL][117], [FAIL][118]) ([i915#3002] / [i915#3702]) -> ([FAIL][119], [FAIL][120]) ([i915#3002])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb7/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb2/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-iclb6/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb3/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-iclb8/igt@[email protected]
- shard-apl: ([FAIL][121], [FAIL][122], [FAIL][123]) ([i915#180] / [i915#3002] / [i915#3363]) -> ([FAIL][124], [FAIL][125], [FAIL][126]) ([fdo#109271] / [i915#180] / [i915#3002] / [i915#3363])
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-apl2/igt@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-apl3/igt@[email protected]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10297/shard-apl1/igt@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@[email protected]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl1/igt@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20505/shard-apl2/igt@[email protected]

[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
[i915#2410]: https://gitlab.freedesktop.org/drm/intel/issues/2410
[i915#2428]: https://gitlab.freedesktop.org/drm/intel/issues/2428
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
[i915#2546]: https://gitlab.freedesktop.org/drm/intel/issues/2546
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
[i915#3296]: https://gitlab.freedesktop.org/drm/intel/issues/3296
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3444]: https://gitlab.freedesktop.org/drm/intel/issues/3444
[i915#3648]: https://gitlab.freedesktop.org/drm/intel/issues/3648
[i915#3698]: https://gitlab.freedesktop.org/drm/intel/issues/3698
[i915#3702]: https://gitlab.freedesktop.org/drm/intel/issues/3702
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

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

* Linux: CI_DRM_10297 -> Patchwork_20505

CI-20190529: 20190529
CI_DRM_10297: 96c7ad60de68518bdcd0d0e6381a2359034a0226 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6125: 5bb62cb290fa32777934de4b39e107ccd282f7e8 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20505: 182e2988c2da3bcc301241b71dd643b3ce0e6b27 @ 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_20505/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
In reply to Maarten Lankhorst
Quoted 181 lines · Maarten Lankhorst

This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well.

---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      | 17 +++++++++++-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
 .../drm/i915/gem/selftests/i915_gem_mman.c    | 27 +++++++++++++++++--
 include/uapi/drm/i915_drm.h                   |  9 ++++---
 4 files changed, 47 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +16 -1
index a90f796e85c0..b34be9e5d094 100644
@@ -679,10 +679,16 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
                return -ENODEV;
 
        if (obj->ops->mmap_offset)  {
+               if (mmap_type != I915_MMAP_TYPE_TTM)
+                       return -ENODEV;
+
                *offset = obj->ops->mmap_offset(obj);
                return 0;
        }
 
+       if (mmap_type == I915_MMAP_TYPE_TTM)
+               return -ENODEV;
+
        if (mmap_type != I915_MMAP_TYPE_GTT &&
            !i915_gem_object_has_struct_page(obj) &&
            !i915_gem_object_has_iomem(obj))
@@ -727,7 +733,9 @@ i915_gem_dumb_mmap_offset(struct drm_file *file,
 {
        enum i915_mmap_type mmap_type;
 
-       if (boot_cpu_has(X86_FEATURE_PAT))
+       if (HAS_LMEM(to_i915(dev)))
+               mmap_type = I915_MMAP_TYPE_TTM;
+       else if (boot_cpu_has(X86_FEATURE_PAT))
                mmap_type = I915_MMAP_TYPE_WC;
        else if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
                return -ENODEV;
@@ -798,6 +806,10 @@ i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
                type = I915_MMAP_TYPE_UC;
                break;
 
+       case I915_MMAP_OFFSET_TTM:
+               type = I915_MMAP_TYPE_TTM;
+               break;
+
        default:
                return -EINVAL;
        }
@@ -968,6 +980,9 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
                vma->vm_ops = &vm_ops_cpu;
                break;
 
+       case I915_MMAP_TYPE_TTM:
+               GEM_WARN_ON(mmo->mmap_type == I915_MMAP_TYPE_TTM);
+               /* fall-through */
        case I915_MMAP_TYPE_WB:
                vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
                vma->vm_ops = &vm_ops_cpu;
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1 -0
index 441f913c87e6..8b872b22a7ec 100644
@@ -96,6 +96,7 @@ enum i915_mmap_type {
        I915_MMAP_TYPE_WC,
        I915_MMAP_TYPE_WB,
        I915_MMAP_TYPE_UC,
+       I915_MMAP_TYPE_TTM,
 };
 
 struct i915_mmap_offset {
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +25 -2
index 607b7d2d4c29..321271bd2fa1 100644
@@ -573,6 +573,14 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
        return 0;
 }
 
+static enum i915_mmap_type default_mapping(struct drm_i915_private *i915)
+{
+       if (HAS_LMEM(i915))
+               return I915_MMAP_TYPE_TTM;
+
+       return I915_MMAP_TYPE_GTT;
+}
+
 static bool assert_mmap_offset(struct drm_i915_private *i915,
                               unsigned long size,
                               int expected)
@@ -585,7 +593,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
        if (IS_ERR(obj))
                return expected && expected == PTR_ERR(obj);
 
-       ret = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+       ret = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
        i915_gem_object_put(obj);
 
        return ret == expected;
@@ -689,7 +697,7 @@ static int igt_mmap_offset_exhaustion(void *arg)
                goto out;
        }
 
-       err = __assign_mmap_offset(obj, I915_MMAP_TYPE_GTT, &offset, NULL);
+       err = __assign_mmap_offset(obj, default_mapping(i915), &offset, NULL);
        if (err) {
                pr_err("Unable to insert object into reclaimed hole\n");
                goto err_obj;
@@ -831,8 +839,14 @@ static int wc_check(struct drm_i915_gem_object *obj)
 
 static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
 {
+       struct drm_i915_private *i915 = to_i915(obj->base.dev);
        bool no_map;
 
+       if (HAS_LMEM(i915))
+               return type == I915_MMAP_TYPE_TTM;
+       else if (type == I915_MMAP_TYPE_TTM)
+               return false;
+
        if (type == I915_MMAP_TYPE_GTT &&
            !i915_ggtt_has_aperture(&to_i915(obj->base.dev)->ggtt))
                return false;
@@ -970,6 +984,8 @@ static int igt_mmap(void *arg)
                        err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
                        if (err == 0)
                                err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
+                       if (err == 0)
+                               err = __igt_mmap(i915, obj, I915_MMAP_TYPE_TTM);
 
                        i915_gem_object_put(obj);
                        if (err)
@@ -987,6 +1003,7 @@ static const char *repr_mmap_type(enum i915_mmap_type type)
        case I915_MMAP_TYPE_WB: return "wb";
        case I915_MMAP_TYPE_WC: return "wc";
        case I915_MMAP_TYPE_UC: return "uc";
+       case I915_MMAP_TYPE_TTM: return "ttm";
        default: return "unknown";
        }
 }
@@ -1100,6 +1117,8 @@ static int igt_mmap_access(void *arg)
                        err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WC);
                if (err == 0)
                        err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_UC);
+               if (err == 0)
+                       err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_TTM);
 
                i915_gem_object_put(obj);
                if (err)
@@ -1241,6 +1260,8 @@ static int igt_mmap_gpu(void *arg)
                err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
                if (err == 0)
                        err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
+               if (err == 0)
+                       err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_TTM);
 
                i915_gem_object_put(obj);
                if (err)
@@ -1396,6 +1417,8 @@ static int igt_mmap_revoke(void *arg)
                err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
                if (err == 0)
                        err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
+               if (err == 0)
+                       err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_TTM);
 
                i915_gem_object_put(obj);
                if (err)
include/uapi/drm/i915_drm.h +0 -0
index 2f70c48567c0..12ec9c7f1711 100644
@@ -867,10 +867,11 @@ struct drm_i915_gem_mmap_offset {
         * (GTT, WC, WB, UC, etc) should be included.
         */

include/uapi/drm/i915_drm.h struct drm_i915_gem_mmap_offset { · line 874

Quoted 10 lines
include/uapi/drm/i915_drm.h +5 -4
        __u64 flags;
-#define I915_MMAP_OFFSET_GTT 0
-#define I915_MMAP_OFFSET_WC  1
-#define I915_MMAP_OFFSET_WB  2
-#define I915_MMAP_OFFSET_UC  3
+#define I915_MMAP_OFFSET_GTT   0
+#define I915_MMAP_OFFSET_WC    1
+#define I915_MMAP_OFFSET_WB    2
+#define I915_MMAP_OFFSET_UC    3
+#define I915_MMAP_OFFSET_TTM   4

I'm not sure I like the name here. TTM is an implementation detail, not a kind of map. I think we want something more like I915_MMAP_OFFSET_IMPLICIT or something like that. The semantics here, as far as I can tell, are "the mmap type is based on the object; you can't change it." On DG1, the mmap type is fixed for all objects. On integrated, we could have a BO create option for the mmap type but we don't yet.

--Jason

Quoted 10 lines
include/uapi/drm/i915_drm.h +0 -1
        /*
         * Zero-terminated chain of extensions.
--

2.31.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx