All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
@ 2021-06-24 19:30 ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

The ttm_move_memcpy() function was intended to be able to be used async
under a fence.
We are going to utilize that as a fallback if the gpu clearing blit fails
before we set up CPU- or GPU ptes to the memory region.
But to accomplish that the bo argument to ttm_move_memcpy() needs to be
replaced.

Patch 1 reorganizes the i915 ttm move code a bit to make the change
in patch 2 smaller.
Patch 2 updates the ttm_move_memcpy() interface.

Thomas Hellström (2):
  drm/i915/ttm: Reorganize the ttm move code somewhat
  drm/ttm, drm/i915: Update ttm_move_memcpy for async use

 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 +++----
 include/drm/ttm/ttm_bo_driver.h         |  2 +-
 3 files changed, 51 insertions(+), 41 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Intel-gfx] [PATCH 0/2] drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
@ 2021-06-24 19:30 ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

The ttm_move_memcpy() function was intended to be able to be used async
under a fence.
We are going to utilize that as a fallback if the gpu clearing blit fails
before we set up CPU- or GPU ptes to the memory region.
But to accomplish that the bo argument to ttm_move_memcpy() needs to be
replaced.

Patch 1 reorganizes the i915 ttm move code a bit to make the change
in patch 2 smaller.
Patch 2 updates the ttm_move_memcpy() interface.

Thomas Hellström (2):
  drm/i915/ttm: Reorganize the ttm move code somewhat
  drm/ttm, drm/i915: Update ttm_move_memcpy for async use

 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 +++----
 include/drm/ttm/ttm_bo_driver.h         |  2 +-
 3 files changed, 51 insertions(+), 41 deletions(-)

-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
@ 2021-06-24 19:30   ` Thomas Hellström
  -1 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

In order to make the code a bit more readable and to facilitate
async memcpy moves, reorganize the move code a little. Determine
at an early stage whether to copy or to clear.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index c39d982c4fa6..4e529adcdfc7 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj,
 }
 
 static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
+			       bool clear,
 			       struct ttm_resource *dst_mem,
 			       struct sg_table *dst_st)
 {
@@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
 		return -EINVAL;
 
 	dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
-	if (!ttm || !ttm_tt_is_populated(ttm)) {
+	if (clear) {
 		if (bo->type == ttm_bo_type_kernel)
 			return -EINVAL;
 
-		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
-			return 0;
-
 		intel_engine_pm_get(i915->gt.migrate.context->engine);
 		ret = intel_context_migrate_clear(i915->gt.migrate.context, NULL,
 						  dst_st->sgl, dst_level,
@@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
 	return ret;
 }
 
-static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
-			 struct ttm_operation_ctx *ctx,
-			 struct ttm_resource *dst_mem,
-			 struct ttm_place *hop)
+static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
+			    struct ttm_resource *dst_mem,
+			    struct sg_table *dst_st)
 {
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
-	struct ttm_resource_manager *dst_man =
-		ttm_manager_type(bo->bdev, dst_mem->mem_type);
 	struct intel_memory_region *dst_reg, *src_reg;
 	union {
 		struct ttm_kmap_iter_tt tt;
 		struct ttm_kmap_iter_iomap io;
 	} _dst_iter, _src_iter;
 	struct ttm_kmap_iter *dst_iter, *src_iter;
-	struct sg_table *dst_st;
 	int ret;
 
 	dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
 	src_reg = i915_ttm_region(bo->bdev, bo->resource->mem_type);
 	GEM_BUG_ON(!dst_reg || !src_reg);
 
+	ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
+	if (ret) {
+		dst_iter = !cpu_maps_iomem(dst_mem) ?
+			ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
+			ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
+						 dst_st, dst_reg->region.start);
+
+		src_iter = !cpu_maps_iomem(bo->resource) ?
+			ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
+			ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
+						 obj->ttm.cached_io_st,
+						 src_reg->region.start);
+
+		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+	}
+}
+
+static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
+			 struct ttm_operation_ctx *ctx,
+			 struct ttm_resource *dst_mem,
+			 struct ttm_place *hop)
+{
+	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
+	struct ttm_resource_manager *dst_man =
+		ttm_manager_type(bo->bdev, dst_mem->mem_type);
+	struct ttm_tt *ttm = bo->ttm;
+	struct sg_table *dst_st;
+	bool clear;
+	int ret;
+
 	/* Sync for now. We could do the actual copy async. */
 	ret = ttm_bo_wait_ctx(bo, ctx);
 	if (ret)
@@ -526,9 +550,8 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
 	}
 
 	/* Populate ttm with pages if needed. Typically system memory. */
-	if (bo->ttm && (dst_man->use_tt ||
-			(bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
-		ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
+	if (ttm && (dst_man->use_tt || (ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
+		ret = ttm_tt_populate(bo->bdev, ttm, ctx);
 		if (ret)
 			return ret;
 	}
@@ -537,23 +560,10 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
 	if (IS_ERR(dst_st))
 		return PTR_ERR(dst_st);
 
-	ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
-	if (ret) {
-		/* If we start mapping GGTT, we can no longer use man::use_tt here. */
-		dst_iter = !cpu_maps_iomem(dst_mem) ?
-			ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
-			ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
-						 dst_st, dst_reg->region.start);
-
-		src_iter = !cpu_maps_iomem(bo->resource) ?
-			ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
-			ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
-						 obj->ttm.cached_io_st,
-						 src_reg->region.start);
+	clear = !cpu_maps_iomem(bo->resource) && (!ttm || !ttm_tt_is_populated(ttm));
+	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
+		__i915_ttm_move(bo, clear, dst_mem, dst_st);
 
-		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
-	}
-	/* Below dst_mem becomes bo->resource. */
 	ttm_bo_move_sync_cleanup(bo, dst_mem);
 	i915_ttm_adjust_domains_after_move(obj);
 	i915_ttm_free_cached_io_st(obj);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
@ 2021-06-24 19:30   ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

In order to make the code a bit more readable and to facilitate
async memcpy moves, reorganize the move code a little. Determine
at an early stage whether to copy or to clear.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index c39d982c4fa6..4e529adcdfc7 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj,
 }
 
 static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
+			       bool clear,
 			       struct ttm_resource *dst_mem,
 			       struct sg_table *dst_st)
 {
@@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
 		return -EINVAL;
 
 	dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
-	if (!ttm || !ttm_tt_is_populated(ttm)) {
+	if (clear) {
 		if (bo->type == ttm_bo_type_kernel)
 			return -EINVAL;
 
-		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
-			return 0;
-
 		intel_engine_pm_get(i915->gt.migrate.context->engine);
 		ret = intel_context_migrate_clear(i915->gt.migrate.context, NULL,
 						  dst_st->sgl, dst_level,
@@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
 	return ret;
 }
 
-static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
-			 struct ttm_operation_ctx *ctx,
-			 struct ttm_resource *dst_mem,
-			 struct ttm_place *hop)
+static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
+			    struct ttm_resource *dst_mem,
+			    struct sg_table *dst_st)
 {
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
-	struct ttm_resource_manager *dst_man =
-		ttm_manager_type(bo->bdev, dst_mem->mem_type);
 	struct intel_memory_region *dst_reg, *src_reg;
 	union {
 		struct ttm_kmap_iter_tt tt;
 		struct ttm_kmap_iter_iomap io;
 	} _dst_iter, _src_iter;
 	struct ttm_kmap_iter *dst_iter, *src_iter;
-	struct sg_table *dst_st;
 	int ret;
 
 	dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
 	src_reg = i915_ttm_region(bo->bdev, bo->resource->mem_type);
 	GEM_BUG_ON(!dst_reg || !src_reg);
 
+	ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
+	if (ret) {
+		dst_iter = !cpu_maps_iomem(dst_mem) ?
+			ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
+			ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
+						 dst_st, dst_reg->region.start);
+
+		src_iter = !cpu_maps_iomem(bo->resource) ?
+			ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
+			ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
+						 obj->ttm.cached_io_st,
+						 src_reg->region.start);
+
+		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+	}
+}
+
+static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
+			 struct ttm_operation_ctx *ctx,
+			 struct ttm_resource *dst_mem,
+			 struct ttm_place *hop)
+{
+	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
+	struct ttm_resource_manager *dst_man =
+		ttm_manager_type(bo->bdev, dst_mem->mem_type);
+	struct ttm_tt *ttm = bo->ttm;
+	struct sg_table *dst_st;
+	bool clear;
+	int ret;
+
 	/* Sync for now. We could do the actual copy async. */
 	ret = ttm_bo_wait_ctx(bo, ctx);
 	if (ret)
@@ -526,9 +550,8 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
 	}
 
 	/* Populate ttm with pages if needed. Typically system memory. */
-	if (bo->ttm && (dst_man->use_tt ||
-			(bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
-		ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
+	if (ttm && (dst_man->use_tt || (ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
+		ret = ttm_tt_populate(bo->bdev, ttm, ctx);
 		if (ret)
 			return ret;
 	}
@@ -537,23 +560,10 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
 	if (IS_ERR(dst_st))
 		return PTR_ERR(dst_st);
 
-	ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
-	if (ret) {
-		/* If we start mapping GGTT, we can no longer use man::use_tt here. */
-		dst_iter = !cpu_maps_iomem(dst_mem) ?
-			ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
-			ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
-						 dst_st, dst_reg->region.start);
-
-		src_iter = !cpu_maps_iomem(bo->resource) ?
-			ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
-			ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
-						 obj->ttm.cached_io_st,
-						 src_reg->region.start);
+	clear = !cpu_maps_iomem(bo->resource) && (!ttm || !ttm_tt_is_populated(ttm));
+	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
+		__i915_ttm_move(bo, clear, dst_mem, dst_st);
 
-		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
-	}
-	/* Below dst_mem becomes bo->resource. */
 	ttm_bo_move_sync_cleanup(bo, dst_mem);
 	i915_ttm_adjust_domains_after_move(obj);
 	i915_ttm_free_cached_io_st(obj);
-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
@ 2021-06-24 19:30   ` Thomas Hellström
  -1 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

The buffer object argument to ttm_move_memcpy was only used to
determine whether the destination memory should be cleared only
or whether we should copy data. Replace it with a "clear" bool, and
update the callers.

The intention here is to be able to use ttm_move_memcpy() async under
a dma-fence as a fallback if an accelerated blit fails in a security-
critical path where data might leak if the blit is not properly
performed. For that purpose the bo is an unsuitable argument since
its relevant members might already have changed at call time.

Finally, update the ttm_move_memcpy kerneldoc that seems to have
ended up with a stale version.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
 include/drm/ttm/ttm_bo_driver.h         |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 4e529adcdfc7..f19847abe856 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -517,7 +517,7 @@ static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
 						 obj->ttm.cached_io_st,
 						 src_reg->region.start);
 
-		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
 	}
 }
 
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 2f57f824e6db..e3747f069674 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
 
 /**
  * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
- * @bo: The struct ttm_buffer_object.
- * @new_mem: The struct ttm_resource we're moving to (copy destination).
- * @new_iter: A struct ttm_kmap_iter representing the destination resource.
+ * @clear: Whether to clear rather than copy.
+ * @num_pages: Number of pages of the operation.
+ * @dst_iter: A struct ttm_kmap_iter representing the destination resource.
  * @src_iter: A struct ttm_kmap_iter representing the source resource.
  *
  * This function is intended to be able to move out async under a
  * dma-fence if desired.
  */
-void ttm_move_memcpy(struct ttm_buffer_object *bo,
+void ttm_move_memcpy(bool clear,
 		     u32 num_pages,
 		     struct ttm_kmap_iter *dst_iter,
 		     struct ttm_kmap_iter *src_iter)
 {
 	const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
 	const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
-	struct ttm_tt *ttm = bo->ttm;
 	struct dma_buf_map src_map, dst_map;
 	pgoff_t i;
 
@@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
 		return;
 
 	/* Don't move nonexistent data. Clear destination instead. */
-	if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
-		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
-			return;
-
+	if (clear) {
 		for (i = 0; i < num_pages; ++i) {
 			dst_ops->map_local(dst_iter, &dst_map, i);
 			if (dst_map.is_iomem)
@@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
 		struct ttm_kmap_iter_linear_io io;
 	} _dst_iter, _src_iter;
 	struct ttm_kmap_iter *dst_iter, *src_iter;
+	bool clear;
 	int ret = 0;
 
 	if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
@@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
 		goto out_src_iter;
 	}
 
-	ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+	clear = src_iter->ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm));
+	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
+		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
+
 	src_copy = *src_mem;
 	ttm_bo_move_sync_cleanup(bo, dst_mem);
 
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 68d6069572aa..5f087575194b 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, struct ttm_resource *mem);
  */
 void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
 
-void ttm_move_memcpy(struct ttm_buffer_object *bo,
+void ttm_move_memcpy(bool clear,
 		     u32 num_pages,
 		     struct ttm_kmap_iter *dst_iter,
 		     struct ttm_kmap_iter *src_iter);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Intel-gfx] [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
@ 2021-06-24 19:30   ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-24 19:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

The buffer object argument to ttm_move_memcpy was only used to
determine whether the destination memory should be cleared only
or whether we should copy data. Replace it with a "clear" bool, and
update the callers.

The intention here is to be able to use ttm_move_memcpy() async under
a dma-fence as a fallback if an accelerated blit fails in a security-
critical path where data might leak if the blit is not properly
performed. For that purpose the bo is an unsuitable argument since
its relevant members might already have changed at call time.

Finally, update the ttm_move_memcpy kerneldoc that seems to have
ended up with a stale version.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
 include/drm/ttm/ttm_bo_driver.h         |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 4e529adcdfc7..f19847abe856 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -517,7 +517,7 @@ static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
 						 obj->ttm.cached_io_st,
 						 src_reg->region.start);
 
-		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
 	}
 }
 
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 2f57f824e6db..e3747f069674 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
 
 /**
  * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
- * @bo: The struct ttm_buffer_object.
- * @new_mem: The struct ttm_resource we're moving to (copy destination).
- * @new_iter: A struct ttm_kmap_iter representing the destination resource.
+ * @clear: Whether to clear rather than copy.
+ * @num_pages: Number of pages of the operation.
+ * @dst_iter: A struct ttm_kmap_iter representing the destination resource.
  * @src_iter: A struct ttm_kmap_iter representing the source resource.
  *
  * This function is intended to be able to move out async under a
  * dma-fence if desired.
  */
-void ttm_move_memcpy(struct ttm_buffer_object *bo,
+void ttm_move_memcpy(bool clear,
 		     u32 num_pages,
 		     struct ttm_kmap_iter *dst_iter,
 		     struct ttm_kmap_iter *src_iter)
 {
 	const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
 	const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
-	struct ttm_tt *ttm = bo->ttm;
 	struct dma_buf_map src_map, dst_map;
 	pgoff_t i;
 
@@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
 		return;
 
 	/* Don't move nonexistent data. Clear destination instead. */
-	if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
-		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
-			return;
-
+	if (clear) {
 		for (i = 0; i < num_pages; ++i) {
 			dst_ops->map_local(dst_iter, &dst_map, i);
 			if (dst_map.is_iomem)
@@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
 		struct ttm_kmap_iter_linear_io io;
 	} _dst_iter, _src_iter;
 	struct ttm_kmap_iter *dst_iter, *src_iter;
+	bool clear;
 	int ret = 0;
 
 	if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
@@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
 		goto out_src_iter;
 	}
 
-	ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
+	clear = src_iter->ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm));
+	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
+		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
+
 	src_copy = *src_mem;
 	ttm_bo_move_sync_cleanup(bo, dst_mem);
 
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 68d6069572aa..5f087575194b 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, struct ttm_resource *mem);
  */
 void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
 
-void ttm_move_memcpy(struct ttm_buffer_object *bo,
+void ttm_move_memcpy(bool clear,
 		     u32 num_pages,
 		     struct ttm_kmap_iter *dst_iter,
 		     struct ttm_kmap_iter *src_iter);
-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
                   ` (2 preceding siblings ...)
  (?)
@ 2021-06-24 23:05 ` Patchwork
  -1 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2021-06-24 23:05 UTC (permalink / raw)
  To: Thomas Hellström; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2795 bytes --]

== Series Details ==

Series: drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
URL   : https://patchwork.freedesktop.org/series/91893/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10278 -> Patchwork_20463
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@requests:
    - fi-kbl-soraka:      [PASS][1] -> [INCOMPLETE][2] ([i915#2782])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/fi-kbl-soraka/igt@i915_selftest@live@requests.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/fi-kbl-soraka/igt@i915_selftest@live@requests.html

  * igt@runner@aborted:
    - fi-kbl-soraka:      NOTRUN -> [FAIL][3] ([i915#1436] / [i915#3363])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/fi-kbl-soraka/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload:
    - {fi-tgl-dsi}:       [DMESG-WARN][4] ([i915#1982] / [k.org#205379]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/fi-tgl-dsi/igt@i915_module_load@reload.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/fi-tgl-dsi/igt@i915_module_load@reload.html

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

  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2782]: https://gitlab.freedesktop.org/drm/intel/issues/2782
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379


Participating hosts (43 -> 38)
------------------------------

  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-kbl-7500u fi-bdw-samus 


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

  * Linux: CI_DRM_10278 -> Patchwork_20463

  CI-20190529: 20190529
  CI_DRM_10278: 33497e95c159f1fe3393f1016b1ec1187eab1589 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6119: a306810ebbc8984bde38a57ef0c33eea394f4e18 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_20463: 85a97e35327d5c07f52418186979b31c81f13eee @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

85a97e35327d drm/ttm, drm/i915: Update ttm_move_memcpy for async use
a621c25bc265 drm/i915/ttm: Reorganize the ttm move code somewhat

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 3457 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
                   ` (3 preceding siblings ...)
  (?)
@ 2021-06-25  7:39 ` Patchwork
  -1 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2021-06-25  7:39 UTC (permalink / raw)
  To: Thomas Hellström; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 30280 bytes --]

== Series Details ==

Series: drm/i915, drm/ttm: Update the ttm_move_memcpy() interface
URL   : https://patchwork.freedesktop.org/series/91893/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10278_full -> Patchwork_20463_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_20463_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_20463_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_20463_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_whisper@basic-queues-priority-all:
    - shard-tglb:         [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb5/igt@gem_exec_whisper@basic-queues-priority-all.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-tglb8/igt@gem_exec_whisper@basic-queues-priority-all.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-kbl:          NOTRUN -> [INCOMPLETE][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  
#### Warnings ####

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
    - shard-iclb:         [SKIP][4] ([i915#658]) -> [SKIP][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-apl:          NOTRUN -> [DMESG-WARN][6] ([i915#3002])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@gem_create@create-massive.html

  * igt@gem_ctx_persistence@idempotent:
    - shard-snb:          NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#1099]) +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-snb7/igt@gem_ctx_persistence@idempotent.html

  * igt@gem_exec_capture@pi@vcs0:
    - shard-kbl:          NOTRUN -> [INCOMPLETE][8] ([i915#2369] / [i915#794])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl2/igt@gem_exec_capture@pi@vcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb6/igt@gem_exec_fair@basic-none-share@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb5/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          NOTRUN -> [FAIL][11] ([i915#2842]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl7/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-none@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][12] ([i915#2842])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb1/igt@gem_exec_fair@basic-none@vcs1.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][13] -> [FAIL][14] ([i915#2842]) +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk6/igt@gem_exec_fair@basic-throttle@rcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk8/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_fence@parallel@vcs0:
    - shard-glk:          [PASS][15] -> [DMESG-WARN][16] ([i915#118] / [i915#95]) +1 similar issue
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk6/igt@gem_exec_fence@parallel@vcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk4/igt@gem_exec_fence@parallel@vcs0.html

  * igt@gem_exec_params@no-vebox:
    - shard-iclb:         NOTRUN -> [SKIP][17] ([fdo#109283])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@gem_exec_params@no-vebox.html

  * igt@gem_exec_reloc@basic-wide-active@bcs0:
    - shard-apl:          NOTRUN -> [FAIL][18] ([i915#3633]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@gem_exec_reloc@basic-wide-active@bcs0.html

  * igt@gem_exec_reloc@basic-wide-active@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][19] ([i915#3633]) +4 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl7/igt@gem_exec_reloc@basic-wide-active@rcs0.html

  * igt@gem_exec_reloc@basic-wide-active@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][20] ([i915#3633])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb1/igt@gem_exec_reloc@basic-wide-active@vcs1.html

  * igt@gem_huc_copy@huc-copy:
    - shard-apl:          NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#2190])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@gem_huc_copy@huc-copy.html

  * igt@gem_ppgtt@blt-vs-render-ctxn:
    - shard-snb:          [PASS][22] -> [DMESG-FAIL][23] ([i915#3603])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-snb7/igt@gem_ppgtt@blt-vs-render-ctxn.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-snb7/igt@gem_ppgtt@blt-vs-render-ctxn.html

  * igt@gem_pread@exhaustion:
    - shard-apl:          NOTRUN -> [WARN][24] ([i915#2658])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@gem_pread@exhaustion.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][25] ([i915#2658])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-snb2/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_render_copy@yf-tiled-to-vebox-yf-tiled:
    - shard-iclb:         NOTRUN -> [SKIP][26] ([i915#768])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@gem_render_copy@yf-tiled-to-vebox-yf-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-apl:          NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#3323])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-apl:          NOTRUN -> [FAIL][28] ([i915#3318])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@gem_userptr_blits@vma-merge.html

  * igt@gen9_exec_parse@batch-invalid-length:
    - shard-snb:          NOTRUN -> [SKIP][29] ([fdo#109271]) +199 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-snb7/igt@gen9_exec_parse@batch-invalid-length.html

  * igt@gen9_exec_parse@bb-start-far:
    - shard-iclb:         NOTRUN -> [SKIP][30] ([fdo#112306])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@gen9_exec_parse@bb-start-far.html

  * igt@i915_hangman@engine-error@vecs0:
    - shard-kbl:          NOTRUN -> [SKIP][31] ([fdo#109271]) +110 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl7/igt@i915_hangman@engine-error@vecs0.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-apl:          NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#1937])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@kms_async_flips@alternate-sync-async-flip:
    - shard-skl:          [PASS][33] -> [FAIL][34] ([i915#2521])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl4/igt@kms_async_flips@alternate-sync-async-flip.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl3/igt@kms_async_flips@alternate-sync-async-flip.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-iclb:         [PASS][35] -> [DMESG-WARN][36] ([i915#3621])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb6/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb1/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:
    - shard-glk:          [PASS][37] -> [DMESG-WARN][38] ([i915#118] / [i915#1982] / [i915#95])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk3/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk7/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html

  * igt@kms_big_fb@y-tiled-32bpp-rotate-0:
    - shard-glk:          NOTRUN -> [DMESG-WARN][39] ([i915#118] / [i915#95])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk5/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-glk:          NOTRUN -> [SKIP][40] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk5/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color@pipe-a-ctm-0-25:
    - shard-skl:          [PASS][41] -> [DMESG-WARN][42] ([i915#1982])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl4/igt@kms_color@pipe-a-ctm-0-25.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl3/igt@kms_color@pipe-a-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-a-degamma:
    - shard-kbl:          NOTRUN -> [SKIP][43] ([fdo#109271] / [fdo#111827]) +10 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl7/igt@kms_color_chamelium@pipe-a-degamma.html

  * igt@kms_color_chamelium@pipe-c-ctm-0-25:
    - shard-apl:          NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +30 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@kms_color_chamelium@pipe-c-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-c-ctm-limited-range:
    - shard-snb:          NOTRUN -> [SKIP][45] ([fdo#109271] / [fdo#111827]) +9 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-snb6/igt@kms_color_chamelium@pipe-c-ctm-limited-range.html

  * igt@kms_color_chamelium@pipe-d-degamma:
    - shard-skl:          NOTRUN -> [SKIP][46] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl8/igt@kms_color_chamelium@pipe-d-degamma.html

  * igt@kms_content_protection@atomic-dpms:
    - shard-apl:          NOTRUN -> [TIMEOUT][47] ([i915#1319]) +3 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@kms_content_protection@atomic-dpms.html

  * igt@kms_content_protection@uevent:
    - shard-apl:          NOTRUN -> [FAIL][48] ([i915#2105])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@kms_content_protection@uevent.html

  * igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen:
    - shard-skl:          NOTRUN -> [SKIP][49] ([fdo#109271]) +56 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl8/igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-kbl:          [PASS][50] -> [DMESG-WARN][51] ([i915#180]) +4 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl1/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-random:
    - shard-glk:          NOTRUN -> [SKIP][52] ([fdo#109271]) +26 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk5/igt@kms_cursor_crc@pipe-d-cursor-256x256-random.html

  * igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][53] ([fdo#109278]) +3 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions:
    - shard-iclb:         NOTRUN -> [SKIP][54] ([fdo#109274] / [fdo#109278])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-skl:          [PASS][55] -> [FAIL][56] ([i915#2346])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
    - shard-skl:          [PASS][57] -> [FAIL][58] ([i915#2122])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl5/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-apl:          NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#2672]) +1 similar issue
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt:
    - shard-iclb:         NOTRUN -> [SKIP][60] ([fdo#109280]) +5 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#533]) +3 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-skl:          NOTRUN -> [SKIP][62] ([fdo#109271] / [i915#533])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl8/igt@kms_pipe_crc_basic@read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][63] ([i915#265])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          NOTRUN -> [FAIL][64] ([fdo#108145] / [i915#265]) +2 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
    - shard-kbl:          NOTRUN -> [FAIL][65] ([fdo#108145] / [i915#265])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl1/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][66] -> [FAIL][67] ([fdo#108145] / [i915#265]) +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
    - shard-apl:          NOTRUN -> [SKIP][68] ([fdo#109271] / [i915#2733])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
    - shard-apl:          NOTRUN -> [SKIP][69] ([fdo#109271] / [i915#658]) +6 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5:
    - shard-kbl:          NOTRUN -> [SKIP][70] ([fdo#109271] / [i915#658])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl6/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
    - shard-glk:          NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#658])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk5/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [PASS][72] -> [SKIP][73] ([fdo#109441]) +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb1/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_setmode@clone-exclusive-crtc:
    - shard-skl:          NOTRUN -> [WARN][74] ([i915#2100])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl6/igt@kms_setmode@clone-exclusive-crtc.html

  * igt@kms_vblank@pipe-d-wait-forked-hang:
    - shard-apl:          NOTRUN -> [SKIP][75] ([fdo#109271]) +305 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl1/igt@kms_vblank@pipe-d-wait-forked-hang.html

  * igt@kms_writeback@writeback-pixel-formats:
    - shard-apl:          NOTRUN -> [SKIP][76] ([fdo#109271] / [i915#2437])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@kms_writeback@writeback-pixel-formats.html

  * igt@nouveau_crc@pipe-c-source-outp-complete:
    - shard-iclb:         NOTRUN -> [SKIP][77] ([i915#2530])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@nouveau_crc@pipe-c-source-outp-complete.html

  * igt@perf@polling-parameterized:
    - shard-tglb:         [PASS][78] -> [FAIL][79] ([i915#1542])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb5/igt@perf@polling-parameterized.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-tglb8/igt@perf@polling-parameterized.html

  * igt@perf@polling-small-buf:
    - shard-skl:          [PASS][80] -> [FAIL][81] ([i915#1722])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl10/igt@perf@polling-small-buf.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl8/igt@perf@polling-small-buf.html

  * igt@sysfs_clients@fair-1:
    - shard-kbl:          NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#2994])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl6/igt@sysfs_clients@fair-1.html

  * igt@sysfs_clients@split-25:
    - shard-apl:          NOTRUN -> [SKIP][83] ([fdo#109271] / [i915#2994])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@sysfs_clients@split-25.html

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [TIMEOUT][84] ([i915#2369] / [i915#3063]) -> [PASS][85]
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb5/igt@gem_eio@unwedge-stress.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-tglb8/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [FAIL][86] ([i915#2842]) -> [PASS][87] +1 similar issue
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb3/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-tglb2/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         [FAIL][88] ([i915#2849]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@gem_exec_fair@basic-throttle@rcs0.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb5/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_mmap_gtt@big-copy-xy:
    - shard-skl:          [FAIL][90] ([i915#307]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@gem_mmap_gtt@big-copy-xy.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl10/igt@gem_mmap_gtt@big-copy-xy.html

  * igt@gem_workarounds@suspend-resume-fd:
    - shard-kbl:          [DMESG-WARN][92] ([i915#180]) -> [PASS][93] +2 similar issues
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl2/igt@gem_workarounds@suspend-resume-fd.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl1/igt@gem_workarounds@suspend-resume-fd.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [DMESG-WARN][94] ([i915#180]) -> [PASS][95] +3 similar issues
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@i915_suspend@fence-restore-tiled2untiled.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl3/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_big_fb@linear-64bpp-rotate-0:
    - shard-iclb:         [DMESG-WARN][96] ([i915#3621]) -> [PASS][97]
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb1/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb3/igt@kms_big_fb@linear-64bpp-rotate-0.html

  * igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge:
    - shard-skl:          [DMESG-WARN][98] ([i915#1982]) -> [PASS][99]
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl9/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl6/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html

  * igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][100] ([i915#2122]) -> [PASS][101]
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk7/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk4/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][102] ([i915#79]) -> [PASS][103]
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@plain-flip-ts-check@c-edp1:
    - shard-skl:          [FAIL][104] ([i915#2122]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl6/igt@kms_flip@plain-flip-ts-check@c-edp1.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl9/igt@kms_flip@plain-flip-ts-check@c-edp1.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-skl:          [FAIL][106] ([i915#1188]) -> [PASS][107]
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@kms_hdr@bpc-switch-suspend.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl5/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          [FAIL][108] ([fdo#108145] / [i915#265]) -> [PASS][109]
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [SKIP][110] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb5/igt@kms_psr2_su@frontbuffer.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [SKIP][112] ([fdo#109441]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
    - shard-kbl:          [INCOMPLETE][114] ([i915#155]) -> [PASS][115]
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl2/igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][116] ([i915#1804] / [i915#2684]) -> [WARN][117] ([i915#2684])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@i915_pm_rc6_residency@rc6-idle.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-iclb5/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][118], [FAIL][119], [FAIL][120], [FAIL][121], [FAIL][122], [FAIL][123], [FAIL][124], [FAIL][125]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#92]) -> ([FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129], [FAIL][130], [FAIL][131], [FAIL][132], [FAIL][133]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#92])
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl2/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl2/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@runner@aborted.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl1/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl2/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-kbl3/igt@runner@aborted.html
    - shard-apl:          ([FAIL][134], [FAIL][135], [FAIL][136], [FAIL][137], [FAIL][138]) ([fdo#109271] / [i915#180] / [i915#3363]) -> ([FAIL][139], [FAIL][140]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363])
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl8/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl1/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl2/igt@runner@aborted.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20463/shard-apl8/igt@runner@aborted.html

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

  [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#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112306]: https://bugs.freedesktop.org/show_bug.cgi?id=112306
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [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

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 35939 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface (rev2)
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
                   ` (4 preceding siblings ...)
  (?)
@ 2021-06-25 21:22 ` Patchwork
  -1 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2021-06-25 21:22 UTC (permalink / raw)
  To: Thomas Hellström; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2861 bytes --]

== Series Details ==

Series: drm/i915, drm/ttm: Update the ttm_move_memcpy() interface (rev2)
URL   : https://patchwork.freedesktop.org/series/91893/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10282 -> Patchwork_20471
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-kbl-soraka:      [PASS][1] -> [INCOMPLETE][2] ([i915#155])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/fi-kbl-soraka/igt@gem_exec_suspend@basic-s0.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/fi-kbl-soraka/igt@gem_exec_suspend@basic-s0.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [PASS][3] -> [FAIL][4] ([i915#1372])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_mocs:
    - {fi-tgl-1115g4}:    [DMESG-WARN][5] ([i915#2867]) -> [PASS][6] +14 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/fi-tgl-1115g4/igt@i915_selftest@live@gt_mocs.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/fi-tgl-1115g4/igt@i915_selftest@live@gt_mocs.html

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

  [i915#1372]: https://gitlab.freedesktop.org/drm/intel/issues/1372
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303


Participating hosts (43 -> 38)
------------------------------

  Missing    (5): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-bsw-cyan fi-bdw-samus 


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

  * Linux: CI_DRM_10282 -> Patchwork_20471

  CI-20190529: 20190529
  CI_DRM_10282: 67f5a18128770817e4218a9e496d2bf5047c51e8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6119: a306810ebbc8984bde38a57ef0c33eea394f4e18 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_20471: 1d6ea1ed22074aa98ada142f26a6fe4f9f954bc1 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

1d6ea1ed2207 drm/ttm, drm/i915: Update ttm_move_memcpy for async use
946430347b95 drm/i915/ttm: Reorganize the ttm move code somewhat

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 3466 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface (rev2)
  2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
                   ` (5 preceding siblings ...)
  (?)
@ 2021-06-25 22:27 ` Patchwork
  -1 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2021-06-25 22:27 UTC (permalink / raw)
  To: Thomas Hellström; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 30285 bytes --]

== Series Details ==

Series: drm/i915, drm/ttm: Update the ttm_move_memcpy() interface (rev2)
URL   : https://patchwork.freedesktop.org/series/91893/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10282_full -> Patchwork_20471_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with Patchwork_20471_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_20471_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_20471_full:

### IGT changes ###

#### Warnings ####

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:
    - shard-iclb:         [SKIP][1] ([i915#658]) -> [SKIP][2] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb7/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-snb:          NOTRUN -> [DMESG-WARN][3] ([i915#3002]) +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb6/igt@gem_create@create-massive.html
    - shard-kbl:          NOTRUN -> [DMESG-WARN][4] ([i915#3002])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl7/igt@gem_create@create-massive.html

  * igt@gem_ctx_persistence@clone:
    - shard-snb:          NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#1099]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb2/igt@gem_ctx_persistence@clone.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#3063])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-tglb7/igt@gem_eio@unwedge-stress.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-tglb3/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-apl:          NOTRUN -> [FAIL][8] ([i915#2846])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl8/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-glk:          [PASS][9] -> [FAIL][10] ([i915#2842]) +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk1/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-tglb2/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-tglb1/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_flush@basic-batch-kernel-default-cmd:
    - shard-snb:          NOTRUN -> [SKIP][13] ([fdo#109271]) +292 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb5/igt@gem_exec_flush@basic-batch-kernel-default-cmd.html

  * igt@gem_exec_reloc@basic-wide-active@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][14] ([i915#3633]) +4 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl4/igt@gem_exec_reloc@basic-wide-active@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-apl:          NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#2190])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@gem_huc_copy@huc-copy.html

  * igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
    - shard-kbl:          NOTRUN -> [SKIP][16] ([fdo#109271]) +123 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl2/igt@gem_render_copy@x-tiled-to-vebox-yf-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#3323])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl2/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@input-checking:
    - shard-apl:          NOTRUN -> [DMESG-WARN][18] ([i915#3002])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl3/igt@gem_userptr_blits@input-checking.html

  * igt@gen9_exec_parse@bb-large:
    - shard-apl:          NOTRUN -> [FAIL][19] ([i915#3296])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@gen9_exec_parse@bb-large.html

  * igt@i915_pm_dc@dc5-psr:
    - shard-skl:          [PASS][20] -> [INCOMPLETE][21] ([i915#198])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl2/igt@i915_pm_dc@dc5-psr.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl4/igt@i915_pm_dc@dc5-psr.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-kbl:          NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#1937])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html
    - shard-apl:          NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#1937])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@i915_suspend@sysfs-reader:
    - shard-kbl:          [PASS][24] -> [DMESG-WARN][25] ([i915#180]) +1 similar issue
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl7/igt@i915_suspend@sysfs-reader.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl4/igt@i915_suspend@sysfs-reader.html

  * igt@kms_async_flips@alternate-sync-async-flip:
    - shard-skl:          [PASS][26] -> [FAIL][27] ([i915#2521])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl7/igt@kms_async_flips@alternate-sync-async-flip.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl8/igt@kms_async_flips@alternate-sync-async-flip.html

  * igt@kms_chamelium@dp-hpd-storm-disable:
    - shard-skl:          NOTRUN -> [SKIP][28] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl8/igt@kms_chamelium@dp-hpd-storm-disable.html

  * igt@kms_chamelium@hdmi-mode-timings:
    - shard-snb:          NOTRUN -> [SKIP][29] ([fdo#109271] / [fdo#111827]) +15 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb2/igt@kms_chamelium@hdmi-mode-timings.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-glk:          NOTRUN -> [SKIP][30] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk5/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_chamelium@vga-hpd-with-enabled-mode:
    - shard-iclb:         NOTRUN -> [SKIP][31] ([fdo#109284] / [fdo#111827])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_chamelium@vga-hpd-with-enabled-mode.html

  * igt@kms_color@pipe-b-ctm-max:
    - shard-skl:          [PASS][32] -> [DMESG-WARN][33] ([i915#1982])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl8/igt@kms_color@pipe-b-ctm-max.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl6/igt@kms_color@pipe-b-ctm-max.html

  * igt@kms_color_chamelium@pipe-a-ctm-limited-range:
    - shard-apl:          NOTRUN -> [SKIP][34] ([fdo#109271] / [fdo#111827]) +24 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl3/igt@kms_color_chamelium@pipe-a-ctm-limited-range.html

  * igt@kms_color_chamelium@pipe-invalid-gamma-lut-sizes:
    - shard-kbl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) +11 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl3/igt@kms_color_chamelium@pipe-invalid-gamma-lut-sizes.html

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

  * igt@kms_content_protection@uevent:
    - shard-kbl:          NOTRUN -> [FAIL][37] ([i915#2105])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl2/igt@kms_content_protection@uevent.html
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#109300] / [fdo#111066])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_content_protection@uevent.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-random:
    - shard-glk:          NOTRUN -> [SKIP][39] ([fdo#109271]) +30 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk5/igt@kms_cursor_crc@pipe-d-cursor-256x256-random.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge:
    - shard-glk:          [PASS][40] -> [DMESG-FAIL][41] ([i915#118] / [i915#70] / [i915#95])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk8/igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk6/igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge.html

  * igt@kms_cursor_legacy@pipe-d-single-move:
    - shard-iclb:         NOTRUN -> [SKIP][42] ([fdo#109278]) +2 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_cursor_legacy@pipe-d-single-move.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-apl:          NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#533])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl8/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_flip@2x-wf_vblank-ts-check-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][44] ([fdo#109274])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_flip@2x-wf_vblank-ts-check-interruptible.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-edp1:
    - shard-skl:          [PASS][45] -> [INCOMPLETE][46] ([i915#146] / [i915#198])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl6/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl7/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
    - shard-apl:          [PASS][47] -> [DMESG-WARN][48] ([i915#180]) +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs:
    - shard-apl:          NOTRUN -> [SKIP][49] ([fdo#109271] / [i915#2672])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-shrfb-fliptrack-mmap-gtt:
    - shard-iclb:         NOTRUN -> [SKIP][50] ([fdo#109280]) +3 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-shrfb-fliptrack-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-farfromfence-mmap-gtt:
    - shard-skl:          NOTRUN -> [SKIP][51] ([fdo#109271]) +9 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl8/igt@kms_frontbuffer_tracking@fbcpsr-farfromfence-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@psr-suspend:
    - shard-skl:          [PASS][52] -> [INCOMPLETE][53] ([i915#123] / [i915#146])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl3/igt@kms_frontbuffer_tracking@psr-suspend.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl7/igt@kms_frontbuffer_tracking@psr-suspend.html

  * igt@kms_hdr@bpc-switch-dpms:
    - shard-skl:          [PASS][54] -> [FAIL][55] ([i915#1188])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl7/igt@kms_hdr@bpc-switch-dpms.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl8/igt@kms_hdr@bpc-switch-dpms.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-apl:          NOTRUN -> [DMESG-WARN][56] ([i915#180])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl8/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][57] ([fdo#109271] / [i915#533])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl2/igt@kms_pipe_crc_basic@read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
    - shard-kbl:          NOTRUN -> [FAIL][58] ([fdo#108145] / [i915#265])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl3/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
    - shard-apl:          NOTRUN -> [FAIL][59] ([fdo#108145] / [i915#265]) +3 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl3/igt@kms_plane_alpha_blend@pipe-a-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][60] ([i915#265]) +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          [PASS][61] -> [FAIL][62] ([fdo#108145] / [i915#265]) +1 similar issue
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
    - shard-apl:          NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#658]) +7 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#658]) +2 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
    - shard-glk:          NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#658])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk5/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html

  * igt@kms_psr@psr2_dpms:
    - shard-iclb:         NOTRUN -> [SKIP][66] ([fdo#109441])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@kms_psr@psr2_dpms.html

  * igt@kms_psr@psr2_sprite_render:
    - shard-iclb:         [PASS][67] -> [SKIP][68] ([fdo#109441])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb2/igt@kms_psr@psr2_sprite_render.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb5/igt@kms_psr@psr2_sprite_render.html

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

  * igt@kms_vblank@pipe-b-accuracy-idle:
    - shard-skl:          [PASS][70] -> [FAIL][71] ([i915#43])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl3/igt@kms_vblank@pipe-b-accuracy-idle.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl7/igt@kms_vblank@pipe-b-accuracy-idle.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][72] ([i915#180])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * igt@kms_vblank@pipe-d-wait-forked-hang:
    - shard-apl:          NOTRUN -> [SKIP][73] ([fdo#109271]) +254 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@kms_vblank@pipe-d-wait-forked-hang.html

  * igt@kms_writeback@writeback-check-output:
    - shard-apl:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#2437]) +1 similar issue
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl8/igt@kms_writeback@writeback-check-output.html

  * igt@nouveau_crc@pipe-c-source-rg:
    - shard-iclb:         NOTRUN -> [SKIP][75] ([i915#2530])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@nouveau_crc@pipe-c-source-rg.html

  * igt@prime_nv_api@i915_nv_double_export:
    - shard-iclb:         NOTRUN -> [SKIP][76] ([fdo#109291])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@prime_nv_api@i915_nv_double_export.html

  * igt@runner@aborted:
    - shard-snb:          NOTRUN -> ([FAIL][77], [FAIL][78]) ([i915#3002])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb6/igt@runner@aborted.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-snb2/igt@runner@aborted.html

  * igt@sysfs_clients@fair-7:
    - shard-apl:          NOTRUN -> [SKIP][79] ([fdo#109271] / [i915#2994]) +3 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl2/igt@sysfs_clients@fair-7.html

  * igt@sysfs_clients@sema-10:
    - shard-kbl:          NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#2994]) +1 similar issue
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl3/igt@sysfs_clients@sema-10.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
    - shard-apl:          [DMESG-WARN][81] ([i915#180]) -> [PASS][82]
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl8/igt@gem_ctx_isolation@preservation-s3@vcs0.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl1/igt@gem_ctx_isolation@preservation-s3@vcs0.html

  * igt@gem_eio@unwedge-stress:
    - shard-iclb:         [TIMEOUT][83] ([i915#2369] / [i915#2481] / [i915#3070]) -> [PASS][84]
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb7/igt@gem_eio@unwedge-stress.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb2/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [FAIL][85] ([i915#2842]) -> [PASS][86] +1 similar issue
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk3/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk8/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         [FAIL][87] ([i915#2849]) -> [PASS][88]
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb4/igt@gem_exec_fair@basic-throttle@rcs0.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb4/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_gttfill@basic:
    - shard-iclb:         [INCOMPLETE][89] ([i915#2405]) -> [PASS][90]
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb4/igt@gem_exec_gttfill@basic.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb1/igt@gem_exec_gttfill@basic.html

  * igt@gem_mmap_gtt@big-copy-xy:
    - shard-glk:          [FAIL][91] ([i915#307]) -> [PASS][92]
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk3/igt@gem_mmap_gtt@big-copy-xy.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk1/igt@gem_mmap_gtt@big-copy-xy.html

  * igt@gem_spin_batch@spin-each:
    - shard-apl:          [FAIL][93] ([i915#2898]) -> [PASS][94]
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl3/igt@gem_spin_batch@spin-each.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl2/igt@gem_spin_batch@spin-each.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-glk:          [DMESG-WARN][95] ([i915#1436] / [i915#716]) -> [PASS][96]
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk1/igt@gen9_exec_parse@allowed-all.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk9/igt@gen9_exec_parse@allowed-all.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:
    - shard-glk:          [DMESG-WARN][97] ([i915#118] / [i915#95]) -> [PASS][98]
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-glk9/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-glk7/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html

  * igt@kms_color@pipe-a-ctm-0-5:
    - shard-skl:          [DMESG-WARN][99] ([i915#1982]) -> [PASS][100]
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl7/igt@kms_color@pipe-a-ctm-0-5.html
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl8/igt@kms_color@pipe-a-ctm-0-5.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-kbl:          [DMESG-WARN][101] ([i915#180]) -> [PASS][102] +7 similar issues
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl4/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          [FAIL][103] ([fdo#108145] / [i915#265]) -> [PASS][104]
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-skl1/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_psr@psr2_cursor_plane_move:
    - shard-iclb:         [SKIP][105] ([fdo#109441]) -> [PASS][106] +1 similar issue
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb7/igt@kms_psr@psr2_cursor_plane_move.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html

  
#### Warnings ####

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1:
    - shard-iclb:         [SKIP][107] -> [SKIP][108] ([i915#658])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-iclb2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-iclb5/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][109], [FAIL][110], [FAIL][111], [FAIL][112], [FAIL][113], [FAIL][114], [FAIL][115], [FAIL][116], [FAIL][117], [FAIL][118]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#2505] / [i915#3002] / [i915#3363]) -> ([FAIL][119], [FAIL][120], [FAIL][121], [FAIL][122], [FAIL][123], [FAIL][124]) ([i915#180] / [i915#1814] / [i915#2505] / [i915#3002] / [i915#3363] / [i915#602])
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl6/igt@runner@aborted.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl4/igt@runner@aborted.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl4/igt@runner@aborted.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl1/igt@runner@aborted.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl6/igt@runner@aborted.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl1/igt@runner@aborted.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl4/igt@runner@aborted.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl4/igt@runner@aborted.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl1/igt@runner@aborted.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-kbl1/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl4/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl6/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl1/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl4/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl6/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-kbl7/igt@runner@aborted.html
    - shard-apl:          ([FAIL][125], [FAIL][126], [FAIL][127]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3363]) -> ([FAIL][128], [FAIL][129], [FAIL][130]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363])
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl8/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl1/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10282/shard-apl2/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl8/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl3/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20471/shard-apl2/igt@runner@aborted.html

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

  [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#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111066]: https://bugs.freedesktop.org/show_bug.cgi?id=111066
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [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#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
  [i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
  [i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2105]: https://gitlab.freedesktop.org/drm/intel/issues/2105
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
  [i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2481]: https://gitlab.freedesktop.org/drm/intel/issues/2481
  [i915#2505]: https://gitlab.freedesktop.org/drm/intel/issues/2505
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
  [i915#2898]: https://gitlab.freedesktop.org/drm/intel/issues/2898
  [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#307]: https://gitlab.freedesktop.org/drm/intel/issues/307
  [i915#3070]: https://gitlab.freedesktop.org/drm/intel/issues/3070
  [i915#3296]: https://gitlab.freedesktop.org/drm/intel/issues/3296
  [i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3633]: https://gitlab.freedesktop.org/drm/intel/issues/3633
  [i915#43]: https://gitlab.freedesktop.org/drm/intel/issues/43
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#602]: https://gitlab.freedesktop.org/drm/intel/issues/602
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#70]: https://gitlab.freedesktop.org/drm/intel/issues/70
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (9 -> 9)
------------------------------

  No changes in participating hosts


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

  * Linux: CI_DRM_10282 -> Patchwork_20471

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 38276 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
  2021-06-24 19:30   ` [Intel-gfx] " Thomas Hellström
@ 2021-06-28 11:21     ` Thomas Hellström
  -1 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-28 11:21 UTC (permalink / raw)
  To: intel-gfx, dri-devel, Christian König; +Cc: matthew.auld


On 6/24/21 9:30 PM, Thomas Hellström wrote:
> The buffer object argument to ttm_move_memcpy was only used to
> determine whether the destination memory should be cleared only
> or whether we should copy data. Replace it with a "clear" bool, and
> update the callers.
>
> The intention here is to be able to use ttm_move_memcpy() async under
> a dma-fence as a fallback if an accelerated blit fails in a security-
> critical path where data might leak if the blit is not properly
> performed. For that purpose the bo is an unsuitable argument since
> its relevant members might already have changed at call time.
>
> Finally, update the ttm_move_memcpy kerneldoc that seems to have
> ended up with a stale version.

Hmm,

Not sure where the Cc: Christian König ended up, but in any case 
Christian if you find this patch ok, Ack to merge through drm_intel_gt_next?

/Thomas




>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
>   include/drm/ttm/ttm_bo_driver.h         |  2 +-
>   3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 4e529adcdfc7..f19847abe856 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -517,7 +517,7 @@ static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
>   						 obj->ttm.cached_io_st,
>   						 src_reg->region.start);
>   
> -		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>   	}
>   }
>   
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 2f57f824e6db..e3747f069674 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
>   
>   /**
>    * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
> - * @bo: The struct ttm_buffer_object.
> - * @new_mem: The struct ttm_resource we're moving to (copy destination).
> - * @new_iter: A struct ttm_kmap_iter representing the destination resource.
> + * @clear: Whether to clear rather than copy.
> + * @num_pages: Number of pages of the operation.
> + * @dst_iter: A struct ttm_kmap_iter representing the destination resource.
>    * @src_iter: A struct ttm_kmap_iter representing the source resource.
>    *
>    * This function is intended to be able to move out async under a
>    * dma-fence if desired.
>    */
> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
> +void ttm_move_memcpy(bool clear,
>   		     u32 num_pages,
>   		     struct ttm_kmap_iter *dst_iter,
>   		     struct ttm_kmap_iter *src_iter)
>   {
>   	const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
>   	const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
> -	struct ttm_tt *ttm = bo->ttm;
>   	struct dma_buf_map src_map, dst_map;
>   	pgoff_t i;
>   
> @@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
>   		return;
>   
>   	/* Don't move nonexistent data. Clear destination instead. */
> -	if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
> -		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
> -			return;
> -
> +	if (clear) {
>   		for (i = 0; i < num_pages; ++i) {
>   			dst_ops->map_local(dst_iter, &dst_map, i);
>   			if (dst_map.is_iomem)
> @@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>   		struct ttm_kmap_iter_linear_io io;
>   	} _dst_iter, _src_iter;
>   	struct ttm_kmap_iter *dst_iter, *src_iter;
> +	bool clear;
>   	int ret = 0;
>   
>   	if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
> @@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>   		goto out_src_iter;
>   	}
>   
> -	ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +	clear = src_iter->ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm));
> +	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
> +		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
> +
>   	src_copy = *src_mem;
>   	ttm_bo_move_sync_cleanup(bo, dst_mem);
>   
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 68d6069572aa..5f087575194b 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, struct ttm_resource *mem);
>    */
>   void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
>   
> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
> +void ttm_move_memcpy(bool clear,
>   		     u32 num_pages,
>   		     struct ttm_kmap_iter *dst_iter,
>   		     struct ttm_kmap_iter *src_iter);

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
@ 2021-06-28 11:21     ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-28 11:21 UTC (permalink / raw)
  To: intel-gfx, dri-devel, Christian König; +Cc: matthew.auld


On 6/24/21 9:30 PM, Thomas Hellström wrote:
> The buffer object argument to ttm_move_memcpy was only used to
> determine whether the destination memory should be cleared only
> or whether we should copy data. Replace it with a "clear" bool, and
> update the callers.
>
> The intention here is to be able to use ttm_move_memcpy() async under
> a dma-fence as a fallback if an accelerated blit fails in a security-
> critical path where data might leak if the blit is not properly
> performed. For that purpose the bo is an unsuitable argument since
> its relevant members might already have changed at call time.
>
> Finally, update the ttm_move_memcpy kerneldoc that seems to have
> ended up with a stale version.

Hmm,

Not sure where the Cc: Christian König ended up, but in any case 
Christian if you find this patch ok, Ack to merge through drm_intel_gt_next?

/Thomas




>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
>   include/drm/ttm/ttm_bo_driver.h         |  2 +-
>   3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 4e529adcdfc7..f19847abe856 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -517,7 +517,7 @@ static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
>   						 obj->ttm.cached_io_st,
>   						 src_reg->region.start);
>   
> -		ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>   	}
>   }
>   
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 2f57f824e6db..e3747f069674 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
>   
>   /**
>    * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
> - * @bo: The struct ttm_buffer_object.
> - * @new_mem: The struct ttm_resource we're moving to (copy destination).
> - * @new_iter: A struct ttm_kmap_iter representing the destination resource.
> + * @clear: Whether to clear rather than copy.
> + * @num_pages: Number of pages of the operation.
> + * @dst_iter: A struct ttm_kmap_iter representing the destination resource.
>    * @src_iter: A struct ttm_kmap_iter representing the source resource.
>    *
>    * This function is intended to be able to move out async under a
>    * dma-fence if desired.
>    */
> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
> +void ttm_move_memcpy(bool clear,
>   		     u32 num_pages,
>   		     struct ttm_kmap_iter *dst_iter,
>   		     struct ttm_kmap_iter *src_iter)
>   {
>   	const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
>   	const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
> -	struct ttm_tt *ttm = bo->ttm;
>   	struct dma_buf_map src_map, dst_map;
>   	pgoff_t i;
>   
> @@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
>   		return;
>   
>   	/* Don't move nonexistent data. Clear destination instead. */
> -	if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
> -		if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
> -			return;
> -
> +	if (clear) {
>   		for (i = 0; i < num_pages; ++i) {
>   			dst_ops->map_local(dst_iter, &dst_map, i);
>   			if (dst_map.is_iomem)
> @@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>   		struct ttm_kmap_iter_linear_io io;
>   	} _dst_iter, _src_iter;
>   	struct ttm_kmap_iter *dst_iter, *src_iter;
> +	bool clear;
>   	int ret = 0;
>   
>   	if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
> @@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>   		goto out_src_iter;
>   	}
>   
> -	ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +	clear = src_iter->ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm));
> +	if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))
> +		ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
> +
>   	src_copy = *src_mem;
>   	ttm_bo_move_sync_cleanup(bo, dst_mem);
>   
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 68d6069572aa..5f087575194b 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, struct ttm_resource *mem);
>    */
>   void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
>   
> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
> +void ttm_move_memcpy(bool clear,
>   		     u32 num_pages,
>   		     struct ttm_kmap_iter *dst_iter,
>   		     struct ttm_kmap_iter *src_iter);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
  2021-06-24 19:30   ` [Intel-gfx] " Thomas Hellström
@ 2021-06-30 14:19     ` Matthew Auld
  -1 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 14:19 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> In order to make the code a bit more readable and to facilitate
> async memcpy moves, reorganize the move code a little. Determine
> at an early stage whether to copy or to clear.
>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
>  1 file changed, 40 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index c39d982c4fa6..4e529adcdfc7 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj,
>  }
>
>  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> +                              bool clear,
>                                struct ttm_resource *dst_mem,
>                                struct sg_table *dst_st)
>  {
> @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
>                 return -EINVAL;
>
>         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> +       if (clear) {
>                 if (bo->type == ttm_bo_type_kernel)
>                         return -EINVAL;

Was that meant to be:
return 0:

?

Also does that mean we are incorrectly falling back to memset, for
non-userspace objects, instead of making it a noop?

>
> -               if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
> -                       return 0;
> -
>                 intel_engine_pm_get(i915->gt.migrate.context->engine);
>                 ret = intel_context_migrate_clear(i915->gt.migrate.context, NULL,
>                                                   dst_st->sgl, dst_level,
> @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
>         return ret;
>  }
>
> -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> -                        struct ttm_operation_ctx *ctx,
> -                        struct ttm_resource *dst_mem,
> -                        struct ttm_place *hop)
> +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
> +                           struct ttm_resource *dst_mem,
> +                           struct sg_table *dst_st)
>  {
>         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> -       struct ttm_resource_manager *dst_man =
> -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
>         struct intel_memory_region *dst_reg, *src_reg;
>         union {
>                 struct ttm_kmap_iter_tt tt;
>                 struct ttm_kmap_iter_iomap io;
>         } _dst_iter, _src_iter;
>         struct ttm_kmap_iter *dst_iter, *src_iter;
> -       struct sg_table *dst_st;
>         int ret;
>
>         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
>         src_reg = i915_ttm_region(bo->bdev, bo->resource->mem_type);
>         GEM_BUG_ON(!dst_reg || !src_reg);
>
> +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> +       if (ret) {

One future consideration is flat CCS where I don't think we can easily
fall back to memcpy for userspace objects. Maybe we can make this
fallback conditional on DG1 or !ALLOC_USER for now, or just add a
TODO?

> +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
> +                       ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
> +                                                dst_st, dst_reg->region.start);
> +
> +               src_iter = !cpu_maps_iomem(bo->resource) ?
> +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
> +                       ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
> +                                                obj->ttm.cached_io_st,
> +                                                src_reg->region.start);
> +
> +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +       }
> +}
> +
> +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> +                        struct ttm_operation_ctx *ctx,
> +                        struct ttm_resource *dst_mem,
> +                        struct ttm_place *hop)
> +{
> +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> +       struct ttm_resource_manager *dst_man =
> +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> +       struct ttm_tt *ttm = bo->ttm;
> +       struct sg_table *dst_st;
> +       bool clear;
> +       int ret;
> +
>         /* Sync for now. We could do the actual copy async. */
>         ret = ttm_bo_wait_ctx(bo, ctx);
>         if (ret)
> @@ -526,9 +550,8 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
>         }
>
>         /* Populate ttm with pages if needed. Typically system memory. */
> -       if (bo->ttm && (dst_man->use_tt ||
> -                       (bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
> -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> +       if (ttm && (dst_man->use_tt || (ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
> +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
>                 if (ret)
>                         return ret;
>         }
> @@ -537,23 +560,10 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
>         if (IS_ERR(dst_st))
>                 return PTR_ERR(dst_st);
>
> -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> -       if (ret) {
> -               /* If we start mapping GGTT, we can no longer use man::use_tt here. */
> -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
> -                       ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
> -                                                dst_st, dst_reg->region.start);
> -
> -               src_iter = !cpu_maps_iomem(bo->resource) ?
> -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
> -                       ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
> -                                                obj->ttm.cached_io_st,
> -                                                src_reg->region.start);
> +       clear = !cpu_maps_iomem(bo->resource) && (!ttm || !ttm_tt_is_populated(ttm));
> +       if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))

Seems quite hard to read?

Reviewed-by: Matthew Auld <matthew.auld@intel.com>


> +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
>
> -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> -       }
> -       /* Below dst_mem becomes bo->resource. */
>         ttm_bo_move_sync_cleanup(bo, dst_mem);
>         i915_ttm_adjust_domains_after_move(obj);
>         i915_ttm_free_cached_io_st(obj);
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
@ 2021-06-30 14:19     ` Matthew Auld
  0 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 14:19 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> In order to make the code a bit more readable and to facilitate
> async memcpy moves, reorganize the move code a little. Determine
> at an early stage whether to copy or to clear.
>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-----------
>  1 file changed, 40 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index c39d982c4fa6..4e529adcdfc7 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct drm_i915_gem_object *obj,
>  }
>
>  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> +                              bool clear,
>                                struct ttm_resource *dst_mem,
>                                struct sg_table *dst_st)
>  {
> @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
>                 return -EINVAL;
>
>         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> +       if (clear) {
>                 if (bo->type == ttm_bo_type_kernel)
>                         return -EINVAL;

Was that meant to be:
return 0:

?

Also does that mean we are incorrectly falling back to memset, for
non-userspace objects, instead of making it a noop?

>
> -               if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
> -                       return 0;
> -
>                 intel_engine_pm_get(i915->gt.migrate.context->engine);
>                 ret = intel_context_migrate_clear(i915->gt.migrate.context, NULL,
>                                                   dst_st->sgl, dst_level,
> @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
>         return ret;
>  }
>
> -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> -                        struct ttm_operation_ctx *ctx,
> -                        struct ttm_resource *dst_mem,
> -                        struct ttm_place *hop)
> +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool clear,
> +                           struct ttm_resource *dst_mem,
> +                           struct sg_table *dst_st)
>  {
>         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> -       struct ttm_resource_manager *dst_man =
> -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
>         struct intel_memory_region *dst_reg, *src_reg;
>         union {
>                 struct ttm_kmap_iter_tt tt;
>                 struct ttm_kmap_iter_iomap io;
>         } _dst_iter, _src_iter;
>         struct ttm_kmap_iter *dst_iter, *src_iter;
> -       struct sg_table *dst_st;
>         int ret;
>
>         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
>         src_reg = i915_ttm_region(bo->bdev, bo->resource->mem_type);
>         GEM_BUG_ON(!dst_reg || !src_reg);
>
> +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> +       if (ret) {

One future consideration is flat CCS where I don't think we can easily
fall back to memcpy for userspace objects. Maybe we can make this
fallback conditional on DG1 or !ALLOC_USER for now, or just add a
TODO?

> +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
> +                       ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
> +                                                dst_st, dst_reg->region.start);
> +
> +               src_iter = !cpu_maps_iomem(bo->resource) ?
> +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
> +                       ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
> +                                                obj->ttm.cached_io_st,
> +                                                src_reg->region.start);
> +
> +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> +       }
> +}
> +
> +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> +                        struct ttm_operation_ctx *ctx,
> +                        struct ttm_resource *dst_mem,
> +                        struct ttm_place *hop)
> +{
> +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> +       struct ttm_resource_manager *dst_man =
> +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> +       struct ttm_tt *ttm = bo->ttm;
> +       struct sg_table *dst_st;
> +       bool clear;
> +       int ret;
> +
>         /* Sync for now. We could do the actual copy async. */
>         ret = ttm_bo_wait_ctx(bo, ctx);
>         if (ret)
> @@ -526,9 +550,8 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
>         }
>
>         /* Populate ttm with pages if needed. Typically system memory. */
> -       if (bo->ttm && (dst_man->use_tt ||
> -                       (bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
> -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> +       if (ttm && (dst_man->use_tt || (ttm->page_flags & TTM_PAGE_FLAG_SWAPPED))) {
> +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
>                 if (ret)
>                         return ret;
>         }
> @@ -537,23 +560,10 @@ static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
>         if (IS_ERR(dst_st))
>                 return PTR_ERR(dst_st);
>
> -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> -       if (ret) {
> -               /* If we start mapping GGTT, we can no longer use man::use_tt here. */
> -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm) :
> -                       ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap,
> -                                                dst_st, dst_reg->region.start);
> -
> -               src_iter = !cpu_maps_iomem(bo->resource) ?
> -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm) :
> -                       ttm_kmap_iter_iomap_init(&_src_iter.io, &src_reg->iomap,
> -                                                obj->ttm.cached_io_st,
> -                                                src_reg->region.start);
> +       clear = !cpu_maps_iomem(bo->resource) && (!ttm || !ttm_tt_is_populated(ttm));
> +       if (!(clear && ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)))

Seems quite hard to read?

Reviewed-by: Matthew Auld <matthew.auld@intel.com>


> +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
>
> -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
> -       }
> -       /* Below dst_mem becomes bo->resource. */
>         ttm_bo_move_sync_cleanup(bo, dst_mem);
>         i915_ttm_adjust_domains_after_move(obj);
>         i915_ttm_free_cached_io_st(obj);
> --
> 2.31.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
  2021-06-24 19:30   ` [Intel-gfx] " Thomas Hellström
@ 2021-06-30 14:43     ` Matthew Auld
  -1 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 14:43 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> The buffer object argument to ttm_move_memcpy was only used to
> determine whether the destination memory should be cleared only
> or whether we should copy data. Replace it with a "clear" bool, and
> update the callers.
>
> The intention here is to be able to use ttm_move_memcpy() async under
> a dma-fence as a fallback if an accelerated blit fails in a security-
> critical path where data might leak if the blit is not properly
> performed. For that purpose the bo is an unsuitable argument since
> its relevant members might already have changed at call time.
>
> Finally, update the ttm_move_memcpy kerneldoc that seems to have
> ended up with a stale version.
>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
@ 2021-06-30 14:43     ` Matthew Auld
  0 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 14:43 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> The buffer object argument to ttm_move_memcpy was only used to
> determine whether the destination memory should be cleared only
> or whether we should copy data. Replace it with a "clear" bool, and
> update the callers.
>
> The intention here is to be able to use ttm_move_memcpy() async under
> a dma-fence as a fallback if an accelerated blit fails in a security-
> critical path where data might leak if the blit is not properly
> performed. For that purpose the bo is an unsuitable argument since
> its relevant members might already have changed at call time.
>
> Finally, update the ttm_move_memcpy kerneldoc that seems to have
> ended up with a stale version.
>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
  2021-06-30 14:19     ` [Intel-gfx] " Matthew Auld
@ 2021-06-30 15:27       ` Thomas Hellström
  -1 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-30 15:27 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> <thomas.hellstrom@linux.intel.com> wrote:
> > 
> > In order to make the code a bit more readable and to facilitate
> > async memcpy moves, reorganize the move code a little. Determine
> > at an early stage whether to copy or to clear.
> > 
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > ----
> >  1 file changed, 40 insertions(+), 30 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > index c39d982c4fa6..4e529adcdfc7 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > drm_i915_gem_object *obj,
> >  }
> > 
> >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > +                              bool clear,
> >                                struct ttm_resource *dst_mem,
> >                                struct sg_table *dst_st)
> >  {
> > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > ttm_buffer_object *bo,
> >                 return -EINVAL;
> > 
> >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > +       if (clear) {
> >                 if (bo->type == ttm_bo_type_kernel)
> >                         return -EINVAL;
> 
> Was that meant to be:
> return 0:
> 
> ?
> 
> Also does that mean we are incorrectly falling back to memset, for
> non-userspace objects, instead of making it a noop?

No, we're deliberately falling back to memset for non-userspace
objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
everything is implemented correctly.

> 
> > 
> > -               if (ttm && !(ttm->page_flags &
> > TTM_PAGE_FLAG_ZERO_ALLOC))
> > -                       return 0;
> > -
> >                 intel_engine_pm_get(i915->gt.migrate.context-
> > >engine);
> >                 ret = intel_context_migrate_clear(i915-
> > >gt.migrate.context, NULL,
> >                                                   dst_st->sgl,
> > dst_level,
> > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > ttm_buffer_object *bo,
> >         return ret;
> >  }
> > 
> > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > -                        struct ttm_operation_ctx *ctx,
> > -                        struct ttm_resource *dst_mem,
> > -                        struct ttm_place *hop)
> > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > clear,
> > +                           struct ttm_resource *dst_mem,
> > +                           struct sg_table *dst_st)
> >  {
> >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > -       struct ttm_resource_manager *dst_man =
> > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> >         struct intel_memory_region *dst_reg, *src_reg;
> >         union {
> >                 struct ttm_kmap_iter_tt tt;
> >                 struct ttm_kmap_iter_iomap io;
> >         } _dst_iter, _src_iter;
> >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > -       struct sg_table *dst_st;
> >         int ret;
> > 
> >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > >mem_type);
> >         GEM_BUG_ON(!dst_reg || !src_reg);
> > 
> > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > +       if (ret) {
> 
> One future consideration is flat CCS where I don't think we can
> easily
> fall back to memcpy for userspace objects. Maybe we can make this
> fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> TODO?

Ugh. Is that true for both clearing and copying, or is it only copying?

Problem is if we hit an engine reset and fence error during initial
clearing / swapin, the plan moving forward is to intercept that and
resort to cpu clearing / copying for security reasons. In the worst
case we at least need to be able to clear.

/Thomas


> 
> > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > >ttm) :
> > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > &dst_reg->iomap,
> > +                                                dst_st, dst_reg-
> > >region.start);
> > +
> > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > >ttm) :
> > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > &src_reg->iomap,
> > +                                                obj-
> > >ttm.cached_io_st,
> > +                                                src_reg-
> > >region.start);
> > +
> > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > src_iter);
> > +       }
> > +}
> > +
> > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > +                        struct ttm_operation_ctx *ctx,
> > +                        struct ttm_resource *dst_mem,
> > +                        struct ttm_place *hop)
> > +{
> > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > +       struct ttm_resource_manager *dst_man =
> > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > +       struct ttm_tt *ttm = bo->ttm;
> > +       struct sg_table *dst_st;
> > +       bool clear;
> > +       int ret;
> > +
> >         /* Sync for now. We could do the actual copy async. */
> >         ret = ttm_bo_wait_ctx(bo, ctx);
> >         if (ret)
> > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > ttm_buffer_object *bo, bool evict,
> >         }
> > 
> >         /* Populate ttm with pages if needed. Typically system
> > memory. */
> > -       if (bo->ttm && (dst_man->use_tt ||
> > -                       (bo->ttm->page_flags &
> > TTM_PAGE_FLAG_SWAPPED))) {
> > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > TTM_PAGE_FLAG_SWAPPED))) {
> > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> >                 if (ret)
> >                         return ret;
> >         }
> > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > ttm_buffer_object *bo, bool evict,
> >         if (IS_ERR(dst_st))
> >                 return PTR_ERR(dst_st);
> > 
> > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > -       if (ret) {
> > -               /* If we start mapping GGTT, we can no longer use
> > man::use_tt here. */
> > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > >ttm) :
> > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > &dst_reg->iomap,
> > -                                                dst_st, dst_reg-
> > >region.start);
> > -
> > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > >ttm) :
> > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > &src_reg->iomap,
> > -                                                obj-
> > >ttm.cached_io_st,
> > -                                                src_reg-
> > >region.start);
> > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > !ttm_tt_is_populated(ttm));
> > +       if (!(clear && ttm && !(ttm->page_flags &
> > TTM_PAGE_FLAG_ZERO_ALLOC)))
> 
> Seems quite hard to read?
> 
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> 
> 
> > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > 
> > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > src_iter);
> > -       }
> > -       /* Below dst_mem becomes bo->resource. */
> >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> >         i915_ttm_adjust_domains_after_move(obj);
> >         i915_ttm_free_cached_io_st(obj);
> > --
> > 2.31.1
> > 



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
@ 2021-06-30 15:27       ` Thomas Hellström
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Hellström @ 2021-06-30 15:27 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> <thomas.hellstrom@linux.intel.com> wrote:
> > 
> > In order to make the code a bit more readable and to facilitate
> > async memcpy moves, reorganize the move code a little. Determine
> > at an early stage whether to copy or to clear.
> > 
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > ----
> >  1 file changed, 40 insertions(+), 30 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > index c39d982c4fa6..4e529adcdfc7 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > drm_i915_gem_object *obj,
> >  }
> > 
> >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > +                              bool clear,
> >                                struct ttm_resource *dst_mem,
> >                                struct sg_table *dst_st)
> >  {
> > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > ttm_buffer_object *bo,
> >                 return -EINVAL;
> > 
> >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > +       if (clear) {
> >                 if (bo->type == ttm_bo_type_kernel)
> >                         return -EINVAL;
> 
> Was that meant to be:
> return 0:
> 
> ?
> 
> Also does that mean we are incorrectly falling back to memset, for
> non-userspace objects, instead of making it a noop?

No, we're deliberately falling back to memset for non-userspace
objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
everything is implemented correctly.

> 
> > 
> > -               if (ttm && !(ttm->page_flags &
> > TTM_PAGE_FLAG_ZERO_ALLOC))
> > -                       return 0;
> > -
> >                 intel_engine_pm_get(i915->gt.migrate.context-
> > >engine);
> >                 ret = intel_context_migrate_clear(i915-
> > >gt.migrate.context, NULL,
> >                                                   dst_st->sgl,
> > dst_level,
> > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > ttm_buffer_object *bo,
> >         return ret;
> >  }
> > 
> > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > -                        struct ttm_operation_ctx *ctx,
> > -                        struct ttm_resource *dst_mem,
> > -                        struct ttm_place *hop)
> > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > clear,
> > +                           struct ttm_resource *dst_mem,
> > +                           struct sg_table *dst_st)
> >  {
> >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > -       struct ttm_resource_manager *dst_man =
> > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> >         struct intel_memory_region *dst_reg, *src_reg;
> >         union {
> >                 struct ttm_kmap_iter_tt tt;
> >                 struct ttm_kmap_iter_iomap io;
> >         } _dst_iter, _src_iter;
> >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > -       struct sg_table *dst_st;
> >         int ret;
> > 
> >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > >mem_type);
> >         GEM_BUG_ON(!dst_reg || !src_reg);
> > 
> > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > +       if (ret) {
> 
> One future consideration is flat CCS where I don't think we can
> easily
> fall back to memcpy for userspace objects. Maybe we can make this
> fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> TODO?

Ugh. Is that true for both clearing and copying, or is it only copying?

Problem is if we hit an engine reset and fence error during initial
clearing / swapin, the plan moving forward is to intercept that and
resort to cpu clearing / copying for security reasons. In the worst
case we at least need to be able to clear.

/Thomas


> 
> > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > >ttm) :
> > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > &dst_reg->iomap,
> > +                                                dst_st, dst_reg-
> > >region.start);
> > +
> > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > >ttm) :
> > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > &src_reg->iomap,
> > +                                                obj-
> > >ttm.cached_io_st,
> > +                                                src_reg-
> > >region.start);
> > +
> > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > src_iter);
> > +       }
> > +}
> > +
> > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > +                        struct ttm_operation_ctx *ctx,
> > +                        struct ttm_resource *dst_mem,
> > +                        struct ttm_place *hop)
> > +{
> > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > +       struct ttm_resource_manager *dst_man =
> > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > +       struct ttm_tt *ttm = bo->ttm;
> > +       struct sg_table *dst_st;
> > +       bool clear;
> > +       int ret;
> > +
> >         /* Sync for now. We could do the actual copy async. */
> >         ret = ttm_bo_wait_ctx(bo, ctx);
> >         if (ret)
> > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > ttm_buffer_object *bo, bool evict,
> >         }
> > 
> >         /* Populate ttm with pages if needed. Typically system
> > memory. */
> > -       if (bo->ttm && (dst_man->use_tt ||
> > -                       (bo->ttm->page_flags &
> > TTM_PAGE_FLAG_SWAPPED))) {
> > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > TTM_PAGE_FLAG_SWAPPED))) {
> > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> >                 if (ret)
> >                         return ret;
> >         }
> > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > ttm_buffer_object *bo, bool evict,
> >         if (IS_ERR(dst_st))
> >                 return PTR_ERR(dst_st);
> > 
> > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > -       if (ret) {
> > -               /* If we start mapping GGTT, we can no longer use
> > man::use_tt here. */
> > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > >ttm) :
> > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > &dst_reg->iomap,
> > -                                                dst_st, dst_reg-
> > >region.start);
> > -
> > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > >ttm) :
> > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > &src_reg->iomap,
> > -                                                obj-
> > >ttm.cached_io_st,
> > -                                                src_reg-
> > >region.start);
> > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > !ttm_tt_is_populated(ttm));
> > +       if (!(clear && ttm && !(ttm->page_flags &
> > TTM_PAGE_FLAG_ZERO_ALLOC)))
> 
> Seems quite hard to read?
> 
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> 
> 
> > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > 
> > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > src_iter);
> > -       }
> > -       /* Below dst_mem becomes bo->resource. */
> >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> >         i915_ttm_adjust_domains_after_move(obj);
> >         i915_ttm_free_cached_io_st(obj);
> > --
> > 2.31.1
> > 


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
  2021-06-30 15:27       ` [Intel-gfx] " Thomas Hellström
@ 2021-06-30 16:54         ` Matthew Auld
  -1 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 16:54 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Wed, 30 Jun 2021 at 16:27, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> > On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> > <thomas.hellstrom@linux.intel.com> wrote:
> > >
> > > In order to make the code a bit more readable and to facilitate
> > > async memcpy moves, reorganize the move code a little. Determine
> > > at an early stage whether to copy or to clear.
> > >
> > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > > ----
> > >  1 file changed, 40 insertions(+), 30 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > index c39d982c4fa6..4e529adcdfc7 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > > drm_i915_gem_object *obj,
> > >  }
> > >
> > >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > > +                              bool clear,
> > >                                struct ttm_resource *dst_mem,
> > >                                struct sg_table *dst_st)
> > >  {
> > > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > > ttm_buffer_object *bo,
> > >                 return -EINVAL;
> > >
> > >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > > +       if (clear) {
> > >                 if (bo->type == ttm_bo_type_kernel)
> > >                         return -EINVAL;
> >
> > Was that meant to be:
> > return 0:
> >
> > ?
> >
> > Also does that mean we are incorrectly falling back to memset, for
> > non-userspace objects, instead of making it a noop?
>
> No, we're deliberately falling back to memset for non-userspace
> objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
> everything is implemented correctly.
>
> >
> > >
> > > -               if (ttm && !(ttm->page_flags &
> > > TTM_PAGE_FLAG_ZERO_ALLOC))
> > > -                       return 0;
> > > -
> > >                 intel_engine_pm_get(i915->gt.migrate.context-
> > > >engine);
> > >                 ret = intel_context_migrate_clear(i915-
> > > >gt.migrate.context, NULL,
> > >                                                   dst_st->sgl,
> > > dst_level,
> > > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > > ttm_buffer_object *bo,
> > >         return ret;
> > >  }
> > >
> > > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > -                        struct ttm_operation_ctx *ctx,
> > > -                        struct ttm_resource *dst_mem,
> > > -                        struct ttm_place *hop)
> > > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > > clear,
> > > +                           struct ttm_resource *dst_mem,
> > > +                           struct sg_table *dst_st)
> > >  {
> > >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > -       struct ttm_resource_manager *dst_man =
> > > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > >         struct intel_memory_region *dst_reg, *src_reg;
> > >         union {
> > >                 struct ttm_kmap_iter_tt tt;
> > >                 struct ttm_kmap_iter_iomap io;
> > >         } _dst_iter, _src_iter;
> > >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > > -       struct sg_table *dst_st;
> > >         int ret;
> > >
> > >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> > >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > > >mem_type);
> > >         GEM_BUG_ON(!dst_reg || !src_reg);
> > >
> > > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > > +       if (ret) {
> >
> > One future consideration is flat CCS where I don't think we can
> > easily
> > fall back to memcpy for userspace objects. Maybe we can make this
> > fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> > TODO?
>
> Ugh. Is that true for both clearing and copying, or is it only copying?

With clearing I think we are required to nuke the aux CCS state using
some special blitter command.

For copying/moving I think it's a similar story, where special care
might be needed for the aux state, which likely requires the blitter.
Although tbh I don't really remember all the details.

>
> Problem is if we hit an engine reset and fence error during initial
> clearing / swapin, the plan moving forward is to intercept that and
> resort to cpu clearing / copying for security reasons. In the worst
> case we at least need to be able to clear.
>
> /Thomas
>
>
> >
> > > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > >ttm) :
> > > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > &dst_reg->iomap,
> > > +                                                dst_st, dst_reg-
> > > >region.start);
> > > +
> > > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > >ttm) :
> > > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > &src_reg->iomap,
> > > +                                                obj-
> > > >ttm.cached_io_st,
> > > +                                                src_reg-
> > > >region.start);
> > > +
> > > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > src_iter);
> > > +       }
> > > +}
> > > +
> > > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > +                        struct ttm_operation_ctx *ctx,
> > > +                        struct ttm_resource *dst_mem,
> > > +                        struct ttm_place *hop)
> > > +{
> > > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > +       struct ttm_resource_manager *dst_man =
> > > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > +       struct ttm_tt *ttm = bo->ttm;
> > > +       struct sg_table *dst_st;
> > > +       bool clear;
> > > +       int ret;
> > > +
> > >         /* Sync for now. We could do the actual copy async. */
> > >         ret = ttm_bo_wait_ctx(bo, ctx);
> > >         if (ret)
> > > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > > ttm_buffer_object *bo, bool evict,
> > >         }
> > >
> > >         /* Populate ttm with pages if needed. Typically system
> > > memory. */
> > > -       if (bo->ttm && (dst_man->use_tt ||
> > > -                       (bo->ttm->page_flags &
> > > TTM_PAGE_FLAG_SWAPPED))) {
> > > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > > TTM_PAGE_FLAG_SWAPPED))) {
> > > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> > >                 if (ret)
> > >                         return ret;
> > >         }
> > > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > > ttm_buffer_object *bo, bool evict,
> > >         if (IS_ERR(dst_st))
> > >                 return PTR_ERR(dst_st);
> > >
> > > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > > -       if (ret) {
> > > -               /* If we start mapping GGTT, we can no longer use
> > > man::use_tt here. */
> > > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > >ttm) :
> > > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > &dst_reg->iomap,
> > > -                                                dst_st, dst_reg-
> > > >region.start);
> > > -
> > > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > >ttm) :
> > > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > &src_reg->iomap,
> > > -                                                obj-
> > > >ttm.cached_io_st,
> > > -                                                src_reg-
> > > >region.start);
> > > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > > !ttm_tt_is_populated(ttm));
> > > +       if (!(clear && ttm && !(ttm->page_flags &
> > > TTM_PAGE_FLAG_ZERO_ALLOC)))
> >
> > Seems quite hard to read?
> >
> > Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> >
> >
> > > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > >
> > > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > src_iter);
> > > -       }
> > > -       /* Below dst_mem becomes bo->resource. */
> > >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> > >         i915_ttm_adjust_domains_after_move(obj);
> > >         i915_ttm_free_cached_io_st(obj);
> > > --
> > > 2.31.1
> > >
>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
@ 2021-06-30 16:54         ` Matthew Auld
  0 siblings, 0 replies; 24+ messages in thread
From: Matthew Auld @ 2021-06-30 16:54 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Wed, 30 Jun 2021 at 16:27, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> > On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> > <thomas.hellstrom@linux.intel.com> wrote:
> > >
> > > In order to make the code a bit more readable and to facilitate
> > > async memcpy moves, reorganize the move code a little. Determine
> > > at an early stage whether to copy or to clear.
> > >
> > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > > ----
> > >  1 file changed, 40 insertions(+), 30 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > index c39d982c4fa6..4e529adcdfc7 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > > drm_i915_gem_object *obj,
> > >  }
> > >
> > >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > > +                              bool clear,
> > >                                struct ttm_resource *dst_mem,
> > >                                struct sg_table *dst_st)
> > >  {
> > > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > > ttm_buffer_object *bo,
> > >                 return -EINVAL;
> > >
> > >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > > +       if (clear) {
> > >                 if (bo->type == ttm_bo_type_kernel)
> > >                         return -EINVAL;
> >
> > Was that meant to be:
> > return 0:
> >
> > ?
> >
> > Also does that mean we are incorrectly falling back to memset, for
> > non-userspace objects, instead of making it a noop?
>
> No, we're deliberately falling back to memset for non-userspace
> objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
> everything is implemented correctly.
>
> >
> > >
> > > -               if (ttm && !(ttm->page_flags &
> > > TTM_PAGE_FLAG_ZERO_ALLOC))
> > > -                       return 0;
> > > -
> > >                 intel_engine_pm_get(i915->gt.migrate.context-
> > > >engine);
> > >                 ret = intel_context_migrate_clear(i915-
> > > >gt.migrate.context, NULL,
> > >                                                   dst_st->sgl,
> > > dst_level,
> > > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > > ttm_buffer_object *bo,
> > >         return ret;
> > >  }
> > >
> > > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > -                        struct ttm_operation_ctx *ctx,
> > > -                        struct ttm_resource *dst_mem,
> > > -                        struct ttm_place *hop)
> > > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > > clear,
> > > +                           struct ttm_resource *dst_mem,
> > > +                           struct sg_table *dst_st)
> > >  {
> > >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > -       struct ttm_resource_manager *dst_man =
> > > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > >         struct intel_memory_region *dst_reg, *src_reg;
> > >         union {
> > >                 struct ttm_kmap_iter_tt tt;
> > >                 struct ttm_kmap_iter_iomap io;
> > >         } _dst_iter, _src_iter;
> > >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > > -       struct sg_table *dst_st;
> > >         int ret;
> > >
> > >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> > >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > > >mem_type);
> > >         GEM_BUG_ON(!dst_reg || !src_reg);
> > >
> > > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > > +       if (ret) {
> >
> > One future consideration is flat CCS where I don't think we can
> > easily
> > fall back to memcpy for userspace objects. Maybe we can make this
> > fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> > TODO?
>
> Ugh. Is that true for both clearing and copying, or is it only copying?

With clearing I think we are required to nuke the aux CCS state using
some special blitter command.

For copying/moving I think it's a similar story, where special care
might be needed for the aux state, which likely requires the blitter.
Although tbh I don't really remember all the details.

>
> Problem is if we hit an engine reset and fence error during initial
> clearing / swapin, the plan moving forward is to intercept that and
> resort to cpu clearing / copying for security reasons. In the worst
> case we at least need to be able to clear.
>
> /Thomas
>
>
> >
> > > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > >ttm) :
> > > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > &dst_reg->iomap,
> > > +                                                dst_st, dst_reg-
> > > >region.start);
> > > +
> > > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > >ttm) :
> > > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > &src_reg->iomap,
> > > +                                                obj-
> > > >ttm.cached_io_st,
> > > +                                                src_reg-
> > > >region.start);
> > > +
> > > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > src_iter);
> > > +       }
> > > +}
> > > +
> > > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > +                        struct ttm_operation_ctx *ctx,
> > > +                        struct ttm_resource *dst_mem,
> > > +                        struct ttm_place *hop)
> > > +{
> > > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > +       struct ttm_resource_manager *dst_man =
> > > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > +       struct ttm_tt *ttm = bo->ttm;
> > > +       struct sg_table *dst_st;
> > > +       bool clear;
> > > +       int ret;
> > > +
> > >         /* Sync for now. We could do the actual copy async. */
> > >         ret = ttm_bo_wait_ctx(bo, ctx);
> > >         if (ret)
> > > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > > ttm_buffer_object *bo, bool evict,
> > >         }
> > >
> > >         /* Populate ttm with pages if needed. Typically system
> > > memory. */
> > > -       if (bo->ttm && (dst_man->use_tt ||
> > > -                       (bo->ttm->page_flags &
> > > TTM_PAGE_FLAG_SWAPPED))) {
> > > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > > TTM_PAGE_FLAG_SWAPPED))) {
> > > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> > >                 if (ret)
> > >                         return ret;
> > >         }
> > > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > > ttm_buffer_object *bo, bool evict,
> > >         if (IS_ERR(dst_st))
> > >                 return PTR_ERR(dst_st);
> > >
> > > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > > -       if (ret) {
> > > -               /* If we start mapping GGTT, we can no longer use
> > > man::use_tt here. */
> > > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > >ttm) :
> > > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > &dst_reg->iomap,
> > > -                                                dst_st, dst_reg-
> > > >region.start);
> > > -
> > > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > >ttm) :
> > > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > &src_reg->iomap,
> > > -                                                obj-
> > > >ttm.cached_io_st,
> > > -                                                src_reg-
> > > >region.start);
> > > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > > !ttm_tt_is_populated(ttm));
> > > +       if (!(clear && ttm && !(ttm->page_flags &
> > > TTM_PAGE_FLAG_ZERO_ALLOC)))
> >
> > Seems quite hard to read?
> >
> > Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> >
> >
> > > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > >
> > > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > src_iter);
> > > -       }
> > > -       /* Below dst_mem becomes bo->resource. */
> > >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> > >         i915_ttm_adjust_domains_after_move(obj);
> > >         i915_ttm_free_cached_io_st(obj);
> > > --
> > > 2.31.1
> > >
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
  2021-06-30 16:54         ` [Intel-gfx] " Matthew Auld
@ 2021-06-30 17:00           ` Daniel Vetter
  -1 siblings, 0 replies; 24+ messages in thread
From: Daniel Vetter @ 2021-06-30 17:00 UTC (permalink / raw)
  To: Matthew Auld
  Cc: Thomas Hellström, Intel Graphics Development, Matthew Auld,
	ML dri-devel

On Wed, Jun 30, 2021 at 6:54 PM Matthew Auld
<matthew.william.auld@gmail.com> wrote:
>
> On Wed, 30 Jun 2021 at 16:27, Thomas Hellström
> <thomas.hellstrom@linux.intel.com> wrote:
> >
> > On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> > > On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> > > <thomas.hellstrom@linux.intel.com> wrote:
> > > >
> > > > In order to make the code a bit more readable and to facilitate
> > > > async memcpy moves, reorganize the move code a little. Determine
> > > > at an early stage whether to copy or to clear.
> > > >
> > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > > > ----
> > > >  1 file changed, 40 insertions(+), 30 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > index c39d982c4fa6..4e529adcdfc7 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > > > drm_i915_gem_object *obj,
> > > >  }
> > > >
> > > >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > > > +                              bool clear,
> > > >                                struct ttm_resource *dst_mem,
> > > >                                struct sg_table *dst_st)
> > > >  {
> > > > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > > > ttm_buffer_object *bo,
> > > >                 return -EINVAL;
> > > >
> > > >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > > > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > > > +       if (clear) {
> > > >                 if (bo->type == ttm_bo_type_kernel)
> > > >                         return -EINVAL;
> > >
> > > Was that meant to be:
> > > return 0:
> > >
> > > ?
> > >
> > > Also does that mean we are incorrectly falling back to memset, for
> > > non-userspace objects, instead of making it a noop?
> >
> > No, we're deliberately falling back to memset for non-userspace
> > objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
> > everything is implemented correctly.
> >
> > >
> > > >
> > > > -               if (ttm && !(ttm->page_flags &
> > > > TTM_PAGE_FLAG_ZERO_ALLOC))
> > > > -                       return 0;
> > > > -
> > > >                 intel_engine_pm_get(i915->gt.migrate.context-
> > > > >engine);
> > > >                 ret = intel_context_migrate_clear(i915-
> > > > >gt.migrate.context, NULL,
> > > >                                                   dst_st->sgl,
> > > > dst_level,
> > > > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > > > ttm_buffer_object *bo,
> > > >         return ret;
> > > >  }
> > > >
> > > > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > > -                        struct ttm_operation_ctx *ctx,
> > > > -                        struct ttm_resource *dst_mem,
> > > > -                        struct ttm_place *hop)
> > > > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > > > clear,
> > > > +                           struct ttm_resource *dst_mem,
> > > > +                           struct sg_table *dst_st)
> > > >  {
> > > >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > > -       struct ttm_resource_manager *dst_man =
> > > > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > >         struct intel_memory_region *dst_reg, *src_reg;
> > > >         union {
> > > >                 struct ttm_kmap_iter_tt tt;
> > > >                 struct ttm_kmap_iter_iomap io;
> > > >         } _dst_iter, _src_iter;
> > > >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > > > -       struct sg_table *dst_st;
> > > >         int ret;
> > > >
> > > >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> > > >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > > > >mem_type);
> > > >         GEM_BUG_ON(!dst_reg || !src_reg);
> > > >
> > > > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > > > +       if (ret) {
> > >
> > > One future consideration is flat CCS where I don't think we can
> > > easily
> > > fall back to memcpy for userspace objects. Maybe we can make this
> > > fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> > > TODO?
> >
> > Ugh. Is that true for both clearing and copying, or is it only copying?
>
> With clearing I think we are required to nuke the aux CCS state using
> some special blitter command.
>
> For copying/moving I think it's a similar story, where special care
> might be needed for the aux state, which likely requires the blitter.
> Although tbh I don't really remember all the details.

There's more than just flat CCS, for dg2 we'll also support resizeable
BAR with the goal to make the non-mappable lmem available too. Afaik
there's no fallback way to access that memory without a copy engine.

I think on those platforms we simply have to go back to wedging the
driver if reset of the copy engine fails and one our kernel context
was impacted. Nothing really we can do much there. On the big server
gpus we'll have a dedicated copyengine for the kernel reserved, so
pretty unlikely that dies, but on DG2 there's only one.
-Daniel

> > Problem is if we hit an engine reset and fence error during initial
> > clearing / swapin, the plan moving forward is to intercept that and
> > resort to cpu clearing / copying for security reasons. In the worst
> > case we at least need to be able to clear.
> >
> > /Thomas
> >
> >
> > >
> > > > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > > >ttm) :
> > > > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > > &dst_reg->iomap,
> > > > +                                                dst_st, dst_reg-
> > > > >region.start);
> > > > +
> > > > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > > >ttm) :
> > > > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > > &src_reg->iomap,
> > > > +                                                obj-
> > > > >ttm.cached_io_st,
> > > > +                                                src_reg-
> > > > >region.start);
> > > > +
> > > > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > > src_iter);
> > > > +       }
> > > > +}
> > > > +
> > > > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > > +                        struct ttm_operation_ctx *ctx,
> > > > +                        struct ttm_resource *dst_mem,
> > > > +                        struct ttm_place *hop)
> > > > +{
> > > > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > > +       struct ttm_resource_manager *dst_man =
> > > > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > > +       struct ttm_tt *ttm = bo->ttm;
> > > > +       struct sg_table *dst_st;
> > > > +       bool clear;
> > > > +       int ret;
> > > > +
> > > >         /* Sync for now. We could do the actual copy async. */
> > > >         ret = ttm_bo_wait_ctx(bo, ctx);
> > > >         if (ret)
> > > > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > > > ttm_buffer_object *bo, bool evict,
> > > >         }
> > > >
> > > >         /* Populate ttm with pages if needed. Typically system
> > > > memory. */
> > > > -       if (bo->ttm && (dst_man->use_tt ||
> > > > -                       (bo->ttm->page_flags &
> > > > TTM_PAGE_FLAG_SWAPPED))) {
> > > > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > > > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > > > TTM_PAGE_FLAG_SWAPPED))) {
> > > > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> > > >                 if (ret)
> > > >                         return ret;
> > > >         }
> > > > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > > > ttm_buffer_object *bo, bool evict,
> > > >         if (IS_ERR(dst_st))
> > > >                 return PTR_ERR(dst_st);
> > > >
> > > > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > > > -       if (ret) {
> > > > -               /* If we start mapping GGTT, we can no longer use
> > > > man::use_tt here. */
> > > > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > > >ttm) :
> > > > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > > &dst_reg->iomap,
> > > > -                                                dst_st, dst_reg-
> > > > >region.start);
> > > > -
> > > > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > > >ttm) :
> > > > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > > &src_reg->iomap,
> > > > -                                                obj-
> > > > >ttm.cached_io_st,
> > > > -                                                src_reg-
> > > > >region.start);
> > > > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > > > !ttm_tt_is_populated(ttm));
> > > > +       if (!(clear && ttm && !(ttm->page_flags &
> > > > TTM_PAGE_FLAG_ZERO_ALLOC)))
> > >
> > > Seems quite hard to read?
> > >
> > > Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> > >
> > >
> > > > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > > >
> > > > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > > src_iter);
> > > > -       }
> > > > -       /* Below dst_mem becomes bo->resource. */
> > > >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> > > >         i915_ttm_adjust_domains_after_move(obj);
> > > >         i915_ttm_free_cached_io_st(obj);
> > > > --
> > > > 2.31.1
> > > >
> >
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat
@ 2021-06-30 17:00           ` Daniel Vetter
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Vetter @ 2021-06-30 17:00 UTC (permalink / raw)
  To: Matthew Auld
  Cc: Thomas Hellström, Intel Graphics Development, Matthew Auld,
	ML dri-devel

On Wed, Jun 30, 2021 at 6:54 PM Matthew Auld
<matthew.william.auld@gmail.com> wrote:
>
> On Wed, 30 Jun 2021 at 16:27, Thomas Hellström
> <thomas.hellstrom@linux.intel.com> wrote:
> >
> > On Wed, 2021-06-30 at 15:19 +0100, Matthew Auld wrote:
> > > On Thu, 24 Jun 2021 at 20:31, Thomas Hellström
> > > <thomas.hellstrom@linux.intel.com> wrote:
> > > >
> > > > In order to make the code a bit more readable and to facilitate
> > > > async memcpy moves, reorganize the move code a little. Determine
> > > > at an early stage whether to copy or to clear.
> > > >
> > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 70 ++++++++++++++-------
> > > > ----
> > > >  1 file changed, 40 insertions(+), 30 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > index c39d982c4fa6..4e529adcdfc7 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > @@ -431,6 +431,7 @@ i915_ttm_resource_get_st(struct
> > > > drm_i915_gem_object *obj,
> > > >  }
> > > >
> > > >  static int i915_ttm_accel_move(struct ttm_buffer_object *bo,
> > > > +                              bool clear,
> > > >                                struct ttm_resource *dst_mem,
> > > >                                struct sg_table *dst_st)
> > > >  {
> > > > @@ -449,13 +450,10 @@ static int i915_ttm_accel_move(struct
> > > > ttm_buffer_object *bo,
> > > >                 return -EINVAL;
> > > >
> > > >         dst_level = i915_ttm_cache_level(i915, dst_mem, ttm);
> > > > -       if (!ttm || !ttm_tt_is_populated(ttm)) {
> > > > +       if (clear) {
> > > >                 if (bo->type == ttm_bo_type_kernel)
> > > >                         return -EINVAL;
> > >
> > > Was that meant to be:
> > > return 0:
> > >
> > > ?
> > >
> > > Also does that mean we are incorrectly falling back to memset, for
> > > non-userspace objects, instead of making it a noop?
> >
> > No, we're deliberately falling back to memset for non-userspace
> > objects, but the logic only memsets in the BO_ALLOC_CPU_CLEAR case if
> > everything is implemented correctly.
> >
> > >
> > > >
> > > > -               if (ttm && !(ttm->page_flags &
> > > > TTM_PAGE_FLAG_ZERO_ALLOC))
> > > > -                       return 0;
> > > > -
> > > >                 intel_engine_pm_get(i915->gt.migrate.context-
> > > > >engine);
> > > >                 ret = intel_context_migrate_clear(i915-
> > > > >gt.migrate.context, NULL,
> > > >                                                   dst_st->sgl,
> > > > dst_level,
> > > > @@ -489,27 +487,53 @@ static int i915_ttm_accel_move(struct
> > > > ttm_buffer_object *bo,
> > > >         return ret;
> > > >  }
> > > >
> > > > -static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > > -                        struct ttm_operation_ctx *ctx,
> > > > -                        struct ttm_resource *dst_mem,
> > > > -                        struct ttm_place *hop)
> > > > +static void __i915_ttm_move(struct ttm_buffer_object *bo, bool
> > > > clear,
> > > > +                           struct ttm_resource *dst_mem,
> > > > +                           struct sg_table *dst_st)
> > > >  {
> > > >         struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > > -       struct ttm_resource_manager *dst_man =
> > > > -               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > >         struct intel_memory_region *dst_reg, *src_reg;
> > > >         union {
> > > >                 struct ttm_kmap_iter_tt tt;
> > > >                 struct ttm_kmap_iter_iomap io;
> > > >         } _dst_iter, _src_iter;
> > > >         struct ttm_kmap_iter *dst_iter, *src_iter;
> > > > -       struct sg_table *dst_st;
> > > >         int ret;
> > > >
> > > >         dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type);
> > > >         src_reg = i915_ttm_region(bo->bdev, bo->resource-
> > > > >mem_type);
> > > >         GEM_BUG_ON(!dst_reg || !src_reg);
> > > >
> > > > +       ret = i915_ttm_accel_move(bo, clear, dst_mem, dst_st);
> > > > +       if (ret) {
> > >
> > > One future consideration is flat CCS where I don't think we can
> > > easily
> > > fall back to memcpy for userspace objects. Maybe we can make this
> > > fallback conditional on DG1 or !ALLOC_USER for now, or just add a
> > > TODO?
> >
> > Ugh. Is that true for both clearing and copying, or is it only copying?
>
> With clearing I think we are required to nuke the aux CCS state using
> some special blitter command.
>
> For copying/moving I think it's a similar story, where special care
> might be needed for the aux state, which likely requires the blitter.
> Although tbh I don't really remember all the details.

There's more than just flat CCS, for dg2 we'll also support resizeable
BAR with the goal to make the non-mappable lmem available too. Afaik
there's no fallback way to access that memory without a copy engine.

I think on those platforms we simply have to go back to wedging the
driver if reset of the copy engine fails and one our kernel context
was impacted. Nothing really we can do much there. On the big server
gpus we'll have a dedicated copyengine for the kernel reserved, so
pretty unlikely that dies, but on DG2 there's only one.
-Daniel

> > Problem is if we hit an engine reset and fence error during initial
> > clearing / swapin, the plan moving forward is to intercept that and
> > resort to cpu clearing / copying for security reasons. In the worst
> > case we at least need to be able to clear.
> >
> > /Thomas
> >
> >
> > >
> > > > +               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > > +                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > > >ttm) :
> > > > +                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > > &dst_reg->iomap,
> > > > +                                                dst_st, dst_reg-
> > > > >region.start);
> > > > +
> > > > +               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > > +                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > > >ttm) :
> > > > +                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > > &src_reg->iomap,
> > > > +                                                obj-
> > > > >ttm.cached_io_st,
> > > > +                                                src_reg-
> > > > >region.start);
> > > > +
> > > > +               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > > src_iter);
> > > > +       }
> > > > +}
> > > > +
> > > > +static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
> > > > +                        struct ttm_operation_ctx *ctx,
> > > > +                        struct ttm_resource *dst_mem,
> > > > +                        struct ttm_place *hop)
> > > > +{
> > > > +       struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
> > > > +       struct ttm_resource_manager *dst_man =
> > > > +               ttm_manager_type(bo->bdev, dst_mem->mem_type);
> > > > +       struct ttm_tt *ttm = bo->ttm;
> > > > +       struct sg_table *dst_st;
> > > > +       bool clear;
> > > > +       int ret;
> > > > +
> > > >         /* Sync for now. We could do the actual copy async. */
> > > >         ret = ttm_bo_wait_ctx(bo, ctx);
> > > >         if (ret)
> > > > @@ -526,9 +550,8 @@ static int i915_ttm_move(struct
> > > > ttm_buffer_object *bo, bool evict,
> > > >         }
> > > >
> > > >         /* Populate ttm with pages if needed. Typically system
> > > > memory. */
> > > > -       if (bo->ttm && (dst_man->use_tt ||
> > > > -                       (bo->ttm->page_flags &
> > > > TTM_PAGE_FLAG_SWAPPED))) {
> > > > -               ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
> > > > +       if (ttm && (dst_man->use_tt || (ttm->page_flags &
> > > > TTM_PAGE_FLAG_SWAPPED))) {
> > > > +               ret = ttm_tt_populate(bo->bdev, ttm, ctx);
> > > >                 if (ret)
> > > >                         return ret;
> > > >         }
> > > > @@ -537,23 +560,10 @@ static int i915_ttm_move(struct
> > > > ttm_buffer_object *bo, bool evict,
> > > >         if (IS_ERR(dst_st))
> > > >                 return PTR_ERR(dst_st);
> > > >
> > > > -       ret = i915_ttm_accel_move(bo, dst_mem, dst_st);
> > > > -       if (ret) {
> > > > -               /* If we start mapping GGTT, we can no longer use
> > > > man::use_tt here. */
> > > > -               dst_iter = !cpu_maps_iomem(dst_mem) ?
> > > > -                       ttm_kmap_iter_tt_init(&_dst_iter.tt, bo-
> > > > >ttm) :
> > > > -                       ttm_kmap_iter_iomap_init(&_dst_iter.io,
> > > > &dst_reg->iomap,
> > > > -                                                dst_st, dst_reg-
> > > > >region.start);
> > > > -
> > > > -               src_iter = !cpu_maps_iomem(bo->resource) ?
> > > > -                       ttm_kmap_iter_tt_init(&_src_iter.tt, bo-
> > > > >ttm) :
> > > > -                       ttm_kmap_iter_iomap_init(&_src_iter.io,
> > > > &src_reg->iomap,
> > > > -                                                obj-
> > > > >ttm.cached_io_st,
> > > > -                                                src_reg-
> > > > >region.start);
> > > > +       clear = !cpu_maps_iomem(bo->resource) && (!ttm ||
> > > > !ttm_tt_is_populated(ttm));
> > > > +       if (!(clear && ttm && !(ttm->page_flags &
> > > > TTM_PAGE_FLAG_ZERO_ALLOC)))
> > >
> > > Seems quite hard to read?
> > >
> > > Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> > >
> > >
> > > > +               __i915_ttm_move(bo, clear, dst_mem, dst_st);
> > > >
> > > > -               ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter,
> > > > src_iter);
> > > > -       }
> > > > -       /* Below dst_mem becomes bo->resource. */
> > > >         ttm_bo_move_sync_cleanup(bo, dst_mem);
> > > >         i915_ttm_adjust_domains_after_move(obj);
> > > >         i915_ttm_free_cached_io_st(obj);
> > > > --
> > > > 2.31.1
> > > >
> >
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
  2021-06-28 11:21     ` [Intel-gfx] " Thomas Hellström
@ 2021-07-12 11:29       ` Christian König
  -1 siblings, 0 replies; 24+ messages in thread
From: Christian König @ 2021-07-12 11:29 UTC (permalink / raw)
  To: Thomas Hellström, intel-gfx, dri-devel; +Cc: matthew.auld



Am 28.06.21 um 13:21 schrieb Thomas Hellström:
>
> On 6/24/21 9:30 PM, Thomas Hellström wrote:
>> The buffer object argument to ttm_move_memcpy was only used to
>> determine whether the destination memory should be cleared only
>> or whether we should copy data. Replace it with a "clear" bool, and
>> update the callers.
>>
>> The intention here is to be able to use ttm_move_memcpy() async under
>> a dma-fence as a fallback if an accelerated blit fails in a security-
>> critical path where data might leak if the blit is not properly
>> performed. For that purpose the bo is an unsuitable argument since
>> its relevant members might already have changed at call time.
>>
>> Finally, update the ttm_move_memcpy kerneldoc that seems to have
>> ended up with a stale version.
>
> Hmm,
>
> Not sure where the Cc: Christian König ended up, but in any case 
> Christian if you find this patch ok, Ack to merge through 
> drm_intel_gt_next?

Please send out the patch once more.

Only nit picks, but I would re-order the parameters for example.

Regards,
Christian.

>
> /Thomas
>
>
>
>
>>
>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
>>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
>>   include/drm/ttm/ttm_bo_driver.h         |  2 +-
>>   3 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c 
>> b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> index 4e529adcdfc7..f19847abe856 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> @@ -517,7 +517,7 @@ static void __i915_ttm_move(struct 
>> ttm_buffer_object *bo, bool clear,
>>                            obj->ttm.cached_io_st,
>>                            src_reg->region.start);
>>   -        ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
>> +        ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>>       }
>>   }
>>   diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c 
>> b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> index 2f57f824e6db..e3747f069674 100644
>> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
>> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> @@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
>>     /**
>>    * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
>> - * @bo: The struct ttm_buffer_object.
>> - * @new_mem: The struct ttm_resource we're moving to (copy 
>> destination).
>> - * @new_iter: A struct ttm_kmap_iter representing the destination 
>> resource.
>> + * @clear: Whether to clear rather than copy.
>> + * @num_pages: Number of pages of the operation.
>> + * @dst_iter: A struct ttm_kmap_iter representing the destination 
>> resource.
>>    * @src_iter: A struct ttm_kmap_iter representing the source resource.
>>    *
>>    * This function is intended to be able to move out async under a
>>    * dma-fence if desired.
>>    */
>> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
>> +void ttm_move_memcpy(bool clear,
>>                u32 num_pages,
>>                struct ttm_kmap_iter *dst_iter,
>>                struct ttm_kmap_iter *src_iter)
>>   {
>>       const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
>>       const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
>> -    struct ttm_tt *ttm = bo->ttm;
>>       struct dma_buf_map src_map, dst_map;
>>       pgoff_t i;
>>   @@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
>>           return;
>>         /* Don't move nonexistent data. Clear destination instead. */
>> -    if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
>> -        if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
>> -            return;
>> -
>> +    if (clear) {
>>           for (i = 0; i < num_pages; ++i) {
>>               dst_ops->map_local(dst_iter, &dst_map, i);
>>               if (dst_map.is_iomem)
>> @@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>>           struct ttm_kmap_iter_linear_io io;
>>       } _dst_iter, _src_iter;
>>       struct ttm_kmap_iter *dst_iter, *src_iter;
>> +    bool clear;
>>       int ret = 0;
>>         if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
>> @@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object 
>> *bo,
>>           goto out_src_iter;
>>       }
>>   -    ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
>> +    clear = src_iter->ops->maps_tt && (!ttm || 
>> !ttm_tt_is_populated(ttm));
>> +    if (!(clear && ttm && !(ttm->page_flags & 
>> TTM_PAGE_FLAG_ZERO_ALLOC)))
>> +        ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>> +
>>       src_copy = *src_mem;
>>       ttm_bo_move_sync_cleanup(bo, dst_mem);
>>   diff --git a/include/drm/ttm/ttm_bo_driver.h 
>> b/include/drm/ttm/ttm_bo_driver.h
>> index 68d6069572aa..5f087575194b 100644
>> --- a/include/drm/ttm/ttm_bo_driver.h
>> +++ b/include/drm/ttm/ttm_bo_driver.h
>> @@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, 
>> struct ttm_resource *mem);
>>    */
>>   void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
>>   -void ttm_move_memcpy(struct ttm_buffer_object *bo,
>> +void ttm_move_memcpy(bool clear,
>>                u32 num_pages,
>>                struct ttm_kmap_iter *dst_iter,
>>                struct ttm_kmap_iter *src_iter);


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use
@ 2021-07-12 11:29       ` Christian König
  0 siblings, 0 replies; 24+ messages in thread
From: Christian König @ 2021-07-12 11:29 UTC (permalink / raw)
  To: Thomas Hellström, intel-gfx, dri-devel; +Cc: matthew.auld



Am 28.06.21 um 13:21 schrieb Thomas Hellström:
>
> On 6/24/21 9:30 PM, Thomas Hellström wrote:
>> The buffer object argument to ttm_move_memcpy was only used to
>> determine whether the destination memory should be cleared only
>> or whether we should copy data. Replace it with a "clear" bool, and
>> update the callers.
>>
>> The intention here is to be able to use ttm_move_memcpy() async under
>> a dma-fence as a fallback if an accelerated blit fails in a security-
>> critical path where data might leak if the blit is not properly
>> performed. For that purpose the bo is an unsuitable argument since
>> its relevant members might already have changed at call time.
>>
>> Finally, update the ttm_move_memcpy kerneldoc that seems to have
>> ended up with a stale version.
>
> Hmm,
>
> Not sure where the Cc: Christian König ended up, but in any case 
> Christian if you find this patch ok, Ack to merge through 
> drm_intel_gt_next?

Please send out the patch once more.

Only nit picks, but I would re-order the parameters for example.

Regards,
Christian.

>
> /Thomas
>
>
>
>
>>
>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c |  2 +-
>>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 20 ++++++++++----------
>>   include/drm/ttm/ttm_bo_driver.h         |  2 +-
>>   3 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c 
>> b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> index 4e529adcdfc7..f19847abe856 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> @@ -517,7 +517,7 @@ static void __i915_ttm_move(struct 
>> ttm_buffer_object *bo, bool clear,
>>                            obj->ttm.cached_io_st,
>>                            src_reg->region.start);
>>   -        ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
>> +        ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>>       }
>>   }
>>   diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c 
>> b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> index 2f57f824e6db..e3747f069674 100644
>> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
>> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> @@ -75,22 +75,21 @@ void ttm_mem_io_free(struct ttm_device *bdev,
>>     /**
>>    * ttm_move_memcpy - Helper to perform a memcpy ttm move operation.
>> - * @bo: The struct ttm_buffer_object.
>> - * @new_mem: The struct ttm_resource we're moving to (copy 
>> destination).
>> - * @new_iter: A struct ttm_kmap_iter representing the destination 
>> resource.
>> + * @clear: Whether to clear rather than copy.
>> + * @num_pages: Number of pages of the operation.
>> + * @dst_iter: A struct ttm_kmap_iter representing the destination 
>> resource.
>>    * @src_iter: A struct ttm_kmap_iter representing the source resource.
>>    *
>>    * This function is intended to be able to move out async under a
>>    * dma-fence if desired.
>>    */
>> -void ttm_move_memcpy(struct ttm_buffer_object *bo,
>> +void ttm_move_memcpy(bool clear,
>>                u32 num_pages,
>>                struct ttm_kmap_iter *dst_iter,
>>                struct ttm_kmap_iter *src_iter)
>>   {
>>       const struct ttm_kmap_iter_ops *dst_ops = dst_iter->ops;
>>       const struct ttm_kmap_iter_ops *src_ops = src_iter->ops;
>> -    struct ttm_tt *ttm = bo->ttm;
>>       struct dma_buf_map src_map, dst_map;
>>       pgoff_t i;
>>   @@ -99,10 +98,7 @@ void ttm_move_memcpy(struct ttm_buffer_object *bo,
>>           return;
>>         /* Don't move nonexistent data. Clear destination instead. */
>> -    if (src_ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm))) {
>> -        if (ttm && !(ttm->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC))
>> -            return;
>> -
>> +    if (clear) {
>>           for (i = 0; i < num_pages; ++i) {
>>               dst_ops->map_local(dst_iter, &dst_map, i);
>>               if (dst_map.is_iomem)
>> @@ -146,6 +142,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>>           struct ttm_kmap_iter_linear_io io;
>>       } _dst_iter, _src_iter;
>>       struct ttm_kmap_iter *dst_iter, *src_iter;
>> +    bool clear;
>>       int ret = 0;
>>         if (ttm && ((ttm->page_flags & TTM_PAGE_FLAG_SWAPPED) ||
>> @@ -169,7 +166,10 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object 
>> *bo,
>>           goto out_src_iter;
>>       }
>>   -    ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter);
>> +    clear = src_iter->ops->maps_tt && (!ttm || 
>> !ttm_tt_is_populated(ttm));
>> +    if (!(clear && ttm && !(ttm->page_flags & 
>> TTM_PAGE_FLAG_ZERO_ALLOC)))
>> +        ttm_move_memcpy(clear, dst_mem->num_pages, dst_iter, src_iter);
>> +
>>       src_copy = *src_mem;
>>       ttm_bo_move_sync_cleanup(bo, dst_mem);
>>   diff --git a/include/drm/ttm/ttm_bo_driver.h 
>> b/include/drm/ttm/ttm_bo_driver.h
>> index 68d6069572aa..5f087575194b 100644
>> --- a/include/drm/ttm/ttm_bo_driver.h
>> +++ b/include/drm/ttm/ttm_bo_driver.h
>> @@ -322,7 +322,7 @@ int ttm_bo_tt_bind(struct ttm_buffer_object *bo, 
>> struct ttm_resource *mem);
>>    */
>>   void ttm_bo_tt_destroy(struct ttm_buffer_object *bo);
>>   -void ttm_move_memcpy(struct ttm_buffer_object *bo,
>> +void ttm_move_memcpy(bool clear,
>>                u32 num_pages,
>>                struct ttm_kmap_iter *dst_iter,
>>                struct ttm_kmap_iter *src_iter);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-07-12 11:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 19:30 [PATCH 0/2] drm/i915, drm/ttm: Update the ttm_move_memcpy() interface Thomas Hellström
2021-06-24 19:30 ` [Intel-gfx] " Thomas Hellström
2021-06-24 19:30 ` [PATCH 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat Thomas Hellström
2021-06-24 19:30   ` [Intel-gfx] " Thomas Hellström
2021-06-30 14:19   ` Matthew Auld
2021-06-30 14:19     ` [Intel-gfx] " Matthew Auld
2021-06-30 15:27     ` Thomas Hellström
2021-06-30 15:27       ` [Intel-gfx] " Thomas Hellström
2021-06-30 16:54       ` Matthew Auld
2021-06-30 16:54         ` [Intel-gfx] " Matthew Auld
2021-06-30 17:00         ` Daniel Vetter
2021-06-30 17:00           ` Daniel Vetter
2021-06-24 19:30 ` [PATCH 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use Thomas Hellström
2021-06-24 19:30   ` [Intel-gfx] " Thomas Hellström
2021-06-28 11:21   ` Thomas Hellström
2021-06-28 11:21     ` [Intel-gfx] " Thomas Hellström
2021-07-12 11:29     ` Christian König
2021-07-12 11:29       ` [Intel-gfx] " Christian König
2021-06-30 14:43   ` Matthew Auld
2021-06-30 14:43     ` [Intel-gfx] " Matthew Auld
2021-06-24 23:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface Patchwork
2021-06-25  7:39 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-25 21:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915, drm/ttm: Update the ttm_move_memcpy() interface (rev2) Patchwork
2021-06-25 22:27 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.