All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/9] drm/i915/ttm: Evict and restore of compressed object
@ 2022-04-01 12:37 ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

On Xe-HP and later devices, we use dedicated compression control
state (CCS) stored in local memory for each surface, to support
the 3D and media compression formats.

The memory required for the CCS of the entire local memory is
1/256 of the local memory size. So before the kernel
boot, the required memory is reserved for the CCS data and a
secure register will be programmed with the CCS base address

So when we allocate a object in local memory we dont need to explicitly
allocate the space for ccs data. But when we evict the obj into the smem
to hold the compression related data along with the obj we need smem
space of obj_size + (obj_size/256).

Hence when we create smem for an obj with lmem placement possibility we
create with the extra space.

When we are swapping out the local memory obj on flat-ccs capable platform,
we need to capture the ccs data too along with main meory and we need to
restore it when we are swapping in the content.

When lmem object is swapped into a smem obj, smem obj will
have the extra pages required to hold the ccs data corresponding to the
lmem main memory. So main memory of lmem will be copied into the initial
pages of the smem and then ccs data corresponding to the main memory
will be copied to the subsequent pages of smem.

Swapin happens exactly in reverse order. First main memory of lmem is
restored from the smem's initial pages and the ccs data will be restored
from the subsequent pages of smem.

Extracting and restoring the CCS data is done through a special cmd called
XY_CTRL_SURF_COPY_BLT

v7:
  GEM_BUG_ON is added for catching if inflated pages are filled for
    get_pages
  Optimised emit_copy_clear
  Engine index is directly used for the upper 32 bits of offset
  Use FAT_COLOR_BLT only for FLAT_CCS capable platforms

Resending with updated igt version for test with.

Test-with: 20220401074527.15709-2-ramalingam.c@intel.com

Ramalingam C (9):
  drm/i915/gt: use engine instance directly for offset
  drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
  drm/i915/gt: Optimize the migration and clear loop
  drm/i915/gt: Clear compress metadata for Flat-ccs objects
  drm/i915/selftest_migrate: Consider the possible roundup of size
  drm/i915/selftest_migrate: Check CCS meta data clear
  drm/ttm: Add a parameter to add extra pages into ttm_tt
  drm/i915/gem: Add extra pages in ttm_tt for ccs data
  drm/i915/migrate: Evict and restore the flatccs capable lmem obj

 drivers/gpu/drm/drm_gem_vram_helper.c        |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c      |  30 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  21 +
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 387 +++++++++++++++++--
 drivers/gpu/drm/i915/gt/selftest_migrate.c   | 253 ++++++++++--
 drivers/gpu/drm/qxl/qxl_ttm.c                |   2 +-
 drivers/gpu/drm/ttm/ttm_agp_backend.c        |   2 +-
 drivers/gpu/drm/ttm/ttm_tt.c                 |  12 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c   |   2 +-
 include/drm/ttm/ttm_tt.h                     |   4 +-
 10 files changed, 642 insertions(+), 73 deletions(-)

-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 0/9] drm/i915/ttm: Evict and restore of compressed object
@ 2022-04-01 12:37 ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

On Xe-HP and later devices, we use dedicated compression control
state (CCS) stored in local memory for each surface, to support
the 3D and media compression formats.

The memory required for the CCS of the entire local memory is
1/256 of the local memory size. So before the kernel
boot, the required memory is reserved for the CCS data and a
secure register will be programmed with the CCS base address

So when we allocate a object in local memory we dont need to explicitly
allocate the space for ccs data. But when we evict the obj into the smem
to hold the compression related data along with the obj we need smem
space of obj_size + (obj_size/256).

Hence when we create smem for an obj with lmem placement possibility we
create with the extra space.

When we are swapping out the local memory obj on flat-ccs capable platform,
we need to capture the ccs data too along with main meory and we need to
restore it when we are swapping in the content.

When lmem object is swapped into a smem obj, smem obj will
have the extra pages required to hold the ccs data corresponding to the
lmem main memory. So main memory of lmem will be copied into the initial
pages of the smem and then ccs data corresponding to the main memory
will be copied to the subsequent pages of smem.

Swapin happens exactly in reverse order. First main memory of lmem is
restored from the smem's initial pages and the ccs data will be restored
from the subsequent pages of smem.

Extracting and restoring the CCS data is done through a special cmd called
XY_CTRL_SURF_COPY_BLT

v7:
  GEM_BUG_ON is added for catching if inflated pages are filled for
    get_pages
  Optimised emit_copy_clear
  Engine index is directly used for the upper 32 bits of offset
  Use FAT_COLOR_BLT only for FLAT_CCS capable platforms

Resending with updated igt version for test with.

Test-with: 20220401074527.15709-2-ramalingam.c@intel.com

Ramalingam C (9):
  drm/i915/gt: use engine instance directly for offset
  drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
  drm/i915/gt: Optimize the migration and clear loop
  drm/i915/gt: Clear compress metadata for Flat-ccs objects
  drm/i915/selftest_migrate: Consider the possible roundup of size
  drm/i915/selftest_migrate: Check CCS meta data clear
  drm/ttm: Add a parameter to add extra pages into ttm_tt
  drm/i915/gem: Add extra pages in ttm_tt for ccs data
  drm/i915/migrate: Evict and restore the flatccs capable lmem obj

 drivers/gpu/drm/drm_gem_vram_helper.c        |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c      |  30 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  21 +
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 387 +++++++++++++++++--
 drivers/gpu/drm/i915/gt/selftest_migrate.c   | 253 ++++++++++--
 drivers/gpu/drm/qxl/qxl_ttm.c                |   2 +-
 drivers/gpu/drm/ttm/ttm_agp_backend.c        |   2 +-
 drivers/gpu/drm/ttm/ttm_tt.c                 |  12 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c   |   2 +-
 include/drm/ttm/ttm_tt.h                     |   4 +-
 10 files changed, 642 insertions(+), 73 deletions(-)

-- 
2.20.1


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

* [PATCH v7 1/9] drm/i915/gt: use engine instance directly for offset
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

To make it uniform across copy and clear, use the engine offset directly
to calculate the offset in the cmd forming for emit_clear.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 950fd6da146c..9d852a570400 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -613,15 +613,13 @@ intel_context_migrate_copy(struct intel_context *ce,
 	return err;
 }
 
-static int emit_clear(struct i915_request *rq, u64 offset, int size, u32 value)
+static int emit_clear(struct i915_request *rq, u32 offset, int size, u32 value)
 {
 	const int ver = GRAPHICS_VER(rq->engine->i915);
 	u32 *cs;
 
 	GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
 
-	offset += (u64)rq->engine->instance << 32;
-
 	cs = intel_ring_begin(rq, ver >= 8 ? 8 : 6);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
@@ -631,17 +629,16 @@ static int emit_clear(struct i915_request *rq, u64 offset, int size, u32 value)
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
 		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-		*cs++ = lower_32_bits(offset);
-		*cs++ = upper_32_bits(offset);
+		*cs++ = offset;
+		*cs++ = rq->engine->instance;
 		*cs++ = value;
 		*cs++ = MI_NOOP;
 	} else {
-		GEM_BUG_ON(upper_32_bits(offset));
 		*cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
 		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-		*cs++ = lower_32_bits(offset);
+		*cs++ = offset;
 		*cs++ = value;
 	}
 
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 1/9] drm/i915/gt: use engine instance directly for offset
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

To make it uniform across copy and clear, use the engine offset directly
to calculate the offset in the cmd forming for emit_clear.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 950fd6da146c..9d852a570400 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -613,15 +613,13 @@ intel_context_migrate_copy(struct intel_context *ce,
 	return err;
 }
 
-static int emit_clear(struct i915_request *rq, u64 offset, int size, u32 value)
+static int emit_clear(struct i915_request *rq, u32 offset, int size, u32 value)
 {
 	const int ver = GRAPHICS_VER(rq->engine->i915);
 	u32 *cs;
 
 	GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
 
-	offset += (u64)rq->engine->instance << 32;
-
 	cs = intel_ring_begin(rq, ver >= 8 ? 8 : 6);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
@@ -631,17 +629,16 @@ static int emit_clear(struct i915_request *rq, u64 offset, int size, u32 value)
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
 		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-		*cs++ = lower_32_bits(offset);
-		*cs++ = upper_32_bits(offset);
+		*cs++ = offset;
+		*cs++ = rq->engine->instance;
 		*cs++ = value;
 		*cs++ = MI_NOOP;
 	} else {
-		GEM_BUG_ON(upper_32_bits(offset));
 		*cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
 		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-		*cs++ = lower_32_bits(offset);
+		*cs++ = offset;
 		*cs++ = value;
 	}
 
-- 
2.20.1


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

* [PATCH v7 2/9] drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Use faster XY_FAST_COLOR_BLT cmd on graphics version of 12 and more,
for clearing (Zero out) the pages of the newly allocated object.

XY_FAST_COLOR_BLT is faster than the older XY_COLOR_BLT.

v2:
  Typo fix at title [Thomas]
v3:
  XY_FAST_COLOR_BLT is used only for FLAT_CCS capable gen12+

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  5 +++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 43 +++++++++++++++++---
 2 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index 4243be030bc1..d1b8c23f7a9e 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -206,6 +206,11 @@
 
 #define COLOR_BLT_CMD			(2 << 29 | 0x40 << 22 | (5 - 2))
 #define XY_COLOR_BLT_CMD		(2 << 29 | 0x50 << 22)
+#define XY_FAST_COLOR_BLT_CMD		(2 << 29 | 0x44 << 22)
+#define   XY_FAST_COLOR_BLT_DEPTH_32	(2 << 19)
+#define   XY_FAST_COLOR_BLT_DW		16
+#define   XY_FAST_COLOR_BLT_MOCS_MASK	GENMASK(27, 21)
+#define   XY_FAST_COLOR_BLT_MEM_TYPE_SHIFT 31
 #define SRC_COPY_BLT_CMD		(2 << 29 | 0x43 << 22)
 #define GEN9_XY_FAST_COPY_BLT_CMD	(2 << 29 | 0x42 << 22)
 #define XY_SRC_COPY_BLT_CMD		(2 << 29 | 0x53 << 22)
diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 9d852a570400..e81f20266f62 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -613,18 +613,51 @@ intel_context_migrate_copy(struct intel_context *ce,
 	return err;
 }
 
-static int emit_clear(struct i915_request *rq, u32 offset, int size, u32 value)
+static int emit_clear(struct i915_request *rq, u32 offset, int size,
+		      u32 value, bool is_lmem)
 {
-	const int ver = GRAPHICS_VER(rq->engine->i915);
+	struct drm_i915_private *i915 = rq->engine->i915;
+	int mocs = rq->engine->gt->mocs.uc_index << 1;
+	const int ver = GRAPHICS_VER(i915);
+	int ring_sz;
 	u32 *cs;
 
 	GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
 
-	cs = intel_ring_begin(rq, ver >= 8 ? 8 : 6);
+	if (HAS_FLAT_CCS(i915) && ver >= 12)
+		ring_sz = XY_FAST_COLOR_BLT_DW;
+	else if (ver >= 8)
+		ring_sz = 8;
+	else
+		ring_sz = 6;
+
+	cs = intel_ring_begin(rq, ring_sz);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
 
-	if (ver >= 8) {
+	if (HAS_FLAT_CCS(i915) && ver >= 12) {
+		*cs++ = XY_FAST_COLOR_BLT_CMD | XY_FAST_COLOR_BLT_DEPTH_32 |
+			(XY_FAST_COLOR_BLT_DW - 2);
+		*cs++ = FIELD_PREP(XY_FAST_COLOR_BLT_MOCS_MASK, mocs) |
+			(PAGE_SIZE - 1);
+		*cs++ = 0;
+		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+		*cs++ = offset;
+		*cs++ = rq->engine->instance;
+		*cs++ = !is_lmem << XY_FAST_COLOR_BLT_MEM_TYPE_SHIFT;
+		/* BG7 */
+		*cs++ = value;
+		*cs++ = 0;
+		*cs++ = 0;
+		*cs++ = 0;
+		/* BG11 */
+		*cs++ = 0;
+		*cs++ = 0;
+		/* BG13 */
+		*cs++ = 0;
+		*cs++ = 0;
+		*cs++ = 0;
+	} else if (ver >= 8) {
 		*cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
@@ -707,7 +740,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		err = emit_clear(rq, offset, len, value);
+		err = emit_clear(rq, offset, len, value, is_lmem);
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 2/9] drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Use faster XY_FAST_COLOR_BLT cmd on graphics version of 12 and more,
for clearing (Zero out) the pages of the newly allocated object.

XY_FAST_COLOR_BLT is faster than the older XY_COLOR_BLT.

v2:
  Typo fix at title [Thomas]
v3:
  XY_FAST_COLOR_BLT is used only for FLAT_CCS capable gen12+

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  5 +++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 43 +++++++++++++++++---
 2 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index 4243be030bc1..d1b8c23f7a9e 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -206,6 +206,11 @@
 
 #define COLOR_BLT_CMD			(2 << 29 | 0x40 << 22 | (5 - 2))
 #define XY_COLOR_BLT_CMD		(2 << 29 | 0x50 << 22)
+#define XY_FAST_COLOR_BLT_CMD		(2 << 29 | 0x44 << 22)
+#define   XY_FAST_COLOR_BLT_DEPTH_32	(2 << 19)
+#define   XY_FAST_COLOR_BLT_DW		16
+#define   XY_FAST_COLOR_BLT_MOCS_MASK	GENMASK(27, 21)
+#define   XY_FAST_COLOR_BLT_MEM_TYPE_SHIFT 31
 #define SRC_COPY_BLT_CMD		(2 << 29 | 0x43 << 22)
 #define GEN9_XY_FAST_COPY_BLT_CMD	(2 << 29 | 0x42 << 22)
 #define XY_SRC_COPY_BLT_CMD		(2 << 29 | 0x53 << 22)
diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 9d852a570400..e81f20266f62 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -613,18 +613,51 @@ intel_context_migrate_copy(struct intel_context *ce,
 	return err;
 }
 
-static int emit_clear(struct i915_request *rq, u32 offset, int size, u32 value)
+static int emit_clear(struct i915_request *rq, u32 offset, int size,
+		      u32 value, bool is_lmem)
 {
-	const int ver = GRAPHICS_VER(rq->engine->i915);
+	struct drm_i915_private *i915 = rq->engine->i915;
+	int mocs = rq->engine->gt->mocs.uc_index << 1;
+	const int ver = GRAPHICS_VER(i915);
+	int ring_sz;
 	u32 *cs;
 
 	GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
 
-	cs = intel_ring_begin(rq, ver >= 8 ? 8 : 6);
+	if (HAS_FLAT_CCS(i915) && ver >= 12)
+		ring_sz = XY_FAST_COLOR_BLT_DW;
+	else if (ver >= 8)
+		ring_sz = 8;
+	else
+		ring_sz = 6;
+
+	cs = intel_ring_begin(rq, ring_sz);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
 
-	if (ver >= 8) {
+	if (HAS_FLAT_CCS(i915) && ver >= 12) {
+		*cs++ = XY_FAST_COLOR_BLT_CMD | XY_FAST_COLOR_BLT_DEPTH_32 |
+			(XY_FAST_COLOR_BLT_DW - 2);
+		*cs++ = FIELD_PREP(XY_FAST_COLOR_BLT_MOCS_MASK, mocs) |
+			(PAGE_SIZE - 1);
+		*cs++ = 0;
+		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+		*cs++ = offset;
+		*cs++ = rq->engine->instance;
+		*cs++ = !is_lmem << XY_FAST_COLOR_BLT_MEM_TYPE_SHIFT;
+		/* BG7 */
+		*cs++ = value;
+		*cs++ = 0;
+		*cs++ = 0;
+		*cs++ = 0;
+		/* BG11 */
+		*cs++ = 0;
+		*cs++ = 0;
+		/* BG13 */
+		*cs++ = 0;
+		*cs++ = 0;
+		*cs++ = 0;
+	} else if (ver >= 8) {
 		*cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
 		*cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
 		*cs++ = 0;
@@ -707,7 +740,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		err = emit_clear(rq, offset, len, value);
+		err = emit_clear(rq, offset, len, value, is_lmem);
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
-- 
2.20.1


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

* [PATCH v7 3/9] drm/i915/gt: Optimize the migration and clear loop
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Move the static calculations out of the loops for copy and clear.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 40 ++++++++++++-------------
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index e81f20266f62..580b4cf1efa2 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -526,6 +526,7 @@ intel_context_migrate_copy(struct intel_context *ce,
 			   struct i915_request **out)
 {
 	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
+	u32 src_offset, dst_offset;
 	struct i915_request *rq;
 	int err;
 
@@ -535,8 +536,18 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	src_offset = 0;
+	dst_offset = CHUNK_SZ;
+	if (HAS_64K_PAGES(ce->engine->i915)) {
+		src_offset = 0;
+		dst_offset = 0;
+		if (src_is_lmem)
+			src_offset = CHUNK_SZ;
+		if (dst_is_lmem)
+			dst_offset = 2 * CHUNK_SZ;
+	}
+
 	do {
-		u32 src_offset, dst_offset;
 		int len;
 
 		rq = i915_request_create(ce);
@@ -564,17 +575,6 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		src_offset = 0;
-		dst_offset = CHUNK_SZ;
-		if (HAS_64K_PAGES(ce->engine->i915)) {
-			src_offset = 0;
-			dst_offset = 0;
-			if (src_is_lmem)
-				src_offset = CHUNK_SZ;
-			if (dst_is_lmem)
-				dst_offset = 2 * CHUNK_SZ;
-		}
-
 		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
 			       src_offset, CHUNK_SZ);
 		if (len <= 0) {
@@ -584,12 +584,10 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 		err = emit_pte(rq, &it_dst, dst_cache_level, dst_is_lmem,
 			       dst_offset, len);
-		if (err < 0)
-			goto out_rq;
-		if (err < len) {
+		if (err < len)
 			err = -EINVAL;
+		if (err < 0)
 			goto out_rq;
-		}
 
 		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
 		if (err)
@@ -690,6 +688,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 {
 	struct sgt_dma it = sg_sgt(sg);
 	struct i915_request *rq;
+	u32 offset;
 	int err;
 
 	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
@@ -697,8 +696,11 @@ intel_context_migrate_clear(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	offset = 0;
+	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
+		offset = CHUNK_SZ;
+
 	do {
-		u32 offset;
 		int len;
 
 		rq = i915_request_create(ce);
@@ -726,10 +728,6 @@ intel_context_migrate_clear(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		offset = 0;
-		if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
-			offset = CHUNK_SZ;
-
 		len = emit_pte(rq, &it, cache_level, is_lmem, offset, CHUNK_SZ);
 		if (len <= 0) {
 			err = len;
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 3/9] drm/i915/gt: Optimize the migration and clear loop
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Move the static calculations out of the loops for copy and clear.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 40 ++++++++++++-------------
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index e81f20266f62..580b4cf1efa2 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -526,6 +526,7 @@ intel_context_migrate_copy(struct intel_context *ce,
 			   struct i915_request **out)
 {
 	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
+	u32 src_offset, dst_offset;
 	struct i915_request *rq;
 	int err;
 
@@ -535,8 +536,18 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	src_offset = 0;
+	dst_offset = CHUNK_SZ;
+	if (HAS_64K_PAGES(ce->engine->i915)) {
+		src_offset = 0;
+		dst_offset = 0;
+		if (src_is_lmem)
+			src_offset = CHUNK_SZ;
+		if (dst_is_lmem)
+			dst_offset = 2 * CHUNK_SZ;
+	}
+
 	do {
-		u32 src_offset, dst_offset;
 		int len;
 
 		rq = i915_request_create(ce);
@@ -564,17 +575,6 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		src_offset = 0;
-		dst_offset = CHUNK_SZ;
-		if (HAS_64K_PAGES(ce->engine->i915)) {
-			src_offset = 0;
-			dst_offset = 0;
-			if (src_is_lmem)
-				src_offset = CHUNK_SZ;
-			if (dst_is_lmem)
-				dst_offset = 2 * CHUNK_SZ;
-		}
-
 		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
 			       src_offset, CHUNK_SZ);
 		if (len <= 0) {
@@ -584,12 +584,10 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 		err = emit_pte(rq, &it_dst, dst_cache_level, dst_is_lmem,
 			       dst_offset, len);
-		if (err < 0)
-			goto out_rq;
-		if (err < len) {
+		if (err < len)
 			err = -EINVAL;
+		if (err < 0)
 			goto out_rq;
-		}
 
 		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
 		if (err)
@@ -690,6 +688,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 {
 	struct sgt_dma it = sg_sgt(sg);
 	struct i915_request *rq;
+	u32 offset;
 	int err;
 
 	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
@@ -697,8 +696,11 @@ intel_context_migrate_clear(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	offset = 0;
+	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
+		offset = CHUNK_SZ;
+
 	do {
-		u32 offset;
 		int len;
 
 		rq = i915_request_create(ce);
@@ -726,10 +728,6 @@ intel_context_migrate_clear(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		offset = 0;
-		if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
-			offset = CHUNK_SZ;
-
 		len = emit_pte(rq, &it, cache_level, is_lmem, offset, CHUNK_SZ);
 		if (len <= 0) {
 			err = len;
-- 
2.20.1


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

* [PATCH v7 4/9] drm/i915/gt: Clear compress metadata for Flat-ccs objects
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Xe-HP and latest devices support Flat CCS which reserved a portion of
the device memory to store compression metadata, during the clearing of
device memory buffer object we also need to clear the associated
CCS buffer.

XY_CTRL_SURF_COPY_BLT is a BLT cmd used for reading and writing the
ccs surface of a lmem memory. So on Flat-CCS capable platform we use
XY_CTRL_SURF_COPY_BLT  to clear the CCS meta data.

v2: Fixed issues with platform naming [Lucas]
v3: Rebased [Ram]
    Used the round_up funcs [Bob]
v4: Fixed ccs blk calculation [Ram]
    Added Kdoc on flat-ccs.
v5: GENMASK is used [Matt]
    mocs fix [Matt]
    Comments Fix [Matt]
    Flush address programming [Ram]
v6: FLUSH_DW is fixed
    Few coding style fix
v7: Adopting the XY_FAST_COLOR_BLT (Thomas]
v8: XY_CTRL_SURF_COPY_BLT for ccs clearing.
v9: emit_copy_ccs is used.
v10: ctrl_surf cmds are filled in caller itself. [Thomas]
     only one ctrl surf cmd is used as size of lmem is <=8M [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  16 +++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 137 ++++++++++++++++++-
 2 files changed, 152 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d1b8c23f7a9e..724ab069ddb6 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -154,8 +154,10 @@
 #define   MI_FLUSH_DW_PROTECTED_MEM_EN	(1 << 22)
 #define   MI_FLUSH_DW_STORE_INDEX	(1<<21)
 #define   MI_INVALIDATE_TLB		(1<<18)
+#define   MI_FLUSH_DW_CCS		(1<<16)
 #define   MI_FLUSH_DW_OP_STOREDW	(1<<14)
 #define   MI_FLUSH_DW_OP_MASK		(3<<14)
+#define   MI_FLUSH_DW_LLC		(1<<9)
 #define   MI_FLUSH_DW_NOTIFY		(1<<8)
 #define   MI_INVALIDATE_BSD		(1<<7)
 #define   MI_FLUSH_DW_USE_GTT		(1<<2)
@@ -204,6 +206,20 @@
 #define GFX_OP_DRAWRECT_INFO     ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
 #define GFX_OP_DRAWRECT_INFO_I965  ((0x7900<<16)|0x2)
 
+#define XY_CTRL_SURF_INSTR_SIZE		5
+#define MI_FLUSH_DW_SIZE		3
+#define XY_CTRL_SURF_COPY_BLT		((2 << 29) | (0x48 << 22) | 3)
+#define   SRC_ACCESS_TYPE_SHIFT		21
+#define   DST_ACCESS_TYPE_SHIFT		20
+#define   CCS_SIZE_MASK			0x3FF
+#define   CCS_SIZE_SHIFT		8
+#define   XY_CTRL_SURF_MOCS_MASK	GENMASK(31, 25)
+#define   NUM_CCS_BYTES_PER_BLOCK	256
+#define   NUM_BYTES_PER_CCS_BYTE	256
+#define   NUM_CCS_BLKS_PER_XFER		1024
+#define   INDIRECT_ACCESS		0
+#define   DIRECT_ACCESS			1
+
 #define COLOR_BLT_CMD			(2 << 29 | 0x40 << 22 | (5 - 2))
 #define XY_COLOR_BLT_CMD		(2 << 29 | 0x50 << 22)
 #define XY_FAST_COLOR_BLT_CMD		(2 << 29 | 0x44 << 22)
diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 580b4cf1efa2..a44f2d29da4e 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -17,6 +17,8 @@ struct insert_pte_data {
 
 #define CHUNK_SZ SZ_8M /* ~1ms at 8GiB/s preemption delay */
 
+#define GET_CCS_BYTES(i915, size)	(HAS_FLAT_CCS(i915) ? \
+					 DIV_ROUND_UP(size, NUM_BYTES_PER_CCS_BYTE) : 0)
 static bool engine_supports_migration(struct intel_engine_cs *engine)
 {
 	if (!engine)
@@ -467,6 +469,123 @@ static bool wa_1209644611_applies(int ver, u32 size)
 	return height % 4 == 3 && height <= 8;
 }
 
+/**
+ * DOC: Flat-CCS - Memory compression for Local memory
+ *
+ * On Xe-HP and later devices, we use dedicated compression control state (CCS)
+ * stored in local memory for each surface, to support the 3D and media
+ * compression formats.
+ *
+ * The memory required for the CCS of the entire local memory is 1/256 of the
+ * local memory size. So before the kernel boot, the required memory is reserved
+ * for the CCS data and a secure register will be programmed with the CCS base
+ * address.
+ *
+ * Flat CCS data needs to be cleared when a lmem object is allocated.
+ * And CCS data can be copied in and out of CCS region through
+ * XY_CTRL_SURF_COPY_BLT. CPU can't access the CCS data directly.
+ *
+ * When we exhaust the lmem, if the object's placements support smem, then we can
+ * directly decompress the compressed lmem object into smem and start using it
+ * from smem itself.
+ *
+ * But when we need to swapout the compressed lmem object into a smem region
+ * though objects' placement doesn't support smem, then we copy the lmem content
+ * as it is into smem region along with ccs data (using XY_CTRL_SURF_COPY_BLT).
+ * When the object is referred, lmem content will be swaped in along with
+ * restoration of the CCS data (using XY_CTRL_SURF_COPY_BLT) at corresponding
+ * location.
+ */
+
+static inline u32 *i915_flush_dw(u32 *cmd, u32 flags)
+{
+	*cmd++ = MI_FLUSH_DW | flags;
+	*cmd++ = 0;
+	*cmd++ = 0;
+
+	return cmd;
+}
+
+static u32 calc_ctrl_surf_instr_size(struct drm_i915_private *i915, int size)
+{
+	u32 num_cmds, num_blks, total_size;
+
+	if (!GET_CCS_BYTES(i915, size))
+		return 0;
+
+	/*
+	 * XY_CTRL_SURF_COPY_BLT transfers CCS in 256 byte
+	 * blocks. one XY_CTRL_SURF_COPY_BLT command can
+	 * transfer upto 1024 blocks.
+	 */
+	num_blks = DIV_ROUND_UP(GET_CCS_BYTES(i915, size),
+				NUM_CCS_BYTES_PER_BLOCK);
+	num_cmds = DIV_ROUND_UP(num_blks, NUM_CCS_BLKS_PER_XFER);
+	total_size = XY_CTRL_SURF_INSTR_SIZE * num_cmds;
+
+	/*
+	 * Adding a flush before and after XY_CTRL_SURF_COPY_BLT
+	 */
+	total_size += 2 * MI_FLUSH_DW_SIZE;
+
+	return total_size;
+}
+
+static int emit_copy_ccs(struct i915_request *rq,
+			 u32 dst_offset, u8 dst_access,
+			 u32 src_offset, u8 src_access, int size)
+{
+	struct drm_i915_private *i915 = rq->engine->i915;
+	int mocs = rq->engine->gt->mocs.uc_index << 1;
+	u32 num_ccs_blks, ccs_ring_size;
+	u32 *cs;
+
+	ccs_ring_size = calc_ctrl_surf_instr_size(i915, size);
+	WARN_ON(!ccs_ring_size);
+
+	cs = intel_ring_begin(rq, round_up(ccs_ring_size, 2));
+	if (IS_ERR(cs))
+		return PTR_ERR(cs);
+
+	num_ccs_blks = DIV_ROUND_UP(GET_CCS_BYTES(i915, size),
+				    NUM_CCS_BYTES_PER_BLOCK);
+	GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER);
+	cs = i915_flush_dw(cs, MI_FLUSH_DW_LLC | MI_FLUSH_DW_CCS);
+
+	/*
+	 * The XY_CTRL_SURF_COPY_BLT instruction is used to copy the CCS
+	 * data in and out of the CCS region.
+	 *
+	 * We can copy at most 1024 blocks of 256 bytes using one
+	 * XY_CTRL_SURF_COPY_BLT instruction.
+	 *
+	 * In case we need to copy more than 1024 blocks, we need to add
+	 * another instruction to the same batch buffer.
+	 *
+	 * 1024 blocks of 256 bytes of CCS represent a total 256KB of CCS.
+	 *
+	 * 256 KB of CCS represents 256 * 256 KB = 64 MB of LMEM.
+	 */
+	*cs++ = XY_CTRL_SURF_COPY_BLT |
+		src_access << SRC_ACCESS_TYPE_SHIFT |
+		dst_access << DST_ACCESS_TYPE_SHIFT |
+		((num_ccs_blks - 1) & CCS_SIZE_MASK) << CCS_SIZE_SHIFT;
+	*cs++ = src_offset;
+	*cs++ = rq->engine->instance |
+		FIELD_PREP(XY_CTRL_SURF_MOCS_MASK, mocs);
+	*cs++ = dst_offset;
+	*cs++ = rq->engine->instance |
+		FIELD_PREP(XY_CTRL_SURF_MOCS_MASK, mocs);
+
+	cs = i915_flush_dw(cs, MI_FLUSH_DW_LLC | MI_FLUSH_DW_CCS);
+	if (ccs_ring_size & 1)
+		*cs++ = MI_NOOP;
+
+	intel_ring_advance(rq, cs);
+
+	return 0;
+}
+
 static int emit_copy(struct i915_request *rq,
 		     u32 dst_offset, u32 src_offset, int size)
 {
@@ -686,6 +805,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 			    u32 value,
 			    struct i915_request **out)
 {
+	struct drm_i915_private *i915 = ce->engine->i915;
 	struct sgt_dma it = sg_sgt(sg);
 	struct i915_request *rq;
 	u32 offset;
@@ -697,7 +817,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
 	offset = 0;
-	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
+	if (HAS_64K_PAGES(i915) && is_lmem)
 		offset = CHUNK_SZ;
 
 	do {
@@ -739,6 +859,21 @@ intel_context_migrate_clear(struct intel_context *ce,
 			goto out_rq;
 
 		err = emit_clear(rq, offset, len, value, is_lmem);
+		if (err)
+			goto out_rq;
+
+		if (HAS_FLAT_CCS(i915) && is_lmem && !value) {
+			/*
+			 * copy the content of memory into corresponding
+			 * ccs surface
+			 */
+			err = emit_copy_ccs(rq, offset, INDIRECT_ACCESS, offset,
+					    DIRECT_ACCESS, len);
+			if (err)
+				goto out_rq;
+		}
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 4/9] drm/i915/gt: Clear compress metadata for Flat-ccs objects
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Xe-HP and latest devices support Flat CCS which reserved a portion of
the device memory to store compression metadata, during the clearing of
device memory buffer object we also need to clear the associated
CCS buffer.

XY_CTRL_SURF_COPY_BLT is a BLT cmd used for reading and writing the
ccs surface of a lmem memory. So on Flat-CCS capable platform we use
XY_CTRL_SURF_COPY_BLT  to clear the CCS meta data.

v2: Fixed issues with platform naming [Lucas]
v3: Rebased [Ram]
    Used the round_up funcs [Bob]
v4: Fixed ccs blk calculation [Ram]
    Added Kdoc on flat-ccs.
v5: GENMASK is used [Matt]
    mocs fix [Matt]
    Comments Fix [Matt]
    Flush address programming [Ram]
v6: FLUSH_DW is fixed
    Few coding style fix
v7: Adopting the XY_FAST_COLOR_BLT (Thomas]
v8: XY_CTRL_SURF_COPY_BLT for ccs clearing.
v9: emit_copy_ccs is used.
v10: ctrl_surf cmds are filled in caller itself. [Thomas]
     only one ctrl surf cmd is used as size of lmem is <=8M [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  16 +++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 137 ++++++++++++++++++-
 2 files changed, 152 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d1b8c23f7a9e..724ab069ddb6 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -154,8 +154,10 @@
 #define   MI_FLUSH_DW_PROTECTED_MEM_EN	(1 << 22)
 #define   MI_FLUSH_DW_STORE_INDEX	(1<<21)
 #define   MI_INVALIDATE_TLB		(1<<18)
+#define   MI_FLUSH_DW_CCS		(1<<16)
 #define   MI_FLUSH_DW_OP_STOREDW	(1<<14)
 #define   MI_FLUSH_DW_OP_MASK		(3<<14)
+#define   MI_FLUSH_DW_LLC		(1<<9)
 #define   MI_FLUSH_DW_NOTIFY		(1<<8)
 #define   MI_INVALIDATE_BSD		(1<<7)
 #define   MI_FLUSH_DW_USE_GTT		(1<<2)
@@ -204,6 +206,20 @@
 #define GFX_OP_DRAWRECT_INFO     ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
 #define GFX_OP_DRAWRECT_INFO_I965  ((0x7900<<16)|0x2)
 
+#define XY_CTRL_SURF_INSTR_SIZE		5
+#define MI_FLUSH_DW_SIZE		3
+#define XY_CTRL_SURF_COPY_BLT		((2 << 29) | (0x48 << 22) | 3)
+#define   SRC_ACCESS_TYPE_SHIFT		21
+#define   DST_ACCESS_TYPE_SHIFT		20
+#define   CCS_SIZE_MASK			0x3FF
+#define   CCS_SIZE_SHIFT		8
+#define   XY_CTRL_SURF_MOCS_MASK	GENMASK(31, 25)
+#define   NUM_CCS_BYTES_PER_BLOCK	256
+#define   NUM_BYTES_PER_CCS_BYTE	256
+#define   NUM_CCS_BLKS_PER_XFER		1024
+#define   INDIRECT_ACCESS		0
+#define   DIRECT_ACCESS			1
+
 #define COLOR_BLT_CMD			(2 << 29 | 0x40 << 22 | (5 - 2))
 #define XY_COLOR_BLT_CMD		(2 << 29 | 0x50 << 22)
 #define XY_FAST_COLOR_BLT_CMD		(2 << 29 | 0x44 << 22)
diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 580b4cf1efa2..a44f2d29da4e 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -17,6 +17,8 @@ struct insert_pte_data {
 
 #define CHUNK_SZ SZ_8M /* ~1ms at 8GiB/s preemption delay */
 
+#define GET_CCS_BYTES(i915, size)	(HAS_FLAT_CCS(i915) ? \
+					 DIV_ROUND_UP(size, NUM_BYTES_PER_CCS_BYTE) : 0)
 static bool engine_supports_migration(struct intel_engine_cs *engine)
 {
 	if (!engine)
@@ -467,6 +469,123 @@ static bool wa_1209644611_applies(int ver, u32 size)
 	return height % 4 == 3 && height <= 8;
 }
 
+/**
+ * DOC: Flat-CCS - Memory compression for Local memory
+ *
+ * On Xe-HP and later devices, we use dedicated compression control state (CCS)
+ * stored in local memory for each surface, to support the 3D and media
+ * compression formats.
+ *
+ * The memory required for the CCS of the entire local memory is 1/256 of the
+ * local memory size. So before the kernel boot, the required memory is reserved
+ * for the CCS data and a secure register will be programmed with the CCS base
+ * address.
+ *
+ * Flat CCS data needs to be cleared when a lmem object is allocated.
+ * And CCS data can be copied in and out of CCS region through
+ * XY_CTRL_SURF_COPY_BLT. CPU can't access the CCS data directly.
+ *
+ * When we exhaust the lmem, if the object's placements support smem, then we can
+ * directly decompress the compressed lmem object into smem and start using it
+ * from smem itself.
+ *
+ * But when we need to swapout the compressed lmem object into a smem region
+ * though objects' placement doesn't support smem, then we copy the lmem content
+ * as it is into smem region along with ccs data (using XY_CTRL_SURF_COPY_BLT).
+ * When the object is referred, lmem content will be swaped in along with
+ * restoration of the CCS data (using XY_CTRL_SURF_COPY_BLT) at corresponding
+ * location.
+ */
+
+static inline u32 *i915_flush_dw(u32 *cmd, u32 flags)
+{
+	*cmd++ = MI_FLUSH_DW | flags;
+	*cmd++ = 0;
+	*cmd++ = 0;
+
+	return cmd;
+}
+
+static u32 calc_ctrl_surf_instr_size(struct drm_i915_private *i915, int size)
+{
+	u32 num_cmds, num_blks, total_size;
+
+	if (!GET_CCS_BYTES(i915, size))
+		return 0;
+
+	/*
+	 * XY_CTRL_SURF_COPY_BLT transfers CCS in 256 byte
+	 * blocks. one XY_CTRL_SURF_COPY_BLT command can
+	 * transfer upto 1024 blocks.
+	 */
+	num_blks = DIV_ROUND_UP(GET_CCS_BYTES(i915, size),
+				NUM_CCS_BYTES_PER_BLOCK);
+	num_cmds = DIV_ROUND_UP(num_blks, NUM_CCS_BLKS_PER_XFER);
+	total_size = XY_CTRL_SURF_INSTR_SIZE * num_cmds;
+
+	/*
+	 * Adding a flush before and after XY_CTRL_SURF_COPY_BLT
+	 */
+	total_size += 2 * MI_FLUSH_DW_SIZE;
+
+	return total_size;
+}
+
+static int emit_copy_ccs(struct i915_request *rq,
+			 u32 dst_offset, u8 dst_access,
+			 u32 src_offset, u8 src_access, int size)
+{
+	struct drm_i915_private *i915 = rq->engine->i915;
+	int mocs = rq->engine->gt->mocs.uc_index << 1;
+	u32 num_ccs_blks, ccs_ring_size;
+	u32 *cs;
+
+	ccs_ring_size = calc_ctrl_surf_instr_size(i915, size);
+	WARN_ON(!ccs_ring_size);
+
+	cs = intel_ring_begin(rq, round_up(ccs_ring_size, 2));
+	if (IS_ERR(cs))
+		return PTR_ERR(cs);
+
+	num_ccs_blks = DIV_ROUND_UP(GET_CCS_BYTES(i915, size),
+				    NUM_CCS_BYTES_PER_BLOCK);
+	GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER);
+	cs = i915_flush_dw(cs, MI_FLUSH_DW_LLC | MI_FLUSH_DW_CCS);
+
+	/*
+	 * The XY_CTRL_SURF_COPY_BLT instruction is used to copy the CCS
+	 * data in and out of the CCS region.
+	 *
+	 * We can copy at most 1024 blocks of 256 bytes using one
+	 * XY_CTRL_SURF_COPY_BLT instruction.
+	 *
+	 * In case we need to copy more than 1024 blocks, we need to add
+	 * another instruction to the same batch buffer.
+	 *
+	 * 1024 blocks of 256 bytes of CCS represent a total 256KB of CCS.
+	 *
+	 * 256 KB of CCS represents 256 * 256 KB = 64 MB of LMEM.
+	 */
+	*cs++ = XY_CTRL_SURF_COPY_BLT |
+		src_access << SRC_ACCESS_TYPE_SHIFT |
+		dst_access << DST_ACCESS_TYPE_SHIFT |
+		((num_ccs_blks - 1) & CCS_SIZE_MASK) << CCS_SIZE_SHIFT;
+	*cs++ = src_offset;
+	*cs++ = rq->engine->instance |
+		FIELD_PREP(XY_CTRL_SURF_MOCS_MASK, mocs);
+	*cs++ = dst_offset;
+	*cs++ = rq->engine->instance |
+		FIELD_PREP(XY_CTRL_SURF_MOCS_MASK, mocs);
+
+	cs = i915_flush_dw(cs, MI_FLUSH_DW_LLC | MI_FLUSH_DW_CCS);
+	if (ccs_ring_size & 1)
+		*cs++ = MI_NOOP;
+
+	intel_ring_advance(rq, cs);
+
+	return 0;
+}
+
 static int emit_copy(struct i915_request *rq,
 		     u32 dst_offset, u32 src_offset, int size)
 {
@@ -686,6 +805,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 			    u32 value,
 			    struct i915_request **out)
 {
+	struct drm_i915_private *i915 = ce->engine->i915;
 	struct sgt_dma it = sg_sgt(sg);
 	struct i915_request *rq;
 	u32 offset;
@@ -697,7 +817,7 @@ intel_context_migrate_clear(struct intel_context *ce,
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
 	offset = 0;
-	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
+	if (HAS_64K_PAGES(i915) && is_lmem)
 		offset = CHUNK_SZ;
 
 	do {
@@ -739,6 +859,21 @@ intel_context_migrate_clear(struct intel_context *ce,
 			goto out_rq;
 
 		err = emit_clear(rq, offset, len, value, is_lmem);
+		if (err)
+			goto out_rq;
+
+		if (HAS_FLAT_CCS(i915) && is_lmem && !value) {
+			/*
+			 * copy the content of memory into corresponding
+			 * ccs surface
+			 */
+			err = emit_copy_ccs(rq, offset, INDIRECT_ACCESS, offset,
+					    DIRECT_ACCESS, len);
+			if (err)
+				goto out_rq;
+		}
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
-- 
2.20.1


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

* [PATCH v7 5/9] drm/i915/selftest_migrate: Consider the possible roundup of size
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Consider the possible round up happened at obj size alignment to
min_page_size during the obj allocation.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_migrate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index c9c4f391c5cc..b5da8b8cd039 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -152,6 +152,9 @@ static int clear(struct intel_migrate *migrate,
 	if (IS_ERR(obj))
 		return 0;
 
+	/* Consider the rounded up memory too */
+	sz = obj->base.size;
+
 	for_i915_gem_ww(&ww, err, true) {
 		err = i915_gem_object_lock(obj, &ww);
 		if (err)
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 5/9] drm/i915/selftest_migrate: Consider the possible roundup of size
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Consider the possible round up happened at obj size alignment to
min_page_size during the obj allocation.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_migrate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index c9c4f391c5cc..b5da8b8cd039 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -152,6 +152,9 @@ static int clear(struct intel_migrate *migrate,
 	if (IS_ERR(obj))
 		return 0;
 
+	/* Consider the rounded up memory too */
+	sz = obj->base.size;
+
 	for_i915_gem_ww(&ww, err, true) {
 		err = i915_gem_object_lock(obj, &ww);
 		if (err)
-- 
2.20.1


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

* [PATCH v7 6/9] drm/i915/selftest_migrate: Check CCS meta data clear
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Extend the live migrate selftest, to verify the ccs surface clearing
during the Flat-CCS capable lmem obj clear.

v2:
  Look at right places for ccs data [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_migrate.c | 250 ++++++++++++++++++---
 1 file changed, 222 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index b5da8b8cd039..8cd9a22054f3 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -132,6 +132,124 @@ static int copy(struct intel_migrate *migrate,
 	return err;
 }
 
+static int intel_context_copy_ccs(struct intel_context *ce,
+				  const struct i915_deps *deps,
+				  struct scatterlist *sg,
+				  enum i915_cache_level cache_level,
+				  bool write_to_ccs,
+				  struct i915_request **out)
+{
+	u8 src_access = write_to_ccs ? DIRECT_ACCESS : INDIRECT_ACCESS;
+	u8 dst_access = write_to_ccs ? INDIRECT_ACCESS : DIRECT_ACCESS;
+	struct sgt_dma it = sg_sgt(sg);
+	struct i915_request *rq;
+	u32 offset;
+	int err;
+
+	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
+	*out = NULL;
+
+	GEM_BUG_ON(ce->ring->size < SZ_64K);
+
+	offset = 0;
+	if (HAS_64K_PAGES(ce->engine->i915))
+		offset = CHUNK_SZ;
+
+	do {
+		int len;
+
+		rq = i915_request_create(ce);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			goto out_ce;
+		}
+
+		if (deps) {
+			err = i915_request_await_deps(rq, deps);
+			if (err)
+				goto out_rq;
+
+			if (rq->engine->emit_init_breadcrumb) {
+				err = rq->engine->emit_init_breadcrumb(rq);
+				if (err)
+					goto out_rq;
+			}
+
+			deps = NULL;
+		}
+
+		/* The PTE updates + clear must not be interrupted. */
+		err = emit_no_arbitration(rq);
+		if (err)
+			goto out_rq;
+
+		len = emit_pte(rq, &it, cache_level, true, offset, CHUNK_SZ);
+		if (len <= 0) {
+			err = len;
+			goto out_rq;
+		}
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+		if (err)
+			goto out_rq;
+
+		err = emit_copy_ccs(rq, offset, dst_access,
+				    offset, src_access, len);
+		if (err)
+			goto out_rq;
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+
+		/* Arbitration is re-enabled between requests. */
+out_rq:
+		if (*out)
+			i915_request_put(*out);
+		*out = i915_request_get(rq);
+		i915_request_add(rq);
+		if (err || !it.sg || !sg_dma_len(it.sg))
+			break;
+
+		cond_resched();
+	} while (1);
+
+out_ce:
+	return err;
+}
+
+static int
+intel_migrate_ccs_copy(struct intel_migrate *m,
+		       struct i915_gem_ww_ctx *ww,
+		       const struct i915_deps *deps,
+		       struct scatterlist *sg,
+		       enum i915_cache_level cache_level,
+		       bool write_to_ccs,
+		       struct i915_request **out)
+{
+	struct intel_context *ce;
+	int err;
+
+	*out = NULL;
+	if (!m->context)
+		return -ENODEV;
+
+	ce = intel_migrate_create_context(m);
+	if (IS_ERR(ce))
+		ce = intel_context_get(m->context);
+	GEM_BUG_ON(IS_ERR(ce));
+
+	err = intel_context_pin_ww(ce, ww);
+	if (err)
+		goto out;
+
+	err = intel_context_copy_ccs(ce, deps, sg, cache_level,
+				     write_to_ccs, out);
+
+	intel_context_unpin(ce);
+out:
+	intel_context_put(ce);
+	return err;
+}
+
 static int clear(struct intel_migrate *migrate,
 		 int (*fn)(struct intel_migrate *migrate,
 			   struct i915_gem_ww_ctx *ww,
@@ -144,7 +262,8 @@ static int clear(struct intel_migrate *migrate,
 	struct drm_i915_gem_object *obj;
 	struct i915_request *rq;
 	struct i915_gem_ww_ctx ww;
-	u32 *vaddr;
+	u32 *vaddr, val = 0;
+	bool ccs_cap = false;
 	int err = 0;
 	int i;
 
@@ -155,7 +274,12 @@ static int clear(struct intel_migrate *migrate,
 	/* Consider the rounded up memory too */
 	sz = obj->base.size;
 
+	if (HAS_FLAT_CCS(i915) && i915_gem_object_is_lmem(obj))
+		ccs_cap = true;
+
 	for_i915_gem_ww(&ww, err, true) {
+		int ccs_bytes, ccs_bytes_per_chunk;
+
 		err = i915_gem_object_lock(obj, &ww);
 		if (err)
 			continue;
@@ -170,44 +294,114 @@ static int clear(struct intel_migrate *migrate,
 			vaddr[i] = ~i;
 		i915_gem_object_flush_map(obj);
 
-		err = fn(migrate, &ww, obj, sz, &rq);
-		if (!err)
-			continue;
+		if (ccs_cap && !val) {
+			/* Write the obj data into ccs surface */
+			err = intel_migrate_ccs_copy(migrate, &ww, NULL,
+						     obj->mm.pages->sgl,
+						     obj->cache_level,
+						     true, &rq);
+			if (rq && !err) {
+				if (i915_request_wait(rq, 0, HZ) < 0) {
+					pr_err("%ps timed out, size: %u\n",
+					       fn, sz);
+					err = -ETIME;
+				}
+				i915_request_put(rq);
+				rq = NULL;
+			}
+			if (err)
+				continue;
+		}
 
-		if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
-			pr_err("%ps failed, size: %u\n", fn, sz);
-		if (rq) {
-			i915_request_wait(rq, 0, HZ);
+		err = fn(migrate, &ww, obj, val, &rq);
+		if (rq && !err) {
+			if (i915_request_wait(rq, 0, HZ) < 0) {
+				pr_err("%ps timed out, size: %u\n", fn, sz);
+				err = -ETIME;
+			}
 			i915_request_put(rq);
+			rq = NULL;
 		}
-		i915_gem_object_unpin_map(obj);
-	}
-	if (err)
-		goto err_out;
+		if (err)
+			continue;
 
-	if (rq) {
-		if (i915_request_wait(rq, 0, HZ) < 0) {
-			pr_err("%ps timed out, size: %u\n", fn, sz);
-			err = -ETIME;
+		i915_gem_object_flush_map(obj);
+
+		/* Verify the set/clear of the obj mem */
+		for (i = 0; !err && i < sz / PAGE_SIZE; i++) {
+			int x = i * 1024 +
+				i915_prandom_u32_max_state(1024, prng);
+
+			if (vaddr[x] != val) {
+				pr_err("%ps failed, (%u != %u), offset: %zu\n",
+				       fn, vaddr[x], val,  x * sizeof(u32));
+				igt_hexdump(vaddr + i * 1024, 4096);
+				err = -EINVAL;
+			}
 		}
-		i915_request_put(rq);
-	}
+		if (err)
+			continue;
 
-	for (i = 0; !err && i < sz / PAGE_SIZE; i++) {
-		int x = i * 1024 + i915_prandom_u32_max_state(1024, prng);
+		if (ccs_cap && !val) {
+			for (i = 0; i < sz / sizeof(u32); i++)
+				vaddr[i] = ~i;
+			i915_gem_object_flush_map(obj);
+
+			err = intel_migrate_ccs_copy(migrate, &ww, NULL,
+						     obj->mm.pages->sgl,
+						     obj->cache_level,
+						     false, &rq);
+			if (rq && !err) {
+				if (i915_request_wait(rq, 0, HZ) < 0) {
+					pr_err("%ps timed out, size: %u\n",
+					       fn, sz);
+					err = -ETIME;
+				}
+				i915_request_put(rq);
+				rq = NULL;
+			}
+			if (err)
+				continue;
+
+			ccs_bytes = GET_CCS_BYTES(i915, sz);
+			ccs_bytes_per_chunk = GET_CCS_BYTES(i915, CHUNK_SZ);
+			i915_gem_object_flush_map(obj);
+
+			for (i = 0; !err && i < DIV_ROUND_UP(ccs_bytes, PAGE_SIZE); i++) {
+				int offset = ((i * PAGE_SIZE)  /
+					ccs_bytes_per_chunk) * CHUNK_SZ / sizeof(u32);
+				int ccs_bytes_left = (ccs_bytes - i * PAGE_SIZE) / sizeof(u32);
+				int x = i915_prandom_u32_max_state(min_t(int, 1024,
+									 ccs_bytes_left), prng);
+
+				if (vaddr[offset + x]) {
+					pr_err("%ps ccs clearing failed, offset: %ld/%d\n",
+					       fn, i * PAGE_SIZE + x * sizeof(u32), ccs_bytes);
+					igt_hexdump(vaddr + offset,
+						    min_t(int, 4096,
+							  ccs_bytes_left * sizeof(u32)));
+					err = -EINVAL;
+				}
+			}
+
+			if (err)
+				continue;
+		}
+		i915_gem_object_unpin_map(obj);
+	}
 
-		if (vaddr[x] != sz) {
-			pr_err("%ps failed, size: %u, offset: %zu\n",
-			       fn, sz, x * sizeof(u32));
-			igt_hexdump(vaddr + i * 1024, 4096);
-			err = -EINVAL;
+	if (err) {
+		if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
+			pr_err("%ps failed, size: %u\n", fn, sz);
+		if (rq && err != -EINVAL) {
+			i915_request_wait(rq, 0, HZ);
+			i915_request_put(rq);
 		}
+
+		i915_gem_object_unpin_map(obj);
 	}
 
-	i915_gem_object_unpin_map(obj);
-err_out:
 	i915_gem_object_put(obj);
-
 	return err;
 }
 
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 6/9] drm/i915/selftest_migrate: Check CCS meta data clear
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Extend the live migrate selftest, to verify the ccs surface clearing
during the Flat-CCS capable lmem obj clear.

v2:
  Look at right places for ccs data [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_migrate.c | 250 ++++++++++++++++++---
 1 file changed, 222 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index b5da8b8cd039..8cd9a22054f3 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -132,6 +132,124 @@ static int copy(struct intel_migrate *migrate,
 	return err;
 }
 
+static int intel_context_copy_ccs(struct intel_context *ce,
+				  const struct i915_deps *deps,
+				  struct scatterlist *sg,
+				  enum i915_cache_level cache_level,
+				  bool write_to_ccs,
+				  struct i915_request **out)
+{
+	u8 src_access = write_to_ccs ? DIRECT_ACCESS : INDIRECT_ACCESS;
+	u8 dst_access = write_to_ccs ? INDIRECT_ACCESS : DIRECT_ACCESS;
+	struct sgt_dma it = sg_sgt(sg);
+	struct i915_request *rq;
+	u32 offset;
+	int err;
+
+	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
+	*out = NULL;
+
+	GEM_BUG_ON(ce->ring->size < SZ_64K);
+
+	offset = 0;
+	if (HAS_64K_PAGES(ce->engine->i915))
+		offset = CHUNK_SZ;
+
+	do {
+		int len;
+
+		rq = i915_request_create(ce);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			goto out_ce;
+		}
+
+		if (deps) {
+			err = i915_request_await_deps(rq, deps);
+			if (err)
+				goto out_rq;
+
+			if (rq->engine->emit_init_breadcrumb) {
+				err = rq->engine->emit_init_breadcrumb(rq);
+				if (err)
+					goto out_rq;
+			}
+
+			deps = NULL;
+		}
+
+		/* The PTE updates + clear must not be interrupted. */
+		err = emit_no_arbitration(rq);
+		if (err)
+			goto out_rq;
+
+		len = emit_pte(rq, &it, cache_level, true, offset, CHUNK_SZ);
+		if (len <= 0) {
+			err = len;
+			goto out_rq;
+		}
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+		if (err)
+			goto out_rq;
+
+		err = emit_copy_ccs(rq, offset, dst_access,
+				    offset, src_access, len);
+		if (err)
+			goto out_rq;
+
+		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+
+		/* Arbitration is re-enabled between requests. */
+out_rq:
+		if (*out)
+			i915_request_put(*out);
+		*out = i915_request_get(rq);
+		i915_request_add(rq);
+		if (err || !it.sg || !sg_dma_len(it.sg))
+			break;
+
+		cond_resched();
+	} while (1);
+
+out_ce:
+	return err;
+}
+
+static int
+intel_migrate_ccs_copy(struct intel_migrate *m,
+		       struct i915_gem_ww_ctx *ww,
+		       const struct i915_deps *deps,
+		       struct scatterlist *sg,
+		       enum i915_cache_level cache_level,
+		       bool write_to_ccs,
+		       struct i915_request **out)
+{
+	struct intel_context *ce;
+	int err;
+
+	*out = NULL;
+	if (!m->context)
+		return -ENODEV;
+
+	ce = intel_migrate_create_context(m);
+	if (IS_ERR(ce))
+		ce = intel_context_get(m->context);
+	GEM_BUG_ON(IS_ERR(ce));
+
+	err = intel_context_pin_ww(ce, ww);
+	if (err)
+		goto out;
+
+	err = intel_context_copy_ccs(ce, deps, sg, cache_level,
+				     write_to_ccs, out);
+
+	intel_context_unpin(ce);
+out:
+	intel_context_put(ce);
+	return err;
+}
+
 static int clear(struct intel_migrate *migrate,
 		 int (*fn)(struct intel_migrate *migrate,
 			   struct i915_gem_ww_ctx *ww,
@@ -144,7 +262,8 @@ static int clear(struct intel_migrate *migrate,
 	struct drm_i915_gem_object *obj;
 	struct i915_request *rq;
 	struct i915_gem_ww_ctx ww;
-	u32 *vaddr;
+	u32 *vaddr, val = 0;
+	bool ccs_cap = false;
 	int err = 0;
 	int i;
 
@@ -155,7 +274,12 @@ static int clear(struct intel_migrate *migrate,
 	/* Consider the rounded up memory too */
 	sz = obj->base.size;
 
+	if (HAS_FLAT_CCS(i915) && i915_gem_object_is_lmem(obj))
+		ccs_cap = true;
+
 	for_i915_gem_ww(&ww, err, true) {
+		int ccs_bytes, ccs_bytes_per_chunk;
+
 		err = i915_gem_object_lock(obj, &ww);
 		if (err)
 			continue;
@@ -170,44 +294,114 @@ static int clear(struct intel_migrate *migrate,
 			vaddr[i] = ~i;
 		i915_gem_object_flush_map(obj);
 
-		err = fn(migrate, &ww, obj, sz, &rq);
-		if (!err)
-			continue;
+		if (ccs_cap && !val) {
+			/* Write the obj data into ccs surface */
+			err = intel_migrate_ccs_copy(migrate, &ww, NULL,
+						     obj->mm.pages->sgl,
+						     obj->cache_level,
+						     true, &rq);
+			if (rq && !err) {
+				if (i915_request_wait(rq, 0, HZ) < 0) {
+					pr_err("%ps timed out, size: %u\n",
+					       fn, sz);
+					err = -ETIME;
+				}
+				i915_request_put(rq);
+				rq = NULL;
+			}
+			if (err)
+				continue;
+		}
 
-		if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
-			pr_err("%ps failed, size: %u\n", fn, sz);
-		if (rq) {
-			i915_request_wait(rq, 0, HZ);
+		err = fn(migrate, &ww, obj, val, &rq);
+		if (rq && !err) {
+			if (i915_request_wait(rq, 0, HZ) < 0) {
+				pr_err("%ps timed out, size: %u\n", fn, sz);
+				err = -ETIME;
+			}
 			i915_request_put(rq);
+			rq = NULL;
 		}
-		i915_gem_object_unpin_map(obj);
-	}
-	if (err)
-		goto err_out;
+		if (err)
+			continue;
 
-	if (rq) {
-		if (i915_request_wait(rq, 0, HZ) < 0) {
-			pr_err("%ps timed out, size: %u\n", fn, sz);
-			err = -ETIME;
+		i915_gem_object_flush_map(obj);
+
+		/* Verify the set/clear of the obj mem */
+		for (i = 0; !err && i < sz / PAGE_SIZE; i++) {
+			int x = i * 1024 +
+				i915_prandom_u32_max_state(1024, prng);
+
+			if (vaddr[x] != val) {
+				pr_err("%ps failed, (%u != %u), offset: %zu\n",
+				       fn, vaddr[x], val,  x * sizeof(u32));
+				igt_hexdump(vaddr + i * 1024, 4096);
+				err = -EINVAL;
+			}
 		}
-		i915_request_put(rq);
-	}
+		if (err)
+			continue;
 
-	for (i = 0; !err && i < sz / PAGE_SIZE; i++) {
-		int x = i * 1024 + i915_prandom_u32_max_state(1024, prng);
+		if (ccs_cap && !val) {
+			for (i = 0; i < sz / sizeof(u32); i++)
+				vaddr[i] = ~i;
+			i915_gem_object_flush_map(obj);
+
+			err = intel_migrate_ccs_copy(migrate, &ww, NULL,
+						     obj->mm.pages->sgl,
+						     obj->cache_level,
+						     false, &rq);
+			if (rq && !err) {
+				if (i915_request_wait(rq, 0, HZ) < 0) {
+					pr_err("%ps timed out, size: %u\n",
+					       fn, sz);
+					err = -ETIME;
+				}
+				i915_request_put(rq);
+				rq = NULL;
+			}
+			if (err)
+				continue;
+
+			ccs_bytes = GET_CCS_BYTES(i915, sz);
+			ccs_bytes_per_chunk = GET_CCS_BYTES(i915, CHUNK_SZ);
+			i915_gem_object_flush_map(obj);
+
+			for (i = 0; !err && i < DIV_ROUND_UP(ccs_bytes, PAGE_SIZE); i++) {
+				int offset = ((i * PAGE_SIZE)  /
+					ccs_bytes_per_chunk) * CHUNK_SZ / sizeof(u32);
+				int ccs_bytes_left = (ccs_bytes - i * PAGE_SIZE) / sizeof(u32);
+				int x = i915_prandom_u32_max_state(min_t(int, 1024,
+									 ccs_bytes_left), prng);
+
+				if (vaddr[offset + x]) {
+					pr_err("%ps ccs clearing failed, offset: %ld/%d\n",
+					       fn, i * PAGE_SIZE + x * sizeof(u32), ccs_bytes);
+					igt_hexdump(vaddr + offset,
+						    min_t(int, 4096,
+							  ccs_bytes_left * sizeof(u32)));
+					err = -EINVAL;
+				}
+			}
+
+			if (err)
+				continue;
+		}
+		i915_gem_object_unpin_map(obj);
+	}
 
-		if (vaddr[x] != sz) {
-			pr_err("%ps failed, size: %u, offset: %zu\n",
-			       fn, sz, x * sizeof(u32));
-			igt_hexdump(vaddr + i * 1024, 4096);
-			err = -EINVAL;
+	if (err) {
+		if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
+			pr_err("%ps failed, size: %u\n", fn, sz);
+		if (rq && err != -EINVAL) {
+			i915_request_wait(rq, 0, HZ);
+			i915_request_put(rq);
 		}
+
+		i915_gem_object_unpin_map(obj);
 	}
 
-	i915_gem_object_unpin_map(obj);
-err_out:
 	i915_gem_object_put(obj);
-
 	return err;
 }
 
-- 
2.20.1


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

* [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
driver needs extra pages in ttm_tt.

v2:
  Used imperative wording [Thomas and Christian]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Christian Koenig <christian.koenig@amd.com>
cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
 drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
 drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
 drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
 include/drm/ttm/ttm_tt.h                   |  4 +++-
 7 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index dc7f938bfff2..123045b58fec 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
 	if (!tt)
 		return NULL;
 
-	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
+	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
 	if (ret < 0)
 		goto err_ttm_tt_init;
 
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index c40aca99442f..a878910a563c 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 		i915_tt->is_shmem = true;
 	}
 
-	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
 	if (ret)
 		goto err_free;
 
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 95df5750f47f..9ba871bd19b1 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
 	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
 	if (ttm == NULL)
 		return NULL;
-	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
+	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
 		kfree(ttm);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 6ddc16f0fe2b..d27691f2e451 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
 	agp_be->mem = NULL;
 	agp_be->bridge = bridge;
 
-	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
+	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
 		kfree(agp_be);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index d234aab800a0..1a66d9fc589a 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
 static void ttm_tt_init_fields(struct ttm_tt *ttm,
 			       struct ttm_buffer_object *bo,
 			       uint32_t page_flags,
-			       enum ttm_caching caching)
+			       enum ttm_caching caching,
+			       unsigned long extra_pages)
 {
-	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
+	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
 	ttm->caching = ttm_cached;
 	ttm->page_flags = page_flags;
 	ttm->dma_address = NULL;
@@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
 }
 
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching)
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages)
 {
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
 
 	if (ttm_tt_alloc_page_directory(ttm)) {
 		pr_err("Failed allocating page table\n");
@@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
 {
 	int ret;
 
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
 
 	if (page_flags & TTM_TT_FLAG_EXTERNAL)
 		ret = ttm_sg_tt_alloc_page_directory(ttm);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index b84ecc6d6611..4e3938e62c08 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
 				     ttm_cached);
 	else
 		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
-				  ttm_cached);
+				  ttm_cached, 0);
 	if (unlikely(ret != 0))
 		goto out_no_init;
 
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index f20832139815..17a0310e8aaa 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * @bo: The buffer object we create the ttm for.
  * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
  * @caching: the desired caching state of the pages
+ * @extra_pages: Extra pages needed for the driver.
  *
  * Create a struct ttm_tt to back data with system memory pages.
  * No pages are actually allocated.
@@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * NULL: Out of memory.
  */
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching);
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages);
 int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
 		   uint32_t page_flags, enum ttm_caching caching);
 
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
driver needs extra pages in ttm_tt.

v2:
  Used imperative wording [Thomas and Christian]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Christian Koenig <christian.koenig@amd.com>
cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
 drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
 drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
 drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
 include/drm/ttm/ttm_tt.h                   |  4 +++-
 7 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index dc7f938bfff2..123045b58fec 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
 	if (!tt)
 		return NULL;
 
-	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
+	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
 	if (ret < 0)
 		goto err_ttm_tt_init;
 
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index c40aca99442f..a878910a563c 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 		i915_tt->is_shmem = true;
 	}
 
-	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
 	if (ret)
 		goto err_free;
 
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 95df5750f47f..9ba871bd19b1 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
 	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
 	if (ttm == NULL)
 		return NULL;
-	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
+	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
 		kfree(ttm);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 6ddc16f0fe2b..d27691f2e451 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
 	agp_be->mem = NULL;
 	agp_be->bridge = bridge;
 
-	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
+	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
 		kfree(agp_be);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index d234aab800a0..1a66d9fc589a 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
 static void ttm_tt_init_fields(struct ttm_tt *ttm,
 			       struct ttm_buffer_object *bo,
 			       uint32_t page_flags,
-			       enum ttm_caching caching)
+			       enum ttm_caching caching,
+			       unsigned long extra_pages)
 {
-	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
+	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
 	ttm->caching = ttm_cached;
 	ttm->page_flags = page_flags;
 	ttm->dma_address = NULL;
@@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
 }
 
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching)
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages)
 {
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
 
 	if (ttm_tt_alloc_page_directory(ttm)) {
 		pr_err("Failed allocating page table\n");
@@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
 {
 	int ret;
 
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
 
 	if (page_flags & TTM_TT_FLAG_EXTERNAL)
 		ret = ttm_sg_tt_alloc_page_directory(ttm);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index b84ecc6d6611..4e3938e62c08 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
 				     ttm_cached);
 	else
 		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
-				  ttm_cached);
+				  ttm_cached, 0);
 	if (unlikely(ret != 0))
 		goto out_no_init;
 
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index f20832139815..17a0310e8aaa 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * @bo: The buffer object we create the ttm for.
  * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
  * @caching: the desired caching state of the pages
+ * @extra_pages: Extra pages needed for the driver.
  *
  * Create a struct ttm_tt to back data with system memory pages.
  * No pages are actually allocated.
@@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * NULL: Out of memory.
  */
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching);
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages);
 int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
 		   uint32_t page_flags, enum ttm_caching caching);
 
-- 
2.20.1


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

* [PATCH v7 8/9] drm/i915/gem: Add extra pages in ttm_tt for ccs data
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

On Xe-HP and later devices, dedicated compression control state (CCS)
stored in local memory is used for each surface, to support the
3D and media compression formats.

The memory required for the CCS of the entire local memory is 1/256 of
the local memory size. So before the kernel boot, the required memory
is reserved for the CCS data and a secure register will be programmed
with the CCS base address

So when an object is allocated in local memory, dont need to explicitly
allocate the space for ccs data. But when the obj is evicted into the
smem, to hold the compression related data along with the obj extra space
is needed in smem. i.e obj_size + (obj_size/256).

Hence when a smem pages are allocated for an obj with lmem placement
possibility we create with the extra pages required for the ccs data for
the obj size.

v2:
  Used imperative wording [Thomas]
v3:
  Inflate the pages only when obj's placement is lmem only
v4:
  GEM_BUG_ON if the ttm->num_pages > obj page size [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Christian Koenig <christian.koenig@amd.com>
cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 30 ++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index a878910a563c..4c25d9b2f138 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -20,6 +20,7 @@
 #include "gem/i915_gem_ttm.h"
 #include "gem/i915_gem_ttm_move.h"
 #include "gem/i915_gem_ttm_pm.h"
+#include "gt/intel_gpu_commands.h"
 
 #define I915_TTM_PRIO_PURGE     0
 #define I915_TTM_PRIO_NO_PAGES  1
@@ -265,12 +266,33 @@ static const struct i915_refct_sgt_ops tt_rsgt_ops = {
 	.release = i915_ttm_tt_release
 };
 
+static inline bool
+i915_gem_object_needs_ccs_pages(struct drm_i915_gem_object *obj)
+{
+	bool lmem_placement = false;
+	int i;
+
+	for (i = 0; i < obj->mm.n_placements; i++) {
+		/* Compression is not allowed for the objects with smem placement */
+		if (obj->mm.placements[i]->type == INTEL_MEMORY_SYSTEM)
+			return false;
+		if (!lmem_placement &&
+		    obj->mm.placements[i]->type == INTEL_MEMORY_LOCAL)
+			lmem_placement = true;
+	}
+
+	return lmem_placement;
+}
+
 static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 					 uint32_t page_flags)
 {
+	struct drm_i915_private *i915 = container_of(bo->bdev, typeof(*i915),
+						     bdev);
 	struct ttm_resource_manager *man =
 		ttm_manager_type(bo->bdev, bo->resource->mem_type);
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
+	unsigned long ccs_pages = 0;
 	enum ttm_caching caching;
 	struct i915_ttm_tt *i915_tt;
 	int ret;
@@ -293,7 +315,12 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 		i915_tt->is_shmem = true;
 	}
 
-	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
+	if (HAS_FLAT_CCS(i915) && i915_gem_object_needs_ccs_pages(obj))
+		ccs_pages = DIV_ROUND_UP(DIV_ROUND_UP(bo->base.size,
+						      NUM_BYTES_PER_CCS_BYTE),
+					 PAGE_SIZE);
+
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, ccs_pages);
 	if (ret)
 		goto err_free;
 
@@ -773,6 +800,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
 					    i915_sg_dma_sizes(rsgt->table.sgl));
 	}
 
+	GEM_BUG_ON(bo->ttm && ((obj->base.size >> PAGE_SHIFT) < bo->ttm->num_pages));
 	i915_ttm_adjust_lru(obj);
 	return ret;
 }
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 8/9] drm/i915/gem: Add extra pages in ttm_tt for ccs data
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

On Xe-HP and later devices, dedicated compression control state (CCS)
stored in local memory is used for each surface, to support the
3D and media compression formats.

The memory required for the CCS of the entire local memory is 1/256 of
the local memory size. So before the kernel boot, the required memory
is reserved for the CCS data and a secure register will be programmed
with the CCS base address

So when an object is allocated in local memory, dont need to explicitly
allocate the space for ccs data. But when the obj is evicted into the
smem, to hold the compression related data along with the obj extra space
is needed in smem. i.e obj_size + (obj_size/256).

Hence when a smem pages are allocated for an obj with lmem placement
possibility we create with the extra pages required for the ccs data for
the obj size.

v2:
  Used imperative wording [Thomas]
v3:
  Inflate the pages only when obj's placement is lmem only
v4:
  GEM_BUG_ON if the ttm->num_pages > obj page size [Thomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Christian Koenig <christian.koenig@amd.com>
cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 30 ++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index a878910a563c..4c25d9b2f138 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -20,6 +20,7 @@
 #include "gem/i915_gem_ttm.h"
 #include "gem/i915_gem_ttm_move.h"
 #include "gem/i915_gem_ttm_pm.h"
+#include "gt/intel_gpu_commands.h"
 
 #define I915_TTM_PRIO_PURGE     0
 #define I915_TTM_PRIO_NO_PAGES  1
@@ -265,12 +266,33 @@ static const struct i915_refct_sgt_ops tt_rsgt_ops = {
 	.release = i915_ttm_tt_release
 };
 
+static inline bool
+i915_gem_object_needs_ccs_pages(struct drm_i915_gem_object *obj)
+{
+	bool lmem_placement = false;
+	int i;
+
+	for (i = 0; i < obj->mm.n_placements; i++) {
+		/* Compression is not allowed for the objects with smem placement */
+		if (obj->mm.placements[i]->type == INTEL_MEMORY_SYSTEM)
+			return false;
+		if (!lmem_placement &&
+		    obj->mm.placements[i]->type == INTEL_MEMORY_LOCAL)
+			lmem_placement = true;
+	}
+
+	return lmem_placement;
+}
+
 static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 					 uint32_t page_flags)
 {
+	struct drm_i915_private *i915 = container_of(bo->bdev, typeof(*i915),
+						     bdev);
 	struct ttm_resource_manager *man =
 		ttm_manager_type(bo->bdev, bo->resource->mem_type);
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
+	unsigned long ccs_pages = 0;
 	enum ttm_caching caching;
 	struct i915_ttm_tt *i915_tt;
 	int ret;
@@ -293,7 +315,12 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 		i915_tt->is_shmem = true;
 	}
 
-	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
+	if (HAS_FLAT_CCS(i915) && i915_gem_object_needs_ccs_pages(obj))
+		ccs_pages = DIV_ROUND_UP(DIV_ROUND_UP(bo->base.size,
+						      NUM_BYTES_PER_CCS_BYTE),
+					 PAGE_SIZE);
+
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, ccs_pages);
 	if (ret)
 		goto err_free;
 
@@ -773,6 +800,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
 					    i915_sg_dma_sizes(rsgt->table.sgl));
 	}
 
+	GEM_BUG_ON(bo->ttm && ((obj->base.size >> PAGE_SHIFT) < bo->ttm->num_pages));
 	i915_ttm_adjust_lru(obj);
 	return ret;
 }
-- 
2.20.1


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

* [PATCH v7 9/9] drm/i915/migrate: Evict and restore the flatccs capable lmem obj
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 12:37   ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

When we are swapping out the local memory obj on flat-ccs capable platform,
we need to capture the ccs data too along with main meory and we need to
restore it when we are swapping in the content.

When lmem object is swapped into a smem obj, smem obj will
have the extra pages required to hold the ccs data corresponding to the
lmem main memory. So main memory of lmem will be copied into the initial
pages of the smem and then ccs data corresponding to the main memory
will be copied to the subsequent pages of smem. ccs data is 1/256 of
lmem size.

Swapin happens exactly in reverse order. First main memory of lmem is
restored from the smem's initial pages and the ccs data will be restored
from the subsequent pages of smem.

Extracting and restoring the CCS data is done through a special cmd called
XY_CTRL_SURF_COPY_BLT

v2: Fixing the ccs handling
v3: Handle the ccs data at same loop as main memory [Thomas]
v4: changes for emit_copy_ccs
v5: handle non-flat-ccs scenario

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 164 +++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index a44f2d29da4e..ec417c84600b 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -633,6 +633,65 @@ static int emit_copy(struct i915_request *rq,
 	return 0;
 }
 
+static int scatter_list_length(struct scatterlist *sg)
+{
+	int len = 0;
+
+	while (sg && sg_dma_len(sg)) {
+		len += sg_dma_len(sg);
+		sg = sg_next(sg);
+	};
+
+	return len;
+}
+
+static void
+calculate_chunk_sz(struct drm_i915_private *i915, bool src_is_lmem,
+		   int *src_sz, int *ccs_sz, u32 bytes_to_cpy,
+		   u32 ccs_bytes_to_cpy)
+{
+	if (ccs_bytes_to_cpy) {
+		/*
+		 * We can only copy the ccs data corresponding to
+		 * the CHUNK_SZ of lmem which is
+		 * GET_CCS_BYTES(i915, CHUNK_SZ))
+		 */
+		*ccs_sz = min_t(int, ccs_bytes_to_cpy, GET_CCS_BYTES(i915, CHUNK_SZ));
+
+		if (!src_is_lmem)
+			/*
+			 * When CHUNK_SZ is passed all the pages upto CHUNK_SZ
+			 * will be taken for the blt. in Flat-ccs supported
+			 * platform Smem obj will have more pages than required
+			 * for main meory hence limit it to the required size
+			 * for main memory
+			 */
+			*src_sz = min_t(int, bytes_to_cpy, CHUNK_SZ);
+	} else { /* ccs handling is not required */
+		*src_sz = CHUNK_SZ;
+	}
+}
+
+static void get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)
+{
+	u32 len;
+
+	do {
+		GEM_BUG_ON(!it->sg || !sg_dma_len(it->sg));
+		len = it->max - it->dma;
+		if (len > bytes_to_cpy) {
+			it->dma += bytes_to_cpy;
+			break;
+		}
+
+		bytes_to_cpy -= len;
+
+		it->sg = __sg_next(it->sg);
+		it->dma = sg_dma_address(it->sg);
+		it->max = it->dma + sg_dma_len(it->sg);
+	} while (bytes_to_cpy);
+}
+
 int
 intel_context_migrate_copy(struct intel_context *ce,
 			   const struct i915_deps *deps,
@@ -644,9 +703,15 @@ intel_context_migrate_copy(struct intel_context *ce,
 			   bool dst_is_lmem,
 			   struct i915_request **out)
 {
-	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
+	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst), it_ccs;
+	struct drm_i915_private *i915 = ce->engine->i915;
+	u32 ccs_bytes_to_cpy = 0, bytes_to_cpy;
+	enum i915_cache_level ccs_cache_level;
+	int src_sz, dst_sz, ccs_sz;
 	u32 src_offset, dst_offset;
+	u8 src_access, dst_access;
 	struct i915_request *rq;
+	bool ccs_is_src;
 	int err;
 
 	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
@@ -655,6 +720,38 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	src_sz = scatter_list_length(src);
+	bytes_to_cpy = src_sz;
+
+	if (HAS_FLAT_CCS(i915) && src_is_lmem ^ dst_is_lmem) {
+		src_access = !src_is_lmem && dst_is_lmem;
+		dst_access = !src_access;
+
+		dst_sz = scatter_list_length(dst);
+		if (src_is_lmem) {
+			it_ccs = it_dst;
+			ccs_cache_level = dst_cache_level;
+			ccs_is_src = false;
+		} else if (dst_is_lmem) {
+			bytes_to_cpy = dst_sz;
+			it_ccs = it_src;
+			ccs_cache_level = src_cache_level;
+			ccs_is_src = true;
+		}
+
+		/*
+		 * When there is a eviction of ccs needed smem will have the
+		 * extra pages for the ccs data
+		 *
+		 * TO-DO: Want to move the size mismatch check to a WARN_ON,
+		 * but still we have some requests of smem->lmem with same size.
+		 * Need to fix it.
+		 */
+		ccs_bytes_to_cpy = src_sz != dst_sz ? GET_CCS_BYTES(i915, bytes_to_cpy) : 0;
+		if (ccs_bytes_to_cpy)
+			get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
+	}
+
 	src_offset = 0;
 	dst_offset = CHUNK_SZ;
 	if (HAS_64K_PAGES(ce->engine->i915)) {
@@ -694,8 +791,11 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
+		calculate_chunk_sz(i915, src_is_lmem, &src_sz, &ccs_sz,
+				   bytes_to_cpy, ccs_bytes_to_cpy);
+
 		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
-			       src_offset, CHUNK_SZ);
+			       src_offset, src_sz);
 		if (len <= 0) {
 			err = len;
 			goto out_rq;
@@ -712,7 +812,46 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		err = emit_copy(rq, dst_offset, src_offset, len);
+		err = emit_copy(rq, dst_offset,	src_offset, len);
+		if (err)
+			goto out_rq;
+
+		bytes_to_cpy -= len;
+
+		if (ccs_bytes_to_cpy) {
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			err = emit_pte(rq, &it_ccs, ccs_cache_level, false,
+				       ccs_is_src ? src_offset : dst_offset,
+				       ccs_sz);
+
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			/*
+			 * Using max of src_sz and dst_sz, as we need to
+			 * pass the lmem size corresponding to the ccs
+			 * blocks we need to handle.
+			 */
+			ccs_sz = max_t(int, ccs_is_src ? ccs_sz : src_sz,
+				       ccs_is_src ? dst_sz : ccs_sz);
+
+			err = emit_copy_ccs(rq, dst_offset, dst_access,
+					    src_offset, src_access, ccs_sz);
+			if (err)
+				goto out_rq;
+
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			/* Converting back to ccs bytes */
+			ccs_sz = GET_CCS_BYTES(rq->engine->i915, ccs_sz);
+			ccs_bytes_to_cpy -= ccs_sz;
+		}
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
@@ -720,9 +859,26 @@ intel_context_migrate_copy(struct intel_context *ce,
 			i915_request_put(*out);
 		*out = i915_request_get(rq);
 		i915_request_add(rq);
-		if (err || !it_src.sg || !sg_dma_len(it_src.sg))
+
+		if (err)
 			break;
 
+		if (!bytes_to_cpy && !ccs_bytes_to_cpy) {
+			if (src_is_lmem)
+				WARN_ON(it_src.sg && sg_dma_len(it_src.sg));
+			else
+				WARN_ON(it_dst.sg && sg_dma_len(it_dst.sg));
+			break;
+		}
+
+		if (WARN_ON(!it_src.sg || !sg_dma_len(it_src.sg) ||
+			    !it_dst.sg || !sg_dma_len(it_dst.sg) ||
+			    (ccs_bytes_to_cpy && (!it_ccs.sg ||
+						  !sg_dma_len(it_ccs.sg))))) {
+			err = -EINVAL;
+			break;
+		}
+
 		cond_resched();
 	} while (1);
 
-- 
2.20.1


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

* [Intel-gfx] [PATCH v7 9/9] drm/i915/migrate: Evict and restore the flatccs capable lmem obj
@ 2022-04-01 12:37   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 12:37 UTC (permalink / raw)
  To: intel-gfx, dri-devel

When we are swapping out the local memory obj on flat-ccs capable platform,
we need to capture the ccs data too along with main meory and we need to
restore it when we are swapping in the content.

When lmem object is swapped into a smem obj, smem obj will
have the extra pages required to hold the ccs data corresponding to the
lmem main memory. So main memory of lmem will be copied into the initial
pages of the smem and then ccs data corresponding to the main memory
will be copied to the subsequent pages of smem. ccs data is 1/256 of
lmem size.

Swapin happens exactly in reverse order. First main memory of lmem is
restored from the smem's initial pages and the ccs data will be restored
from the subsequent pages of smem.

Extracting and restoring the CCS data is done through a special cmd called
XY_CTRL_SURF_COPY_BLT

v2: Fixing the ccs handling
v3: Handle the ccs data at same loop as main memory [Thomas]
v4: changes for emit_copy_ccs
v5: handle non-flat-ccs scenario

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 164 +++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index a44f2d29da4e..ec417c84600b 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -633,6 +633,65 @@ static int emit_copy(struct i915_request *rq,
 	return 0;
 }
 
+static int scatter_list_length(struct scatterlist *sg)
+{
+	int len = 0;
+
+	while (sg && sg_dma_len(sg)) {
+		len += sg_dma_len(sg);
+		sg = sg_next(sg);
+	};
+
+	return len;
+}
+
+static void
+calculate_chunk_sz(struct drm_i915_private *i915, bool src_is_lmem,
+		   int *src_sz, int *ccs_sz, u32 bytes_to_cpy,
+		   u32 ccs_bytes_to_cpy)
+{
+	if (ccs_bytes_to_cpy) {
+		/*
+		 * We can only copy the ccs data corresponding to
+		 * the CHUNK_SZ of lmem which is
+		 * GET_CCS_BYTES(i915, CHUNK_SZ))
+		 */
+		*ccs_sz = min_t(int, ccs_bytes_to_cpy, GET_CCS_BYTES(i915, CHUNK_SZ));
+
+		if (!src_is_lmem)
+			/*
+			 * When CHUNK_SZ is passed all the pages upto CHUNK_SZ
+			 * will be taken for the blt. in Flat-ccs supported
+			 * platform Smem obj will have more pages than required
+			 * for main meory hence limit it to the required size
+			 * for main memory
+			 */
+			*src_sz = min_t(int, bytes_to_cpy, CHUNK_SZ);
+	} else { /* ccs handling is not required */
+		*src_sz = CHUNK_SZ;
+	}
+}
+
+static void get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)
+{
+	u32 len;
+
+	do {
+		GEM_BUG_ON(!it->sg || !sg_dma_len(it->sg));
+		len = it->max - it->dma;
+		if (len > bytes_to_cpy) {
+			it->dma += bytes_to_cpy;
+			break;
+		}
+
+		bytes_to_cpy -= len;
+
+		it->sg = __sg_next(it->sg);
+		it->dma = sg_dma_address(it->sg);
+		it->max = it->dma + sg_dma_len(it->sg);
+	} while (bytes_to_cpy);
+}
+
 int
 intel_context_migrate_copy(struct intel_context *ce,
 			   const struct i915_deps *deps,
@@ -644,9 +703,15 @@ intel_context_migrate_copy(struct intel_context *ce,
 			   bool dst_is_lmem,
 			   struct i915_request **out)
 {
-	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
+	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst), it_ccs;
+	struct drm_i915_private *i915 = ce->engine->i915;
+	u32 ccs_bytes_to_cpy = 0, bytes_to_cpy;
+	enum i915_cache_level ccs_cache_level;
+	int src_sz, dst_sz, ccs_sz;
 	u32 src_offset, dst_offset;
+	u8 src_access, dst_access;
 	struct i915_request *rq;
+	bool ccs_is_src;
 	int err;
 
 	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
@@ -655,6 +720,38 @@ intel_context_migrate_copy(struct intel_context *ce,
 
 	GEM_BUG_ON(ce->ring->size < SZ_64K);
 
+	src_sz = scatter_list_length(src);
+	bytes_to_cpy = src_sz;
+
+	if (HAS_FLAT_CCS(i915) && src_is_lmem ^ dst_is_lmem) {
+		src_access = !src_is_lmem && dst_is_lmem;
+		dst_access = !src_access;
+
+		dst_sz = scatter_list_length(dst);
+		if (src_is_lmem) {
+			it_ccs = it_dst;
+			ccs_cache_level = dst_cache_level;
+			ccs_is_src = false;
+		} else if (dst_is_lmem) {
+			bytes_to_cpy = dst_sz;
+			it_ccs = it_src;
+			ccs_cache_level = src_cache_level;
+			ccs_is_src = true;
+		}
+
+		/*
+		 * When there is a eviction of ccs needed smem will have the
+		 * extra pages for the ccs data
+		 *
+		 * TO-DO: Want to move the size mismatch check to a WARN_ON,
+		 * but still we have some requests of smem->lmem with same size.
+		 * Need to fix it.
+		 */
+		ccs_bytes_to_cpy = src_sz != dst_sz ? GET_CCS_BYTES(i915, bytes_to_cpy) : 0;
+		if (ccs_bytes_to_cpy)
+			get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
+	}
+
 	src_offset = 0;
 	dst_offset = CHUNK_SZ;
 	if (HAS_64K_PAGES(ce->engine->i915)) {
@@ -694,8 +791,11 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
+		calculate_chunk_sz(i915, src_is_lmem, &src_sz, &ccs_sz,
+				   bytes_to_cpy, ccs_bytes_to_cpy);
+
 		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
-			       src_offset, CHUNK_SZ);
+			       src_offset, src_sz);
 		if (len <= 0) {
 			err = len;
 			goto out_rq;
@@ -712,7 +812,46 @@ intel_context_migrate_copy(struct intel_context *ce,
 		if (err)
 			goto out_rq;
 
-		err = emit_copy(rq, dst_offset, src_offset, len);
+		err = emit_copy(rq, dst_offset,	src_offset, len);
+		if (err)
+			goto out_rq;
+
+		bytes_to_cpy -= len;
+
+		if (ccs_bytes_to_cpy) {
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			err = emit_pte(rq, &it_ccs, ccs_cache_level, false,
+				       ccs_is_src ? src_offset : dst_offset,
+				       ccs_sz);
+
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			/*
+			 * Using max of src_sz and dst_sz, as we need to
+			 * pass the lmem size corresponding to the ccs
+			 * blocks we need to handle.
+			 */
+			ccs_sz = max_t(int, ccs_is_src ? ccs_sz : src_sz,
+				       ccs_is_src ? dst_sz : ccs_sz);
+
+			err = emit_copy_ccs(rq, dst_offset, dst_access,
+					    src_offset, src_access, ccs_sz);
+			if (err)
+				goto out_rq;
+
+			err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
+			if (err)
+				goto out_rq;
+
+			/* Converting back to ccs bytes */
+			ccs_sz = GET_CCS_BYTES(rq->engine->i915, ccs_sz);
+			ccs_bytes_to_cpy -= ccs_sz;
+		}
 
 		/* Arbitration is re-enabled between requests. */
 out_rq:
@@ -720,9 +859,26 @@ intel_context_migrate_copy(struct intel_context *ce,
 			i915_request_put(*out);
 		*out = i915_request_get(rq);
 		i915_request_add(rq);
-		if (err || !it_src.sg || !sg_dma_len(it_src.sg))
+
+		if (err)
 			break;
 
+		if (!bytes_to_cpy && !ccs_bytes_to_cpy) {
+			if (src_is_lmem)
+				WARN_ON(it_src.sg && sg_dma_len(it_src.sg));
+			else
+				WARN_ON(it_dst.sg && sg_dma_len(it_dst.sg));
+			break;
+		}
+
+		if (WARN_ON(!it_src.sg || !sg_dma_len(it_src.sg) ||
+			    !it_dst.sg || !sg_dma_len(it_dst.sg) ||
+			    (ccs_bytes_to_cpy && (!it_ccs.sg ||
+						  !sg_dma_len(it_ccs.sg))))) {
+			err = -EINVAL;
+			break;
+		}
+
 		cond_resched();
 	} while (1);
 
-- 
2.20.1


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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/ttm: Evict and restore of compressed object (rev7)
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
                   ` (9 preceding siblings ...)
  (?)
@ 2022-04-01 13:42 ` Patchwork
  -1 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2022-04-01 13:42 UTC (permalink / raw)
  To: Ramalingam C; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/ttm: Evict and restore of compressed object (rev7)
URL   : https://patchwork.freedesktop.org/series/101106/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c7781263ce21 drm/i915/gt: use engine instance directly for offset
4b35aa78c844 drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
cd1f1f11df1b drm/i915/gt: Optimize the migration and clear loop
de8e6525e810 drm/i915/gt: Clear compress metadata for Flat-ccs objects
-:44: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#44: FILE: drivers/gpu/drm/i915/gt/intel_gpu_commands.h:157:
+#define   MI_FLUSH_DW_CCS		(1<<16)
                          		  ^

-:47: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#47: FILE: drivers/gpu/drm/i915/gt/intel_gpu_commands.h:160:
+#define   MI_FLUSH_DW_LLC		(1<<9)
                          		  ^

total: 0 errors, 0 warnings, 2 checks, 197 lines checked
c00c4ecd5d06 drm/i915/selftest_migrate: Consider the possible roundup of size
886c492b3dfa drm/i915/selftest_migrate: Check CCS meta data clear
b875586d6ccb drm/ttm: Add a parameter to add extra pages into ttm_tt
-:93: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#93: FILE: drivers/gpu/drm/ttm/ttm_tt.c:150:
+		uint32_t page_flags, enum ttm_caching caching,

-:140: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#140: FILE: include/drm/ttm/ttm_tt.h:151:
+		uint32_t page_flags, enum ttm_caching caching,

total: 0 errors, 0 warnings, 2 checks, 88 lines checked
b88b5b478be0 drm/i915/gem: Add extra pages in ttm_tt for ccs data
e893bdce4102 drm/i915/migrate: Evict and restore the flatccs capable lmem obj



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

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Evict and restore of compressed object (rev7)
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
                   ` (10 preceding siblings ...)
  (?)
@ 2022-04-01 13:43 ` Patchwork
  -1 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2022-04-01 13:43 UTC (permalink / raw)
  To: Ramalingam C; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/ttm: Evict and restore of compressed object (rev7)
URL   : https://patchwork.freedesktop.org/series/101106/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.



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

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/ttm: Evict and restore of compressed object (rev7)
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
                   ` (11 preceding siblings ...)
  (?)
@ 2022-04-01 14:12 ` Patchwork
  -1 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2022-04-01 14:12 UTC (permalink / raw)
  To: Ramalingam C; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 10556 bytes --]

== Series Details ==

Series: drm/i915/ttm: Evict and restore of compressed object (rev7)
URL   : https://patchwork.freedesktop.org/series/101106/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11438 -> Patchwork_22758
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 41)
------------------------------

  Additional (4): bat-adlm-1 fi-icl-u2 fi-kbl-guc fi-kbl-8809g 
  Missing    (5): fi-kbl-soraka shard-tglu fi-bsw-cyan bat-rpls-2 fi-bdw-samus 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
    - fi-icl-u2:          NOTRUN -> [SKIP][1] ([fdo#109315]) +17 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@amdgpu/amd_cs_nop@fork-gfx0.html

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

  * igt@gem_exec_fence@basic-busy@bcs0:
    - fi-kbl-guc:         NOTRUN -> [SKIP][3] ([fdo#109271]) +18 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-guc/igt@gem_exec_fence@basic-busy@bcs0.html

  * igt@gem_exec_suspend@basic-s0@smem:
    - fi-kbl-8809g:       NOTRUN -> [DMESG-WARN][4] ([i915#4962]) +1 similar issue
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@gem_exec_suspend@basic-s0@smem.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#2190])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@gem_huc_copy@huc-copy.html
    - fi-icl-u2:          NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@gem_huc_copy@huc-copy.html

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

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-icl-u2:          NOTRUN -> [SKIP][8] ([i915#4613]) +3 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_lmem_swapping@random-engines:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613]) +3 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@gem_lmem_swapping@random-engines.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [PASS][10] -> [INCOMPLETE][11] ([i915#4785])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html

  * igt@kms_busy@basic:
    - fi-kbl-guc:         NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#1845])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-guc/igt@kms_busy@basic.html

  * igt@kms_chamelium@hdmi-edid-read:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][13] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          NOTRUN -> [SKIP][14] ([fdo#111827]) +8 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_chamelium@vga-hpd-fast:
    - fi-kbl-guc:         NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-guc/igt@kms_chamelium@vga-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-icl-u2:          NOTRUN -> [SKIP][16] ([fdo#109278]) +2 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
    - fi-tgl-u2:          [PASS][17] -> [DMESG-WARN][18] ([i915#402])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-icl-u2:          NOTRUN -> [SKIP][19] ([fdo#109285])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#5341])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#533])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-kbl-8809g/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

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

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-icl-u2:          NOTRUN -> [SKIP][23] ([i915#3555])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-userptr:
    - fi-icl-u2:          NOTRUN -> [SKIP][24] ([i915#3301])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-icl-u2/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-hsw-4770:        NOTRUN -> [FAIL][25] ([fdo#109271] / [i915#1436] / [i915#2722] / [i915#4312])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-hsw-4770/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - fi-snb-2600:        [INCOMPLETE][26] ([i915#3921]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_flip@basic-flip-vs-modeset@a-edp1:
    - fi-tgl-u2:          [DMESG-WARN][28] ([i915#402]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/fi-tgl-u2/igt@kms_flip@basic-flip-vs-modeset@a-edp1.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/fi-tgl-u2/igt@kms_flip@basic-flip-vs-modeset@a-edp1.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#4962]: https://gitlab.freedesktop.org/drm/intel/issues/4962
  [i915#5193]: https://gitlab.freedesktop.org/drm/intel/issues/5193
  [i915#5306]: https://gitlab.freedesktop.org/drm/intel/issues/5306
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5341]: https://gitlab.freedesktop.org/drm/intel/issues/5341
  [i915#5482]: https://gitlab.freedesktop.org/drm/intel/issues/5482


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

  * IGT: IGT_6405 -> IGTPW_6854
  * Linux: CI_DRM_11438 -> Patchwork_22758

  CI-20190529: 20190529
  CI_DRM_11438: 1b225b6e486f2cc9c8c76f2f95d28179e79a85af @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6854: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6854/index.html
  IGT_6405: 50f7bc405cc1411f57855ed23322c6c4d2510b58 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22758: e893bdce4102ac13c7ca7976c041fcbec3395c52 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e893bdce4102 drm/i915/migrate: Evict and restore the flatccs capable lmem obj
b88b5b478be0 drm/i915/gem: Add extra pages in ttm_tt for ccs data
b875586d6ccb drm/ttm: Add a parameter to add extra pages into ttm_tt
886c492b3dfa drm/i915/selftest_migrate: Check CCS meta data clear
c00c4ecd5d06 drm/i915/selftest_migrate: Consider the possible roundup of size
de8e6525e810 drm/i915/gt: Clear compress metadata for Flat-ccs objects
cd1f1f11df1b drm/i915/gt: Optimize the migration and clear loop
4b35aa78c844 drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+
c7781263ce21 drm/i915/gt: use engine instance directly for offset

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 12366 bytes --]

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

* Re: [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 14:28     ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 14:28 UTC (permalink / raw)
  To: intel-gfx, dri-devel, Christian Koenig, rodrigo.vivi, Joonas Lahtinen

Christian, Joonas and vivi

Once the premerge results are greeen, if this patch can be merged into
drm-intel-gt-next along with other patches could you please ack the
request to merge into drm-intel-gt-next?

Thanks
Ram

On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> driver needs extra pages in ttm_tt.
> 
> v2:
>   Used imperative wording [Thomas and Christian]
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> cc: Christian Koenig <christian.koenig@amd.com>
> cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> Reviewed-by: Christian Konig <christian.koenig@amd.com>
> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
>  drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
>  drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
>  drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
>  drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
>  include/drm/ttm/ttm_tt.h                   |  4 +++-
>  7 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index dc7f938bfff2..123045b58fec 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
>  	if (!tt)
>  		return NULL;
>  
> -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
>  	if (ret < 0)
>  		goto err_ttm_tt_init;
>  
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index c40aca99442f..a878910a563c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
>  		i915_tt->is_shmem = true;
>  	}
>  
> -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
>  	if (ret)
>  		goto err_free;
>  
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 95df5750f47f..9ba871bd19b1 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
>  	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
>  	if (ttm == NULL)
>  		return NULL;
> -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
>  		kfree(ttm);
>  		return NULL;
>  	}
> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> index 6ddc16f0fe2b..d27691f2e451 100644
> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
>  	agp_be->mem = NULL;
>  	agp_be->bridge = bridge;
>  
> -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
>  		kfree(agp_be);
>  		return NULL;
>  	}
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index d234aab800a0..1a66d9fc589a 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
>  static void ttm_tt_init_fields(struct ttm_tt *ttm,
>  			       struct ttm_buffer_object *bo,
>  			       uint32_t page_flags,
> -			       enum ttm_caching caching)
> +			       enum ttm_caching caching,
> +			       unsigned long extra_pages)
>  {
> -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
>  	ttm->caching = ttm_cached;
>  	ttm->page_flags = page_flags;
>  	ttm->dma_address = NULL;
> @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>  }
>  
>  int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> -		uint32_t page_flags, enum ttm_caching caching)
> +		uint32_t page_flags, enum ttm_caching caching,
> +		unsigned long extra_pages)
>  {
> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
>  
>  	if (ttm_tt_alloc_page_directory(ttm)) {
>  		pr_err("Failed allocating page table\n");
> @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>  {
>  	int ret;
>  
> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
>  
>  	if (page_flags & TTM_TT_FLAG_EXTERNAL)
>  		ret = ttm_sg_tt_alloc_page_directory(ttm);
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index b84ecc6d6611..4e3938e62c08 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
>  				     ttm_cached);
>  	else
>  		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> -				  ttm_cached);
> +				  ttm_cached, 0);
>  	if (unlikely(ret != 0))
>  		goto out_no_init;
>  
> diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> index f20832139815..17a0310e8aaa 100644
> --- a/include/drm/ttm/ttm_tt.h
> +++ b/include/drm/ttm/ttm_tt.h
> @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>   * @bo: The buffer object we create the ttm for.
>   * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
>   * @caching: the desired caching state of the pages
> + * @extra_pages: Extra pages needed for the driver.
>   *
>   * Create a struct ttm_tt to back data with system memory pages.
>   * No pages are actually allocated.
> @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>   * NULL: Out of memory.
>   */
>  int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> -		uint32_t page_flags, enum ttm_caching caching);
> +		uint32_t page_flags, enum ttm_caching caching,
> +		unsigned long extra_pages);
>  int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
>  		   uint32_t page_flags, enum ttm_caching caching);
>  
> -- 
> 2.20.1
> 

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

* Re: [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-01 14:28     ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 14:28 UTC (permalink / raw)
  To: intel-gfx, dri-devel, Christian Koenig, rodrigo.vivi, Joonas Lahtinen

Christian, Joonas and vivi

Once the premerge results are greeen, if this patch can be merged into
drm-intel-gt-next along with other patches could you please ack the
request to merge into drm-intel-gt-next?

Thanks
Ram

On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> driver needs extra pages in ttm_tt.
> 
> v2:
>   Used imperative wording [Thomas and Christian]
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> cc: Christian Koenig <christian.koenig@amd.com>
> cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> Reviewed-by: Christian Konig <christian.koenig@amd.com>
> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
>  drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
>  drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
>  drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
>  drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
>  include/drm/ttm/ttm_tt.h                   |  4 +++-
>  7 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index dc7f938bfff2..123045b58fec 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
>  	if (!tt)
>  		return NULL;
>  
> -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
>  	if (ret < 0)
>  		goto err_ttm_tt_init;
>  
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index c40aca99442f..a878910a563c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
>  		i915_tt->is_shmem = true;
>  	}
>  
> -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
>  	if (ret)
>  		goto err_free;
>  
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 95df5750f47f..9ba871bd19b1 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
>  	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
>  	if (ttm == NULL)
>  		return NULL;
> -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
>  		kfree(ttm);
>  		return NULL;
>  	}
> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> index 6ddc16f0fe2b..d27691f2e451 100644
> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
>  	agp_be->mem = NULL;
>  	agp_be->bridge = bridge;
>  
> -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
>  		kfree(agp_be);
>  		return NULL;
>  	}
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index d234aab800a0..1a66d9fc589a 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
>  static void ttm_tt_init_fields(struct ttm_tt *ttm,
>  			       struct ttm_buffer_object *bo,
>  			       uint32_t page_flags,
> -			       enum ttm_caching caching)
> +			       enum ttm_caching caching,
> +			       unsigned long extra_pages)
>  {
> -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
>  	ttm->caching = ttm_cached;
>  	ttm->page_flags = page_flags;
>  	ttm->dma_address = NULL;
> @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>  }
>  
>  int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> -		uint32_t page_flags, enum ttm_caching caching)
> +		uint32_t page_flags, enum ttm_caching caching,
> +		unsigned long extra_pages)
>  {
> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
>  
>  	if (ttm_tt_alloc_page_directory(ttm)) {
>  		pr_err("Failed allocating page table\n");
> @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>  {
>  	int ret;
>  
> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
>  
>  	if (page_flags & TTM_TT_FLAG_EXTERNAL)
>  		ret = ttm_sg_tt_alloc_page_directory(ttm);
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index b84ecc6d6611..4e3938e62c08 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
>  				     ttm_cached);
>  	else
>  		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> -				  ttm_cached);
> +				  ttm_cached, 0);
>  	if (unlikely(ret != 0))
>  		goto out_no_init;
>  
> diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> index f20832139815..17a0310e8aaa 100644
> --- a/include/drm/ttm/ttm_tt.h
> +++ b/include/drm/ttm/ttm_tt.h
> @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>   * @bo: The buffer object we create the ttm for.
>   * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
>   * @caching: the desired caching state of the pages
> + * @extra_pages: Extra pages needed for the driver.
>   *
>   * Create a struct ttm_tt to back data with system memory pages.
>   * No pages are actually allocated.
> @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>   * NULL: Out of memory.
>   */
>  int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> -		uint32_t page_flags, enum ttm_caching caching);
> +		uint32_t page_flags, enum ttm_caching caching,
> +		unsigned long extra_pages);
>  int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
>  		   uint32_t page_flags, enum ttm_caching caching);
>  
> -- 
> 2.20.1
> 

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

* Re: [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-01 14:28     ` [Intel-gfx] " Ramalingam C
@ 2022-04-01 14:31       ` Christian König
  -1 siblings, 0 replies; 38+ messages in thread
From: Christian König @ 2022-04-01 14:31 UTC (permalink / raw)
  To: Ramalingam C, intel-gfx, dri-devel, rodrigo.vivi, Joonas Lahtinen

I would be nicer to push this through drm-misc-next, but the intel 
branch works for me as well.

Regards,
Christian.

Am 01.04.22 um 16:28 schrieb Ramalingam C:
> Christian, Joonas and vivi
>
> Once the premerge results are greeen, if this patch can be merged into
> drm-intel-gt-next along with other patches could you please ack the
> request to merge into drm-intel-gt-next?
>
> Thanks
> Ram
>
> On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
>> Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
>> driver needs extra pages in ttm_tt.
>>
>> v2:
>>    Used imperative wording [Thomas and Christian]
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> cc: Christian Koenig <christian.koenig@amd.com>
>> cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
>> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
>> Reviewed-by: Christian Konig <christian.koenig@amd.com>
>> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
>>   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
>>   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
>>   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
>>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
>>   include/drm/ttm/ttm_tt.h                   |  4 +++-
>>   7 files changed, 15 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
>> index dc7f938bfff2..123045b58fec 100644
>> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
>> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
>> @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
>>   	if (!tt)
>>   		return NULL;
>>   
>> -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
>> +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
>>   	if (ret < 0)
>>   		goto err_ttm_tt_init;
>>   
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> index c40aca99442f..a878910a563c 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
>>   		i915_tt->is_shmem = true;
>>   	}
>>   
>> -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
>> +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
>>   	if (ret)
>>   		goto err_free;
>>   
>> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
>> index 95df5750f47f..9ba871bd19b1 100644
>> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
>> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
>> @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
>>   	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
>>   	if (ttm == NULL)
>>   		return NULL;
>> -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
>> +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
>>   		kfree(ttm);
>>   		return NULL;
>>   	}
>> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> index 6ddc16f0fe2b..d27691f2e451 100644
>> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
>>   	agp_be->mem = NULL;
>>   	agp_be->bridge = bridge;
>>   
>> -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
>> +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
>>   		kfree(agp_be);
>>   		return NULL;
>>   	}
>> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
>> index d234aab800a0..1a66d9fc589a 100644
>> --- a/drivers/gpu/drm/ttm/ttm_tt.c
>> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
>> @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
>>   static void ttm_tt_init_fields(struct ttm_tt *ttm,
>>   			       struct ttm_buffer_object *bo,
>>   			       uint32_t page_flags,
>> -			       enum ttm_caching caching)
>> +			       enum ttm_caching caching,
>> +			       unsigned long extra_pages)
>>   {
>> -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
>> +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
>>   	ttm->caching = ttm_cached;
>>   	ttm->page_flags = page_flags;
>>   	ttm->dma_address = NULL;
>> @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>>   }
>>   
>>   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>> -		uint32_t page_flags, enum ttm_caching caching)
>> +		uint32_t page_flags, enum ttm_caching caching,
>> +		unsigned long extra_pages)
>>   {
>> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
>> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
>>   
>>   	if (ttm_tt_alloc_page_directory(ttm)) {
>>   		pr_err("Failed allocating page table\n");
>> @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>>   {
>>   	int ret;
>>   
>> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
>> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
>>   
>>   	if (page_flags & TTM_TT_FLAG_EXTERNAL)
>>   		ret = ttm_sg_tt_alloc_page_directory(ttm);
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> index b84ecc6d6611..4e3938e62c08 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
>>   				     ttm_cached);
>>   	else
>>   		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
>> -				  ttm_cached);
>> +				  ttm_cached, 0);
>>   	if (unlikely(ret != 0))
>>   		goto out_no_init;
>>   
>> diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
>> index f20832139815..17a0310e8aaa 100644
>> --- a/include/drm/ttm/ttm_tt.h
>> +++ b/include/drm/ttm/ttm_tt.h
>> @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>>    * @bo: The buffer object we create the ttm for.
>>    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
>>    * @caching: the desired caching state of the pages
>> + * @extra_pages: Extra pages needed for the driver.
>>    *
>>    * Create a struct ttm_tt to back data with system memory pages.
>>    * No pages are actually allocated.
>> @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>>    * NULL: Out of memory.
>>    */
>>   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>> -		uint32_t page_flags, enum ttm_caching caching);
>> +		uint32_t page_flags, enum ttm_caching caching,
>> +		unsigned long extra_pages);
>>   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
>>   		   uint32_t page_flags, enum ttm_caching caching);
>>   
>> -- 
>> 2.20.1
>>


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

* Re: [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-01 14:31       ` Christian König
  0 siblings, 0 replies; 38+ messages in thread
From: Christian König @ 2022-04-01 14:31 UTC (permalink / raw)
  To: Ramalingam C, intel-gfx, dri-devel, rodrigo.vivi, Joonas Lahtinen

I would be nicer to push this through drm-misc-next, but the intel 
branch works for me as well.

Regards,
Christian.

Am 01.04.22 um 16:28 schrieb Ramalingam C:
> Christian, Joonas and vivi
>
> Once the premerge results are greeen, if this patch can be merged into
> drm-intel-gt-next along with other patches could you please ack the
> request to merge into drm-intel-gt-next?
>
> Thanks
> Ram
>
> On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
>> Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
>> driver needs extra pages in ttm_tt.
>>
>> v2:
>>    Used imperative wording [Thomas and Christian]
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> cc: Christian Koenig <christian.koenig@amd.com>
>> cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
>> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
>> Reviewed-by: Christian Konig <christian.koenig@amd.com>
>> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
>>   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
>>   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
>>   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
>>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
>>   include/drm/ttm/ttm_tt.h                   |  4 +++-
>>   7 files changed, 15 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
>> index dc7f938bfff2..123045b58fec 100644
>> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
>> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
>> @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
>>   	if (!tt)
>>   		return NULL;
>>   
>> -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
>> +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
>>   	if (ret < 0)
>>   		goto err_ttm_tt_init;
>>   
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> index c40aca99442f..a878910a563c 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
>>   		i915_tt->is_shmem = true;
>>   	}
>>   
>> -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
>> +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
>>   	if (ret)
>>   		goto err_free;
>>   
>> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
>> index 95df5750f47f..9ba871bd19b1 100644
>> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
>> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
>> @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
>>   	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
>>   	if (ttm == NULL)
>>   		return NULL;
>> -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
>> +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
>>   		kfree(ttm);
>>   		return NULL;
>>   	}
>> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> index 6ddc16f0fe2b..d27691f2e451 100644
>> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
>>   	agp_be->mem = NULL;
>>   	agp_be->bridge = bridge;
>>   
>> -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
>> +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
>>   		kfree(agp_be);
>>   		return NULL;
>>   	}
>> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
>> index d234aab800a0..1a66d9fc589a 100644
>> --- a/drivers/gpu/drm/ttm/ttm_tt.c
>> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
>> @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
>>   static void ttm_tt_init_fields(struct ttm_tt *ttm,
>>   			       struct ttm_buffer_object *bo,
>>   			       uint32_t page_flags,
>> -			       enum ttm_caching caching)
>> +			       enum ttm_caching caching,
>> +			       unsigned long extra_pages)
>>   {
>> -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
>> +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
>>   	ttm->caching = ttm_cached;
>>   	ttm->page_flags = page_flags;
>>   	ttm->dma_address = NULL;
>> @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>>   }
>>   
>>   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>> -		uint32_t page_flags, enum ttm_caching caching)
>> +		uint32_t page_flags, enum ttm_caching caching,
>> +		unsigned long extra_pages)
>>   {
>> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
>> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
>>   
>>   	if (ttm_tt_alloc_page_directory(ttm)) {
>>   		pr_err("Failed allocating page table\n");
>> @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>>   {
>>   	int ret;
>>   
>> -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
>> +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
>>   
>>   	if (page_flags & TTM_TT_FLAG_EXTERNAL)
>>   		ret = ttm_sg_tt_alloc_page_directory(ttm);
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> index b84ecc6d6611..4e3938e62c08 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
>>   				     ttm_cached);
>>   	else
>>   		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
>> -				  ttm_cached);
>> +				  ttm_cached, 0);
>>   	if (unlikely(ret != 0))
>>   		goto out_no_init;
>>   
>> diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
>> index f20832139815..17a0310e8aaa 100644
>> --- a/include/drm/ttm/ttm_tt.h
>> +++ b/include/drm/ttm/ttm_tt.h
>> @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>>    * @bo: The buffer object we create the ttm for.
>>    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
>>    * @caching: the desired caching state of the pages
>> + * @extra_pages: Extra pages needed for the driver.
>>    *
>>    * Create a struct ttm_tt to back data with system memory pages.
>>    * No pages are actually allocated.
>> @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
>>    * NULL: Out of memory.
>>    */
>>   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
>> -		uint32_t page_flags, enum ttm_caching caching);
>> +		uint32_t page_flags, enum ttm_caching caching,
>> +		unsigned long extra_pages);
>>   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
>>   		   uint32_t page_flags, enum ttm_caching caching);
>>   
>> -- 
>> 2.20.1
>>


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

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ttm: Evict and restore of compressed object (rev7)
  2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
                   ` (12 preceding siblings ...)
  (?)
@ 2022-04-01 15:59 ` Patchwork
  2022-04-01 18:49   ` Ramalingam C
  -1 siblings, 1 reply; 38+ messages in thread
From: Patchwork @ 2022-04-01 15:59 UTC (permalink / raw)
  To: Ramalingam C; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30283 bytes --]

== Series Details ==

Series: drm/i915/ttm: Evict and restore of compressed object (rev7)
URL   : https://patchwork.freedesktop.org/series/101106/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11438_full -> Patchwork_22758_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_22758_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22758_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@gem_lmem_swapping@parallel-random-verify-ccs} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][1] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@gem_lmem_swapping@parallel-random-verify-ccs.html

  * igt@gem_lmem_swapping@verify-random-ccs:
    - shard-iclb:         NOTRUN -> [SKIP][2] +3 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@gem_lmem_swapping@verify-random-ccs.html

  
New tests
---------

  New tests have been introduced between CI_DRM_11438_full and Patchwork_22758_full:

### New IGT tests (2) ###

  * igt@gem_lmem_swapping@heavy-verify-random-ccs:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@gem_lmem_swapping@parallel-random-verify-ccs:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

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

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

### CI changes ###

#### Possible fixes ####

  * boot:
    - shard-skl:          ([PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [FAIL][18], [FAIL][19], [FAIL][20], [FAIL][21], [FAIL][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27]) ([i915#5032]) -> ([PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl8/boot.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl8/boot.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl10/boot.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl10/boot.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl6/boot.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl6/boot.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl3/boot.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl3/boot.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html

  

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@display-3x:
    - shard-tglb:         NOTRUN -> [SKIP][52] ([i915#1839])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@feature_discovery@display-3x.html

  * igt@gem_ccs@block-copy-uncompressed:
    - shard-iclb:         NOTRUN -> [SKIP][53] ([i915#5327]) +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_ccs@block-copy-uncompressed.html

  * igt@gem_ctx_param@set-priority-not-supported:
    - shard-iclb:         NOTRUN -> [SKIP][54] ([fdo#109314])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_ctx_param@set-priority-not-supported.html

  * igt@gem_ctx_persistence@legacy-engines-hostile-preempt:
    - shard-snb:          NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#1099]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@gem_ctx_persistence@legacy-engines-hostile-preempt.html

  * igt@gem_ctx_shared@q-in-order:
    - shard-snb:          NOTRUN -> [SKIP][56] ([fdo#109271]) +128 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@gem_ctx_shared@q-in-order.html

  * igt@gem_ctx_sseu@mmap-args:
    - shard-tglb:         NOTRUN -> [SKIP][57] ([i915#280])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gem_ctx_sseu@mmap-args.html

  * igt@gem_eio@unwedge-stress:
    - shard-skl:          NOTRUN -> [TIMEOUT][58] ([i915#3063])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-bb-first:
    - shard-iclb:         NOTRUN -> [DMESG-WARN][59] ([i915#5076])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb1/igt@gem_exec_balancer@parallel-bb-first.html

  * igt@gem_exec_balancer@parallel-contexts:
    - shard-tglb:         NOTRUN -> [DMESG-WARN][60] ([i915#5076]) +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gem_exec_balancer@parallel-contexts.html
    - shard-kbl:          NOTRUN -> [DMESG-WARN][61] ([i915#5076])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@gem_exec_balancer@parallel-contexts.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-skl:          NOTRUN -> [SKIP][62] ([fdo#109271]) +320 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-iclb:         NOTRUN -> [FAIL][63] ([i915#2842]) +1 similar issue
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_exec_fair@basic-none-rrul@rcs0.html
    - shard-glk:          NOTRUN -> [FAIL][64] ([i915#2842])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk9/igt@gem_exec_fair@basic-none-rrul@rcs0.html
    - shard-tglb:         NOTRUN -> [FAIL][65] ([i915#2842]) +1 similar issue
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-glk:          [PASS][66] -> [FAIL][67] ([i915#2842])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk6/igt@gem_exec_fair@basic-none-share@rcs0.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [PASS][68] -> [FAIL][69] ([i915#2842])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-kbl4/igt@gem_exec_fair@basic-pace@vecs0.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         NOTRUN -> [FAIL][70] ([i915#2849])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_flush@basic-batch-kernel-default-cmd:
    - shard-iclb:         NOTRUN -> [SKIP][71] ([fdo#109313])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@gem_exec_flush@basic-batch-kernel-default-cmd.html

  * igt@gem_lmem_swapping@heavy-verify-multi-ccs:
    - shard-iclb:         NOTRUN -> [SKIP][72] ([i915#4613]) +3 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
    - shard-skl:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#4613]) +1 similar issue
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
    - shard-glk:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#4613])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk5/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
    - shard-apl:          NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#4613])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl1/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html

  * igt@gem_lmem_swapping@parallel-random-verify:
    - shard-kbl:          NOTRUN -> [SKIP][76] ([fdo#109271] / [i915#4613]) +3 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@gem_lmem_swapping@parallel-random-verify.html

  * igt@gem_lmem_swapping@random-engines:
    - shard-tglb:         NOTRUN -> [SKIP][77] ([i915#4613]) +3 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb3/igt@gem_lmem_swapping@random-engines.html

  * igt@gem_pread@exhaustion:
    - shard-tglb:         NOTRUN -> [WARN][78] ([i915#2658])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@gem_pread@exhaustion.html
    - shard-glk:          NOTRUN -> [WARN][79] ([i915#2658])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@gem_pread@exhaustion.html
    - shard-apl:          NOTRUN -> [WARN][80] ([i915#2658])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl3/igt@gem_pread@exhaustion.html
    - shard-iclb:         NOTRUN -> [WARN][81] ([i915#2658])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_pread@exhaustion.html
    - shard-snb:          NOTRUN -> [WARN][82] ([i915#2658])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb5/igt@gem_pread@exhaustion.html
    - shard-kbl:          NOTRUN -> [WARN][83] ([i915#2658])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@gem_pread@exhaustion.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-skl:          NOTRUN -> [WARN][84] ([i915#2658]) +1 similar issue
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_pxp@create-protected-buffer:
    - shard-iclb:         NOTRUN -> [SKIP][85] ([i915#4270]) +2 similar issues
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@gem_pxp@create-protected-buffer.html

  * igt@gem_pxp@create-regular-buffer:
    - shard-tglb:         NOTRUN -> [SKIP][86] ([i915#4270]) +2 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb2/igt@gem_pxp@create-regular-buffer.html

  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled:
    - shard-iclb:         NOTRUN -> [SKIP][87] ([i915#768]) +2 similar issues
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled.html

  * igt@gem_softpin@allocator-evict-all-engines:
    - shard-glk:          [PASS][88] -> [FAIL][89] ([i915#4171])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk1/igt@gem_softpin@allocator-evict-all-engines.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@gem_softpin@allocator-evict-all-engines.html

  * igt@gem_softpin@noreloc-s3:
    - shard-skl:          NOTRUN -> [INCOMPLETE][90] ([i915#1373] / [i915#4939] / [i915#5230])
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/igt@gem_softpin@noreloc-s3.html

  * igt@gem_userptr_blits@unsync-unmap-after-close:
    - shard-iclb:         NOTRUN -> [SKIP][91] ([i915#3297])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_userptr_blits@unsync-unmap-after-close.html

  * igt@gem_userptr_blits@unsync-unmap-cycles:
    - shard-tglb:         NOTRUN -> [SKIP][92] ([i915#3297]) +1 similar issue
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gem_userptr_blits@unsync-unmap-cycles.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-kbl:          NOTRUN -> [FAIL][93] ([i915#3318])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@gem_userptr_blits@vma-merge.html

  * igt@gen7_exec_parse@basic-rejected:
    - shard-tglb:         NOTRUN -> [SKIP][94] ([fdo#109289]) +3 similar issues
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gen7_exec_parse@basic-rejected.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-skl:          NOTRUN -> [DMESG-WARN][95] ([i915#1436] / [i915#716])
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@gen9_exec_parse@allowed-all.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-skl:          NOTRUN -> [DMESG-WARN][96] ([i915#1436] / [i915#1982] / [i915#716])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/igt@gen9_exec_parse@allowed-single.html

  * igt@gen9_exec_parse@bb-start-param:
    - shard-tglb:         NOTRUN -> [SKIP][97] ([i915#2527] / [i915#2856]) +1 similar issue
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gen9_exec_parse@bb-start-param.html

  * igt@gen9_exec_parse@valid-registers:
    - shard-iclb:         NOTRUN -> [SKIP][98] ([i915#2856]) +2 similar issues
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@gen9_exec_parse@valid-registers.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-skl:          NOTRUN -> [SKIP][99] ([fdo#109271] / [i915#658]) +1 similar issue
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/igt@i915_pm_dc@dc3co-vpb-simulation.html
    - shard-tglb:         NOTRUN -> [SKIP][100] ([i915#1904])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@i915_pm_dc@dc3co-vpb-simulation.html
    - shard-iclb:         NOTRUN -> [SKIP][101] ([i915#588])
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         NOTRUN -> [FAIL][102] ([i915#454])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb2/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-iclb:         [PASS][103] -> [SKIP][104] ([i915#4281])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-iclb4/igt@i915_pm_dc@dc9-dpms.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@i915_pm_dc@dc9-dpms.html

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

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
    - shard-glk:          NOTRUN -> [SKIP][107] ([fdo#109271] / [i915#1937])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html

  * igt@i915_pm_rpm@pc8-residency:
    - shard-iclb:         NOTRUN -> [SKIP][108] ([fdo#109293] / [fdo#109506])
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@i915_pm_rpm@pc8-residency.html
    - shard-tglb:         NOTRUN -> [SKIP][109] ([fdo#109506] / [i915#2411])
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@i915_pm_rpm@pc8-residency.html

  * igt@i915_selftest@live@gt_pm:
    - shard-skl:          NOTRUN -> [DMESG-FAIL][110] ([i915#1886])
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@i915_selftest@live@gt_pm.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [PASS][111] -> [INCOMPLETE][112] ([i915#3921])
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-snb7/igt@i915_selftest@live@hangcheck.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@i915_selftest@live@hangcheck.html

  * igt@i915_suspend@forcewake:
    - shard-kbl:          [PASS][113] -> [DMESG-WARN][114] ([i915#180]) +1 similar issue
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-kbl1/igt@i915_suspend@forcewake.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@i915_suspend@forcewake.html

  * igt@kms_atomic@atomic_plane_damage:
    - shard-iclb:         NOTRUN -> [SKIP][115] ([i915#4765])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@kms_atomic@atomic_plane_damage.html

  * igt@kms_atomic@plane-primary-overlay-mutable-zpos:
    - shard-tglb:         NOTRUN -> [SKIP][116] ([i915#404])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@kms_atomic@plane-primary-overlay-mutable-zpos.html

  * igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
    - shard-tglb:         NOTRUN -> [SKIP][117] ([i915#1769])
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html

  * igt@kms_big_fb@4-tiled-8bpp-rotate-90:
    - shard-kbl:          NOTRUN -> [SKIP][118] ([fdo#109271]) +234 similar issues
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@kms_big_fb@4-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0:
    - shard-tglb:         NOTRUN -> [SKIP][119] ([i915#5286]) +3 similar issues
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
    - shard-iclb:         NOTRUN -> [SKIP][120] ([i915#5286]) +3 similar issues
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-async-flip.html

  * igt@kms_big_fb@linear-16bpp-rotate-90:
    - shard-iclb:         NOTRUN -> [SKIP][121] ([fdo#110725] / [fdo#111614])
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@kms_big_fb@linear-16bpp-rotate-90.html

  * igt@kms_big_fb@x-tiled-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][122] ([fdo#111614]) +3 similar issues
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][123] ([i915#3743])
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
    - shard-kbl:          NOTRUN -> [SKIP][124] ([fdo#109271] / [i915#3777]) +2 similar issues
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
    - shard-skl:          NOTRUN -> [SKIP][125] ([fdo#109271] / [i915#3777]) +2 similar issues
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
    - shard-apl:          NOTRUN -> [SKIP][126] ([fdo#109271] / [i915#3777])
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl3/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][127] ([i915#3763])
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html

  * igt@kms_big_fb@yf-tiled-32bpp-rotate-0:
    - shard-glk:          [PASS][128] -> [DMESG-WARN][129] ([i915#118])
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk6/igt@kms_big_fb@yf-tiled-32bpp-rotate-0.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk6/igt@kms_big_fb@yf-tiled-32bpp-rotate-0.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-iclb:         NOTRUN -> [SKIP][130] ([fdo#110723])
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_big_joiner@invalid-modeset:
    - shard-iclb:         NOTRUN -> [SKIP][131] ([i915#2705])
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_big_joiner@invalid-modeset.html
    - shard-tglb:         NOTRUN -> [SKIP][132] ([i915#2705])
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@kms_big_joiner@invalid-modeset.html

  * igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
    - shard-iclb:         NOTRUN -> [SKIP][133] ([fdo#109278] / [i915#3886]) +6 similar issues
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
    - shard-kbl:          NOTRUN -> [SKIP][134] ([fdo#109271] / [i915#3886]) +12 similar issues
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][135] ([i915#3689]) +8 similar issues
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_ccs.html

  * igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][136] ([i915#3689] / [i915#3886]) +3 similar issues
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb5/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][137] ([fdo#109271] / [i915#3886]) +16 similar issues
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
    - shard-glk:          NOTRUN -> [SKIP][138] ([fdo#109271] / [i915#3886]) +3 similar issues
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk8/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
    - shard-apl:          NOTRUN -> [SKIP][139] ([fdo#109271] / [i915#3886]) +5 similar issues
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl6/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-d-missing-ccs-buffer-yf_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][140] ([fdo#111615] / [i915#3689]) +8 similar issues
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_ccs@pipe-d-missing-ccs-buffer-yf_tiled_ccs.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - shard-snb:          NOTRUN -> [SKIP][141] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb7/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_chamelium@hdmi-hpd-storm:
    - shard-kbl:          NOTRUN -> [SKIP][142] ([fdo#109271] / [fdo#111827]) +16 similar issues
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl1/igt@kms_chamelium@hdmi-hpd-storm.html

  * igt@kms_color@pipe-d-ctm-0-25:
    - shard-iclb:         NOTRUN -> [SKIP][143] ([fdo#109278] / [i915#1149]) +1 similar issue
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@kms_color@pipe-d-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-b-ctm-0-5:
    - shard-tglb:         NOTRUN -> [SKIP][144] ([fdo#109284] / [fdo#111827]) +14 similar issues
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@kms_color_chamelium@pipe-b-ctm-0-5.html

  * igt@kms_color_chamelium@pipe-b-ctm-max:
    - shard-skl:          NOTRUN -> [SKIP][145] ([fdo#109271] / [fdo#111827]) +18 similar issues
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@kms_color_chamelium@pipe-b-ctm-max.html

  * igt@kms_color_chamelium@pipe-b-ctm-red-to-blue:
    - shard-iclb:         NOTRUN -> [SKIP][146] ([fdo#109284] / [fdo#111827]) +11 similar issues
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html
    - shard-apl:          NOTRUN -> [SKIP][147] ([fdo#109271] / [fdo#111827]) +6 similar issues
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl4/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html
    - shard-glk:          NOTRUN -> [SKIP][148] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html

  * igt@kms_color_chamelium@pipe-d-ctm-0-5:
    - shard-iclb:         NOTRUN -> [SKIP][149] ([fdo#109278] / [fdo#109284] / [fdo#111827])
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_color_chamelium@pipe-d-ctm-0-5.html

  * igt@kms_content_protection@atomic:
    - shard-iclb:         NOTRUN -> [SKIP][150] ([fdo#109300] / [fdo#111066]) +1 similar issue
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_content_protection@atomic.html

  * igt@kms_content_protection@dp-mst-lic-type-0:
    - shard-tglb:         NOTRUN -> [SKIP][151] ([i915#3116] / [i915#3299]) +1 similar issue
   [151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb5/igt@kms_content_protection@dp-mst-lic-type-0.html

  * igt@kms_content_protection@srm:
    - shard-glk:          NOTRUN -> [SKIP][152] ([fdo#109271]) +69 similar issues
   [152]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@kms_content_protection@srm.html
    - shard-tglb:         NOTRUN -> [SKIP][153] ([i915#1063])
   [153]: https://intel-gfx-ci.01.org/tr

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 33983 bytes --]

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

* Re: [Intel-gfx]  ✗ Fi.CI.IGT: failure for drm/i915/ttm: Evict and restore of compressed object (rev7)
  2022-04-01 15:59 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2022-04-01 18:49   ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-01 18:49 UTC (permalink / raw)
  To: intel-gfx

On 2022-04-01 at 15:59:01 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/ttm: Evict and restore of compressed object (rev7)
> URL   : https://patchwork.freedesktop.org/series/101106/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_11438_full -> Patchwork_22758_full
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_22758_full absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_22758_full, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> Participating hosts (11 -> 11)
> ------------------------------
> 
>   No changes in participating hosts
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_22758_full:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * {igt@gem_lmem_swapping@parallel-random-verify-ccs} (NEW):
>     - shard-tglb:         NOTRUN -> [SKIP][1] +3 similar issues
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@gem_lmem_swapping@parallel-random-verify-ccs.html
> 
>   * igt@gem_lmem_swapping@verify-random-ccs:
>     - shard-iclb:         NOTRUN -> [SKIP][2] +3 similar issues
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@gem_lmem_swapping@verify-random-ccs.html
> 
on TGL and ICL CCS tests are supposed to skip.
>   
> New tests
> ---------
> 
>   New tests have been introduced between CI_DRM_11438_full and Patchwork_22758_full:
> 
> ### New IGT tests (2) ###
> 
>   * igt@gem_lmem_swapping@heavy-verify-random-ccs:
>     - Statuses : 7 skip(s)
>     - Exec time: [0.0] s
> 
>   * igt@gem_lmem_swapping@parallel-random-verify-ccs:
>     - Statuses : 7 skip(s)
>     - Exec time: [0.0] s
> 
Except on DG2 on other platforms CCS tests will skip.

Changes looking good to merge. Thanks

Ram.
>   
> 
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_22758_full that come from known issues:
> 
> ### CI changes ###
> 
> #### Possible fixes ####
> 
>   * boot:
>     - shard-skl:          ([PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [FAIL][18], [FAIL][19], [FAIL][20], [FAIL][21], [FAIL][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27]) ([i915#5032]) -> ([PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51])
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl9/boot.html
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl8/boot.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl8/boot.html
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl7/boot.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl6/boot.html
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl4/boot.html
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
>    [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
>    [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
>    [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
>    [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl3/boot.html
>    [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
>    [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
>    [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl1/boot.html
>    [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl10/boot.html
>    [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-skl10/boot.html
>    [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
>    [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
>    [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/boot.html
>    [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
>    [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
>    [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
>    [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl8/boot.html
>    [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
>    [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
>    [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/boot.html
>    [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl6/boot.html
>    [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl6/boot.html
>    [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
>    [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
>    [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/boot.html
>    [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl3/boot.html
>    [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl3/boot.html
>    [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
>    [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
>    [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/boot.html
>    [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
>    [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
>    [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
>    [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/boot.html
> 
>   
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@feature_discovery@display-3x:
>     - shard-tglb:         NOTRUN -> [SKIP][52] ([i915#1839])
>    [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@feature_discovery@display-3x.html
> 
>   * igt@gem_ccs@block-copy-uncompressed:
>     - shard-iclb:         NOTRUN -> [SKIP][53] ([i915#5327]) +1 similar issue
>    [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_ccs@block-copy-uncompressed.html
> 
>   * igt@gem_ctx_param@set-priority-not-supported:
>     - shard-iclb:         NOTRUN -> [SKIP][54] ([fdo#109314])
>    [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_ctx_param@set-priority-not-supported.html
> 
>   * igt@gem_ctx_persistence@legacy-engines-hostile-preempt:
>     - shard-snb:          NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#1099]) +1 similar issue
>    [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@gem_ctx_persistence@legacy-engines-hostile-preempt.html
> 
>   * igt@gem_ctx_shared@q-in-order:
>     - shard-snb:          NOTRUN -> [SKIP][56] ([fdo#109271]) +128 similar issues
>    [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@gem_ctx_shared@q-in-order.html
> 
>   * igt@gem_ctx_sseu@mmap-args:
>     - shard-tglb:         NOTRUN -> [SKIP][57] ([i915#280])
>    [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gem_ctx_sseu@mmap-args.html
> 
>   * igt@gem_eio@unwedge-stress:
>     - shard-skl:          NOTRUN -> [TIMEOUT][58] ([i915#3063])
>    [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@gem_eio@unwedge-stress.html
> 
>   * igt@gem_exec_balancer@parallel-bb-first:
>     - shard-iclb:         NOTRUN -> [DMESG-WARN][59] ([i915#5076])
>    [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb1/igt@gem_exec_balancer@parallel-bb-first.html
> 
>   * igt@gem_exec_balancer@parallel-contexts:
>     - shard-tglb:         NOTRUN -> [DMESG-WARN][60] ([i915#5076]) +1 similar issue
>    [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gem_exec_balancer@parallel-contexts.html
>     - shard-kbl:          NOTRUN -> [DMESG-WARN][61] ([i915#5076])
>    [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@gem_exec_balancer@parallel-contexts.html
> 
>   * igt@gem_exec_fair@basic-flow@rcs0:
>     - shard-skl:          NOTRUN -> [SKIP][62] ([fdo#109271]) +320 similar issues
>    [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@gem_exec_fair@basic-flow@rcs0.html
> 
>   * igt@gem_exec_fair@basic-none-rrul@rcs0:
>     - shard-iclb:         NOTRUN -> [FAIL][63] ([i915#2842]) +1 similar issue
>    [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_exec_fair@basic-none-rrul@rcs0.html
>     - shard-glk:          NOTRUN -> [FAIL][64] ([i915#2842])
>    [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk9/igt@gem_exec_fair@basic-none-rrul@rcs0.html
>     - shard-tglb:         NOTRUN -> [FAIL][65] ([i915#2842]) +1 similar issue
>    [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gem_exec_fair@basic-none-rrul@rcs0.html
> 
>   * igt@gem_exec_fair@basic-none-share@rcs0:
>     - shard-glk:          [PASS][66] -> [FAIL][67] ([i915#2842])
>    [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk6/igt@gem_exec_fair@basic-none-share@rcs0.html
>    [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@gem_exec_fair@basic-none-share@rcs0.html
> 
>   * igt@gem_exec_fair@basic-pace@vecs0:
>     - shard-kbl:          [PASS][68] -> [FAIL][69] ([i915#2842])
>    [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-kbl4/igt@gem_exec_fair@basic-pace@vecs0.html
>    [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@gem_exec_fair@basic-pace@vecs0.html
> 
>   * igt@gem_exec_fair@basic-throttle@rcs0:
>     - shard-iclb:         NOTRUN -> [FAIL][70] ([i915#2849])
>    [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@gem_exec_fair@basic-throttle@rcs0.html
> 
>   * igt@gem_exec_flush@basic-batch-kernel-default-cmd:
>     - shard-iclb:         NOTRUN -> [SKIP][71] ([fdo#109313])
>    [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@gem_exec_flush@basic-batch-kernel-default-cmd.html
> 
>   * igt@gem_lmem_swapping@heavy-verify-multi-ccs:
>     - shard-iclb:         NOTRUN -> [SKIP][72] ([i915#4613]) +3 similar issues
>    [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
>     - shard-skl:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#4613]) +1 similar issue
>    [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
>     - shard-glk:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#4613])
>    [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk5/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
>     - shard-apl:          NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#4613])
>    [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl1/igt@gem_lmem_swapping@heavy-verify-multi-ccs.html
> 
>   * igt@gem_lmem_swapping@parallel-random-verify:
>     - shard-kbl:          NOTRUN -> [SKIP][76] ([fdo#109271] / [i915#4613]) +3 similar issues
>    [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@gem_lmem_swapping@parallel-random-verify.html
> 
>   * igt@gem_lmem_swapping@random-engines:
>     - shard-tglb:         NOTRUN -> [SKIP][77] ([i915#4613]) +3 similar issues
>    [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb3/igt@gem_lmem_swapping@random-engines.html
> 
>   * igt@gem_pread@exhaustion:
>     - shard-tglb:         NOTRUN -> [WARN][78] ([i915#2658])
>    [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@gem_pread@exhaustion.html
>     - shard-glk:          NOTRUN -> [WARN][79] ([i915#2658])
>    [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@gem_pread@exhaustion.html
>     - shard-apl:          NOTRUN -> [WARN][80] ([i915#2658])
>    [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl3/igt@gem_pread@exhaustion.html
>     - shard-iclb:         NOTRUN -> [WARN][81] ([i915#2658])
>    [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_pread@exhaustion.html
>     - shard-snb:          NOTRUN -> [WARN][82] ([i915#2658])
>    [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb5/igt@gem_pread@exhaustion.html
>     - shard-kbl:          NOTRUN -> [WARN][83] ([i915#2658])
>    [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@gem_pread@exhaustion.html
> 
>   * igt@gem_pwrite@basic-exhaustion:
>     - shard-skl:          NOTRUN -> [WARN][84] ([i915#2658]) +1 similar issue
>    [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@gem_pwrite@basic-exhaustion.html
> 
>   * igt@gem_pxp@create-protected-buffer:
>     - shard-iclb:         NOTRUN -> [SKIP][85] ([i915#4270]) +2 similar issues
>    [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@gem_pxp@create-protected-buffer.html
> 
>   * igt@gem_pxp@create-regular-buffer:
>     - shard-tglb:         NOTRUN -> [SKIP][86] ([i915#4270]) +2 similar issues
>    [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb2/igt@gem_pxp@create-regular-buffer.html
> 
>   * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled:
>     - shard-iclb:         NOTRUN -> [SKIP][87] ([i915#768]) +2 similar issues
>    [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled.html
> 
>   * igt@gem_softpin@allocator-evict-all-engines:
>     - shard-glk:          [PASS][88] -> [FAIL][89] ([i915#4171])
>    [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk1/igt@gem_softpin@allocator-evict-all-engines.html
>    [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@gem_softpin@allocator-evict-all-engines.html
> 
>   * igt@gem_softpin@noreloc-s3:
>     - shard-skl:          NOTRUN -> [INCOMPLETE][90] ([i915#1373] / [i915#4939] / [i915#5230])
>    [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/igt@gem_softpin@noreloc-s3.html
> 
>   * igt@gem_userptr_blits@unsync-unmap-after-close:
>     - shard-iclb:         NOTRUN -> [SKIP][91] ([i915#3297])
>    [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb7/igt@gem_userptr_blits@unsync-unmap-after-close.html
> 
>   * igt@gem_userptr_blits@unsync-unmap-cycles:
>     - shard-tglb:         NOTRUN -> [SKIP][92] ([i915#3297]) +1 similar issue
>    [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gem_userptr_blits@unsync-unmap-cycles.html
> 
>   * igt@gem_userptr_blits@vma-merge:
>     - shard-kbl:          NOTRUN -> [FAIL][93] ([i915#3318])
>    [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@gem_userptr_blits@vma-merge.html
> 
>   * igt@gen7_exec_parse@basic-rejected:
>     - shard-tglb:         NOTRUN -> [SKIP][94] ([fdo#109289]) +3 similar issues
>    [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@gen7_exec_parse@basic-rejected.html
> 
>   * igt@gen9_exec_parse@allowed-all:
>     - shard-skl:          NOTRUN -> [DMESG-WARN][95] ([i915#1436] / [i915#716])
>    [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@gen9_exec_parse@allowed-all.html
> 
>   * igt@gen9_exec_parse@allowed-single:
>     - shard-skl:          NOTRUN -> [DMESG-WARN][96] ([i915#1436] / [i915#1982] / [i915#716])
>    [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/igt@gen9_exec_parse@allowed-single.html
> 
>   * igt@gen9_exec_parse@bb-start-param:
>     - shard-tglb:         NOTRUN -> [SKIP][97] ([i915#2527] / [i915#2856]) +1 similar issue
>    [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@gen9_exec_parse@bb-start-param.html
> 
>   * igt@gen9_exec_parse@valid-registers:
>     - shard-iclb:         NOTRUN -> [SKIP][98] ([i915#2856]) +2 similar issues
>    [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@gen9_exec_parse@valid-registers.html
> 
>   * igt@i915_pm_dc@dc3co-vpb-simulation:
>     - shard-skl:          NOTRUN -> [SKIP][99] ([fdo#109271] / [i915#658]) +1 similar issue
>    [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl4/igt@i915_pm_dc@dc3co-vpb-simulation.html
>     - shard-tglb:         NOTRUN -> [SKIP][100] ([i915#1904])
>    [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@i915_pm_dc@dc3co-vpb-simulation.html
>     - shard-iclb:         NOTRUN -> [SKIP][101] ([i915#588])
>    [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html
> 
>   * igt@i915_pm_dc@dc6-psr:
>     - shard-tglb:         NOTRUN -> [FAIL][102] ([i915#454])
>    [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
> 
>   * igt@i915_pm_dc@dc9-dpms:
>     - shard-iclb:         [PASS][103] -> [SKIP][104] ([i915#4281])
>    [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-iclb4/igt@i915_pm_dc@dc9-dpms.html
>    [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@i915_pm_dc@dc9-dpms.html
> 
>   * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
>     - shard-kbl:          NOTRUN -> [SKIP][105] ([fdo#109271] / [i915#1937])
>    [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html
>     - shard-apl:          NOTRUN -> [SKIP][106] ([fdo#109271] / [i915#1937])
>    [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html
> 
>   * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
>     - shard-glk:          NOTRUN -> [SKIP][107] ([fdo#109271] / [i915#1937])
>    [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk7/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
> 
>   * igt@i915_pm_rpm@pc8-residency:
>     - shard-iclb:         NOTRUN -> [SKIP][108] ([fdo#109293] / [fdo#109506])
>    [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@i915_pm_rpm@pc8-residency.html
>     - shard-tglb:         NOTRUN -> [SKIP][109] ([fdo#109506] / [i915#2411])
>    [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@i915_pm_rpm@pc8-residency.html
> 
>   * igt@i915_selftest@live@gt_pm:
>     - shard-skl:          NOTRUN -> [DMESG-FAIL][110] ([i915#1886])
>    [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@i915_selftest@live@gt_pm.html
> 
>   * igt@i915_selftest@live@hangcheck:
>     - shard-snb:          [PASS][111] -> [INCOMPLETE][112] ([i915#3921])
>    [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-snb7/igt@i915_selftest@live@hangcheck.html
>    [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb2/igt@i915_selftest@live@hangcheck.html
> 
>   * igt@i915_suspend@forcewake:
>     - shard-kbl:          [PASS][113] -> [DMESG-WARN][114] ([i915#180]) +1 similar issue
>    [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-kbl1/igt@i915_suspend@forcewake.html
>    [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@i915_suspend@forcewake.html
> 
>   * igt@kms_atomic@atomic_plane_damage:
>     - shard-iclb:         NOTRUN -> [SKIP][115] ([i915#4765])
>    [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb8/igt@kms_atomic@atomic_plane_damage.html
> 
>   * igt@kms_atomic@plane-primary-overlay-mutable-zpos:
>     - shard-tglb:         NOTRUN -> [SKIP][116] ([i915#404])
>    [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@kms_atomic@plane-primary-overlay-mutable-zpos.html
> 
>   * igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
>     - shard-tglb:         NOTRUN -> [SKIP][117] ([i915#1769])
>    [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb6/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html
> 
>   * igt@kms_big_fb@4-tiled-8bpp-rotate-90:
>     - shard-kbl:          NOTRUN -> [SKIP][118] ([fdo#109271]) +234 similar issues
>    [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl4/igt@kms_big_fb@4-tiled-8bpp-rotate-90.html
> 
>   * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0:
>     - shard-tglb:         NOTRUN -> [SKIP][119] ([i915#5286]) +3 similar issues
>    [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0.html
> 
>   * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
>     - shard-iclb:         NOTRUN -> [SKIP][120] ([i915#5286]) +3 similar issues
>    [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb3/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-async-flip.html
> 
>   * igt@kms_big_fb@linear-16bpp-rotate-90:
>     - shard-iclb:         NOTRUN -> [SKIP][121] ([fdo#110725] / [fdo#111614])
>    [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@kms_big_fb@linear-16bpp-rotate-90.html
> 
>   * igt@kms_big_fb@x-tiled-8bpp-rotate-90:
>     - shard-tglb:         NOTRUN -> [SKIP][122] ([fdo#111614]) +3 similar issues
>    [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html
> 
>   * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
>     - shard-skl:          NOTRUN -> [FAIL][123] ([i915#3743])
>    [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-async-flip.html
> 
>   * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
>     - shard-kbl:          NOTRUN -> [SKIP][124] ([fdo#109271] / [i915#3777]) +2 similar issues
>    [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
> 
>   * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
>     - shard-skl:          NOTRUN -> [SKIP][125] ([fdo#109271] / [i915#3777]) +2 similar issues
>    [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl1/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
>     - shard-apl:          NOTRUN -> [SKIP][126] ([fdo#109271] / [i915#3777])
>    [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl3/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
> 
>   * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
>     - shard-skl:          NOTRUN -> [FAIL][127] ([i915#3763])
>    [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl7/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html
> 
>   * igt@kms_big_fb@yf-tiled-32bpp-rotate-0:
>     - shard-glk:          [PASS][128] -> [DMESG-WARN][129] ([i915#118])
>    [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11438/shard-glk6/igt@kms_big_fb@yf-tiled-32bpp-rotate-0.html
>    [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk6/igt@kms_big_fb@yf-tiled-32bpp-rotate-0.html
> 
>   * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
>     - shard-iclb:         NOTRUN -> [SKIP][130] ([fdo#110723])
>    [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html
> 
>   * igt@kms_big_joiner@invalid-modeset:
>     - shard-iclb:         NOTRUN -> [SKIP][131] ([i915#2705])
>    [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_big_joiner@invalid-modeset.html
>     - shard-tglb:         NOTRUN -> [SKIP][132] ([i915#2705])
>    [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@kms_big_joiner@invalid-modeset.html
> 
>   * igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
>     - shard-iclb:         NOTRUN -> [SKIP][133] ([fdo#109278] / [i915#3886]) +6 similar issues
>    [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb2/igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html
> 
>   * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
>     - shard-kbl:          NOTRUN -> [SKIP][134] ([fdo#109271] / [i915#3886]) +12 similar issues
>    [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl3/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
> 
>   * igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_ccs:
>     - shard-tglb:         NOTRUN -> [SKIP][135] ([i915#3689]) +8 similar issues
>    [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_ccs.html
> 
>   * igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:
>     - shard-tglb:         NOTRUN -> [SKIP][136] ([i915#3689] / [i915#3886]) +3 similar issues
>    [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb5/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html
> 
>   * igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
>     - shard-skl:          NOTRUN -> [SKIP][137] ([fdo#109271] / [i915#3886]) +16 similar issues
>    [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl9/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
>     - shard-glk:          NOTRUN -> [SKIP][138] ([fdo#109271] / [i915#3886]) +3 similar issues
>    [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk8/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
>     - shard-apl:          NOTRUN -> [SKIP][139] ([fdo#109271] / [i915#3886]) +5 similar issues
>    [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl6/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
> 
>   * igt@kms_ccs@pipe-d-missing-ccs-buffer-yf_tiled_ccs:
>     - shard-tglb:         NOTRUN -> [SKIP][140] ([fdo#111615] / [i915#3689]) +8 similar issues
>    [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb7/igt@kms_ccs@pipe-d-missing-ccs-buffer-yf_tiled_ccs.html
> 
>   * igt@kms_chamelium@hdmi-hpd-fast:
>     - shard-snb:          NOTRUN -> [SKIP][141] ([fdo#109271] / [fdo#111827]) +4 similar issues
>    [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-snb7/igt@kms_chamelium@hdmi-hpd-fast.html
> 
>   * igt@kms_chamelium@hdmi-hpd-storm:
>     - shard-kbl:          NOTRUN -> [SKIP][142] ([fdo#109271] / [fdo#111827]) +16 similar issues
>    [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-kbl1/igt@kms_chamelium@hdmi-hpd-storm.html
> 
>   * igt@kms_color@pipe-d-ctm-0-25:
>     - shard-iclb:         NOTRUN -> [SKIP][143] ([fdo#109278] / [i915#1149]) +1 similar issue
>    [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb6/igt@kms_color@pipe-d-ctm-0-25.html
> 
>   * igt@kms_color_chamelium@pipe-b-ctm-0-5:
>     - shard-tglb:         NOTRUN -> [SKIP][144] ([fdo#109284] / [fdo#111827]) +14 similar issues
>    [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb1/igt@kms_color_chamelium@pipe-b-ctm-0-5.html
> 
>   * igt@kms_color_chamelium@pipe-b-ctm-max:
>     - shard-skl:          NOTRUN -> [SKIP][145] ([fdo#109271] / [fdo#111827]) +18 similar issues
>    [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-skl10/igt@kms_color_chamelium@pipe-b-ctm-max.html
> 
>   * igt@kms_color_chamelium@pipe-b-ctm-red-to-blue:
>     - shard-iclb:         NOTRUN -> [SKIP][146] ([fdo#109284] / [fdo#111827]) +11 similar issues
>    [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html
>     - shard-apl:          NOTRUN -> [SKIP][147] ([fdo#109271] / [fdo#111827]) +6 similar issues
>    [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-apl4/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html
>     - shard-glk:          NOTRUN -> [SKIP][148] ([fdo#109271] / [fdo#111827]) +4 similar issues
>    [148]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html
> 
>   * igt@kms_color_chamelium@pipe-d-ctm-0-5:
>     - shard-iclb:         NOTRUN -> [SKIP][149] ([fdo#109278] / [fdo#109284] / [fdo#111827])
>    [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_color_chamelium@pipe-d-ctm-0-5.html
> 
>   * igt@kms_content_protection@atomic:
>     - shard-iclb:         NOTRUN -> [SKIP][150] ([fdo#109300] / [fdo#111066]) +1 similar issue
>    [150]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-iclb5/igt@kms_content_protection@atomic.html
> 
>   * igt@kms_content_protection@dp-mst-lic-type-0:
>     - shard-tglb:         NOTRUN -> [SKIP][151] ([i915#3116] / [i915#3299]) +1 similar issue
>    [151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-tglb5/igt@kms_content_protection@dp-mst-lic-type-0.html
> 
>   * igt@kms_content_protection@srm:
>     - shard-glk:          NOTRUN -> [SKIP][152] ([fdo#109271]) +69 similar issues
>    [152]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/shard-glk2/igt@kms_content_protection@srm.html
>     - shard-tglb:         NOTRUN -> [SKIP][153] ([i915#1063])
>    [153]: https://intel-gfx-ci.01.org/tr
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22758/index.html

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

* Re: [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-01 14:31       ` [Intel-gfx] " Christian König
@ 2022-04-02  3:02         ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-02  3:02 UTC (permalink / raw)
  To: Christian König; +Cc: intel-gfx, dri-devel, rodrigo.vivi

On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> I would be nicer to push this through drm-misc-next, but the intel branch
> works for me as well.
Hi Christian

I have pushed this patch into drm-misc-next.

Regards,
Ram.
> 
> Regards,
> Christian.
> 
> Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > Christian, Joonas and vivi
> > 
> > Once the premerge results are greeen, if this patch can be merged into
> > drm-intel-gt-next along with other patches could you please ack the
> > request to merge into drm-intel-gt-next?
> > 
> > Thanks
> > Ram
> > 
> > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > driver needs extra pages in ttm_tt.
> > > 
> > > v2:
> > >    Used imperative wording [Thomas and Christian]
> > > 
> > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > cc: Christian Koenig <christian.koenig@amd.com>
> > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > ---
> > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > index dc7f938bfff2..123045b58fec 100644
> > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   	if (!tt)
> > >   		return NULL;
> > > -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > >   	if (ret < 0)
> > >   		goto err_ttm_tt_init;
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > index c40aca99442f..a878910a563c 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   		i915_tt->is_shmem = true;
> > >   	}
> > > -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > >   	if (ret)
> > >   		goto err_free;
> > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > index 95df5750f47f..9ba871bd19b1 100644
> > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > >   	if (ttm == NULL)
> > >   		return NULL;
> > > -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > >   		kfree(ttm);
> > >   		return NULL;
> > >   	}
> > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > >   	agp_be->mem = NULL;
> > >   	agp_be->bridge = bridge;
> > > -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > >   		kfree(agp_be);
> > >   		return NULL;
> > >   	}
> > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > index d234aab800a0..1a66d9fc589a 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > >   			       struct ttm_buffer_object *bo,
> > >   			       uint32_t page_flags,
> > > -			       enum ttm_caching caching)
> > > +			       enum ttm_caching caching,
> > > +			       unsigned long extra_pages)
> > >   {
> > > -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > >   	ttm->caching = ttm_cached;
> > >   	ttm->page_flags = page_flags;
> > >   	ttm->dma_address = NULL;
> > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > >   }
> > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > -		uint32_t page_flags, enum ttm_caching caching)
> > > +		uint32_t page_flags, enum ttm_caching caching,
> > > +		unsigned long extra_pages)
> > >   {
> > > -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > >   	if (ttm_tt_alloc_page_directory(ttm)) {
> > >   		pr_err("Failed allocating page table\n");
> > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > >   {
> > >   	int ret;
> > > -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > >   	if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > >   		ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > index b84ecc6d6611..4e3938e62c08 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   				     ttm_cached);
> > >   	else
> > >   		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > -				  ttm_cached);
> > > +				  ttm_cached, 0);
> > >   	if (unlikely(ret != 0))
> > >   		goto out_no_init;
> > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > index f20832139815..17a0310e8aaa 100644
> > > --- a/include/drm/ttm/ttm_tt.h
> > > +++ b/include/drm/ttm/ttm_tt.h
> > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > >    * @bo: The buffer object we create the ttm for.
> > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > >    * @caching: the desired caching state of the pages
> > > + * @extra_pages: Extra pages needed for the driver.
> > >    *
> > >    * Create a struct ttm_tt to back data with system memory pages.
> > >    * No pages are actually allocated.
> > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > >    * NULL: Out of memory.
> > >    */
> > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > -		uint32_t page_flags, enum ttm_caching caching);
> > > +		uint32_t page_flags, enum ttm_caching caching,
> > > +		unsigned long extra_pages);
> > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > >   		   uint32_t page_flags, enum ttm_caching caching);
> > > -- 
> > > 2.20.1
> > > 
> 

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

* Re: [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-02  3:02         ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-02  3:02 UTC (permalink / raw)
  To: Christian König; +Cc: intel-gfx, dri-devel, rodrigo.vivi

On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> I would be nicer to push this through drm-misc-next, but the intel branch
> works for me as well.
Hi Christian

I have pushed this patch into drm-misc-next.

Regards,
Ram.
> 
> Regards,
> Christian.
> 
> Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > Christian, Joonas and vivi
> > 
> > Once the premerge results are greeen, if this patch can be merged into
> > drm-intel-gt-next along with other patches could you please ack the
> > request to merge into drm-intel-gt-next?
> > 
> > Thanks
> > Ram
> > 
> > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > driver needs extra pages in ttm_tt.
> > > 
> > > v2:
> > >    Used imperative wording [Thomas and Christian]
> > > 
> > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > cc: Christian Koenig <christian.koenig@amd.com>
> > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > ---
> > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > index dc7f938bfff2..123045b58fec 100644
> > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   	if (!tt)
> > >   		return NULL;
> > > -	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > +	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > >   	if (ret < 0)
> > >   		goto err_ttm_tt_init;
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > index c40aca99442f..a878910a563c 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   		i915_tt->is_shmem = true;
> > >   	}
> > > -	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > +	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > >   	if (ret)
> > >   		goto err_free;
> > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > index 95df5750f47f..9ba871bd19b1 100644
> > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > >   	if (ttm == NULL)
> > >   		return NULL;
> > > -	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > +	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > >   		kfree(ttm);
> > >   		return NULL;
> > >   	}
> > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > >   	agp_be->mem = NULL;
> > >   	agp_be->bridge = bridge;
> > > -	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > +	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > >   		kfree(agp_be);
> > >   		return NULL;
> > >   	}
> > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > index d234aab800a0..1a66d9fc589a 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > >   			       struct ttm_buffer_object *bo,
> > >   			       uint32_t page_flags,
> > > -			       enum ttm_caching caching)
> > > +			       enum ttm_caching caching,
> > > +			       unsigned long extra_pages)
> > >   {
> > > -	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > +	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > >   	ttm->caching = ttm_cached;
> > >   	ttm->page_flags = page_flags;
> > >   	ttm->dma_address = NULL;
> > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > >   }
> > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > -		uint32_t page_flags, enum ttm_caching caching)
> > > +		uint32_t page_flags, enum ttm_caching caching,
> > > +		unsigned long extra_pages)
> > >   {
> > > -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > +	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > >   	if (ttm_tt_alloc_page_directory(ttm)) {
> > >   		pr_err("Failed allocating page table\n");
> > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > >   {
> > >   	int ret;
> > > -	ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > +	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > >   	if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > >   		ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > index b84ecc6d6611..4e3938e62c08 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > >   				     ttm_cached);
> > >   	else
> > >   		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > -				  ttm_cached);
> > > +				  ttm_cached, 0);
> > >   	if (unlikely(ret != 0))
> > >   		goto out_no_init;
> > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > index f20832139815..17a0310e8aaa 100644
> > > --- a/include/drm/ttm/ttm_tt.h
> > > +++ b/include/drm/ttm/ttm_tt.h
> > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > >    * @bo: The buffer object we create the ttm for.
> > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > >    * @caching: the desired caching state of the pages
> > > + * @extra_pages: Extra pages needed for the driver.
> > >    *
> > >    * Create a struct ttm_tt to back data with system memory pages.
> > >    * No pages are actually allocated.
> > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > >    * NULL: Out of memory.
> > >    */
> > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > -		uint32_t page_flags, enum ttm_caching caching);
> > > +		uint32_t page_flags, enum ttm_caching caching,
> > > +		unsigned long extra_pages);
> > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > >   		   uint32_t page_flags, enum ttm_caching caching);
> > > -- 
> > > 2.20.1
> > > 
> 

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

* Re: [PATCH v7 3/9] drm/i915/gt: Optimize the migration and clear loop
  2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
@ 2022-04-05  9:43     ` Balasubramani Vivekanandan
  -1 siblings, 0 replies; 38+ messages in thread
From: Balasubramani Vivekanandan @ 2022-04-05  9:43 UTC (permalink / raw)
  To: Ramalingam C, intel-gfx, dri-devel

On 01.04.2022 18:07, Ramalingam C wrote:
> Move the static calculations out of the loops for copy and clear.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_migrate.c | 40 ++++++++++++-------------
>  1 file changed, 19 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
> index e81f20266f62..580b4cf1efa2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_migrate.c
> +++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
> @@ -526,6 +526,7 @@ intel_context_migrate_copy(struct intel_context *ce,
>  			   struct i915_request **out)
>  {
>  	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
> +	u32 src_offset, dst_offset;
>  	struct i915_request *rq;
>  	int err;
>  
> @@ -535,8 +536,18 @@ intel_context_migrate_copy(struct intel_context *ce,
>  
>  	GEM_BUG_ON(ce->ring->size < SZ_64K);
>  
> +	src_offset = 0;
> +	dst_offset = CHUNK_SZ;
> +	if (HAS_64K_PAGES(ce->engine->i915)) {
> +		src_offset = 0;
> +		dst_offset = 0;
> +		if (src_is_lmem)
> +			src_offset = CHUNK_SZ;
> +		if (dst_is_lmem)
> +			dst_offset = 2 * CHUNK_SZ;
> +	}
> +
>  	do {
> -		u32 src_offset, dst_offset;
>  		int len;
>  
>  		rq = i915_request_create(ce);
> @@ -564,17 +575,6 @@ intel_context_migrate_copy(struct intel_context *ce,
>  		if (err)
>  			goto out_rq;
>  
> -		src_offset = 0;
> -		dst_offset = CHUNK_SZ;
> -		if (HAS_64K_PAGES(ce->engine->i915)) {
> -			src_offset = 0;
> -			dst_offset = 0;
> -			if (src_is_lmem)
> -				src_offset = CHUNK_SZ;
> -			if (dst_is_lmem)
> -				dst_offset = 2 * CHUNK_SZ;
> -		}
> -
>  		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
>  			       src_offset, CHUNK_SZ);
>  		if (len <= 0) {
> @@ -584,12 +584,10 @@ intel_context_migrate_copy(struct intel_context *ce,
>  
>  		err = emit_pte(rq, &it_dst, dst_cache_level, dst_is_lmem,
>  			       dst_offset, len);
> -		if (err < 0)
> -			goto out_rq;
> -		if (err < len) {
> +		if (err < len)
>  			err = -EINVAL;
> +		if (err < 0)
>  			goto out_rq;
> -		}
did you take a look at my comment at https://patchwork.freedesktop.org/patch/479847/?series=101106&rev=6?
Above change looks like a regression, can you check again?

Regards,
Bala

>  
>  		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
>  		if (err)
> @@ -690,6 +688,7 @@ intel_context_migrate_clear(struct intel_context *ce,
>  {
>  	struct sgt_dma it = sg_sgt(sg);
>  	struct i915_request *rq;
> +	u32 offset;
>  	int err;
>  
>  	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
> @@ -697,8 +696,11 @@ intel_context_migrate_clear(struct intel_context *ce,
>  
>  	GEM_BUG_ON(ce->ring->size < SZ_64K);
>  
> +	offset = 0;
> +	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
> +		offset = CHUNK_SZ;
> +
>  	do {
> -		u32 offset;
>  		int len;
>  
>  		rq = i915_request_create(ce);
> @@ -726,10 +728,6 @@ intel_context_migrate_clear(struct intel_context *ce,
>  		if (err)
>  			goto out_rq;
>  
> -		offset = 0;
> -		if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
> -			offset = CHUNK_SZ;
> -
>  		len = emit_pte(rq, &it, cache_level, is_lmem, offset, CHUNK_SZ);
>  		if (len <= 0) {
>  			err = len;
> -- 
> 2.20.1
> 

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

* Re: [Intel-gfx] [PATCH v7 3/9] drm/i915/gt: Optimize the migration and clear loop
@ 2022-04-05  9:43     ` Balasubramani Vivekanandan
  0 siblings, 0 replies; 38+ messages in thread
From: Balasubramani Vivekanandan @ 2022-04-05  9:43 UTC (permalink / raw)
  To: Ramalingam C, intel-gfx, dri-devel

On 01.04.2022 18:07, Ramalingam C wrote:
> Move the static calculations out of the loops for copy and clear.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_migrate.c | 40 ++++++++++++-------------
>  1 file changed, 19 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
> index e81f20266f62..580b4cf1efa2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_migrate.c
> +++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
> @@ -526,6 +526,7 @@ intel_context_migrate_copy(struct intel_context *ce,
>  			   struct i915_request **out)
>  {
>  	struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst);
> +	u32 src_offset, dst_offset;
>  	struct i915_request *rq;
>  	int err;
>  
> @@ -535,8 +536,18 @@ intel_context_migrate_copy(struct intel_context *ce,
>  
>  	GEM_BUG_ON(ce->ring->size < SZ_64K);
>  
> +	src_offset = 0;
> +	dst_offset = CHUNK_SZ;
> +	if (HAS_64K_PAGES(ce->engine->i915)) {
> +		src_offset = 0;
> +		dst_offset = 0;
> +		if (src_is_lmem)
> +			src_offset = CHUNK_SZ;
> +		if (dst_is_lmem)
> +			dst_offset = 2 * CHUNK_SZ;
> +	}
> +
>  	do {
> -		u32 src_offset, dst_offset;
>  		int len;
>  
>  		rq = i915_request_create(ce);
> @@ -564,17 +575,6 @@ intel_context_migrate_copy(struct intel_context *ce,
>  		if (err)
>  			goto out_rq;
>  
> -		src_offset = 0;
> -		dst_offset = CHUNK_SZ;
> -		if (HAS_64K_PAGES(ce->engine->i915)) {
> -			src_offset = 0;
> -			dst_offset = 0;
> -			if (src_is_lmem)
> -				src_offset = CHUNK_SZ;
> -			if (dst_is_lmem)
> -				dst_offset = 2 * CHUNK_SZ;
> -		}
> -
>  		len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
>  			       src_offset, CHUNK_SZ);
>  		if (len <= 0) {
> @@ -584,12 +584,10 @@ intel_context_migrate_copy(struct intel_context *ce,
>  
>  		err = emit_pte(rq, &it_dst, dst_cache_level, dst_is_lmem,
>  			       dst_offset, len);
> -		if (err < 0)
> -			goto out_rq;
> -		if (err < len) {
> +		if (err < len)
>  			err = -EINVAL;
> +		if (err < 0)
>  			goto out_rq;
> -		}
did you take a look at my comment at https://patchwork.freedesktop.org/patch/479847/?series=101106&rev=6?
Above change looks like a regression, can you check again?

Regards,
Bala

>  
>  		err = rq->engine->emit_flush(rq, EMIT_INVALIDATE);
>  		if (err)
> @@ -690,6 +688,7 @@ intel_context_migrate_clear(struct intel_context *ce,
>  {
>  	struct sgt_dma it = sg_sgt(sg);
>  	struct i915_request *rq;
> +	u32 offset;
>  	int err;
>  
>  	GEM_BUG_ON(ce->vm != ce->engine->gt->migrate.context->vm);
> @@ -697,8 +696,11 @@ intel_context_migrate_clear(struct intel_context *ce,
>  
>  	GEM_BUG_ON(ce->ring->size < SZ_64K);
>  
> +	offset = 0;
> +	if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
> +		offset = CHUNK_SZ;
> +
>  	do {
> -		u32 offset;
>  		int len;
>  
>  		rq = i915_request_create(ce);
> @@ -726,10 +728,6 @@ intel_context_migrate_clear(struct intel_context *ce,
>  		if (err)
>  			goto out_rq;
>  
> -		offset = 0;
> -		if (HAS_64K_PAGES(ce->engine->i915) && is_lmem)
> -			offset = CHUNK_SZ;
> -
>  		len = emit_pte(rq, &it, cache_level, is_lmem, offset, CHUNK_SZ);
>  		if (len <= 0) {
>  			err = len;
> -- 
> 2.20.1
> 

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

* Re: [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-02  3:02         ` [Intel-gfx] " Ramalingam C
@ 2022-04-13  8:28           ` Joonas Lahtinen
  -1 siblings, 0 replies; 38+ messages in thread
From: Joonas Lahtinen @ 2022-04-13  8:28 UTC (permalink / raw)
  To: Christian König, Ramalingam C
  Cc: Tvrtko Ursulin, intel-gfx, dri-devel, rodrigo.vivi

(+ Tvrtko and Jani)

Quoting Ramalingam C (2022-04-02 06:02:38)
> On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> > I would be nicer to push this through drm-misc-next, but the intel branch
> > works for me as well.
> Hi Christian
> 
> I have pushed this patch into drm-misc-next.

I've now backmerged drm-next containing this commit to drm-intel-gt-next
in order to unblock merging the rest of the series.

> Regards,
> Ram.
> > 
> > Regards,
> > Christian.
> > 
> > Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > > Christian, Joonas and vivi
> > > 
> > > Once the premerge results are greeen, if this patch can be merged into
> > > drm-intel-gt-next along with other patches could you please ack the
> > > request to merge into drm-intel-gt-next?

For future reference, when in doubt who are the right ones to handle,
add all the maintainers and wait for them to reply before proceeding.

Then we can avoid some unnecessary churn where there are more
straightforward options like here: merge via drm-intel-gt-next as
nobody else needs the new functions yet.

Regards, Joonas

> > > Thanks
> > > Ram
> > > 
> > > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > > driver needs extra pages in ttm_tt.
> > > > 
> > > > v2:
> > > >    Used imperative wording [Thomas and Christian]
> > > > 
> > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > cc: Christian Koenig <christian.koenig@amd.com>
> > > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > > ---
> > > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > index dc7f938bfff2..123045b58fec 100644
> > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >           if (!tt)
> > > >                   return NULL;
> > > > - ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > > + ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > > >           if (ret < 0)
> > > >                   goto err_ttm_tt_init;
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > index c40aca99442f..a878910a563c 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >                   i915_tt->is_shmem = true;
> > > >           }
> > > > - ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > > + ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > > >           if (ret)
> > > >                   goto err_free;
> > > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > index 95df5750f47f..9ba871bd19b1 100644
> > > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >           ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > > >           if (ttm == NULL)
> > > >                   return NULL;
> > > > - if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > > + if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > > >                   kfree(ttm);
> > > >                   return NULL;
> > > >           }
> > > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > > >           agp_be->mem = NULL;
> > > >           agp_be->bridge = bridge;
> > > > - if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > > + if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > > >                   kfree(agp_be);
> > > >                   return NULL;
> > > >           }
> > > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > index d234aab800a0..1a66d9fc589a 100644
> > > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > >                                  struct ttm_buffer_object *bo,
> > > >                                  uint32_t page_flags,
> > > > -                        enum ttm_caching caching)
> > > > +                        enum ttm_caching caching,
> > > > +                        unsigned long extra_pages)
> > > >   {
> > > > - ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > > + ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > > >           ttm->caching = ttm_cached;
> > > >           ttm->page_flags = page_flags;
> > > >           ttm->dma_address = NULL;
> > > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > >   }
> > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > -         uint32_t page_flags, enum ttm_caching caching)
> > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > +         unsigned long extra_pages)
> > > >   {
> > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > > >           if (ttm_tt_alloc_page_directory(ttm)) {
> > > >                   pr_err("Failed allocating page table\n");
> > > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > >   {
> > > >           int ret;
> > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > > >           if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > > >                   ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > index b84ecc6d6611..4e3938e62c08 100644
> > > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >                                        ttm_cached);
> > > >           else
> > > >                   ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > > -                           ttm_cached);
> > > > +                           ttm_cached, 0);
> > > >           if (unlikely(ret != 0))
> > > >                   goto out_no_init;
> > > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > > index f20832139815..17a0310e8aaa 100644
> > > > --- a/include/drm/ttm/ttm_tt.h
> > > > +++ b/include/drm/ttm/ttm_tt.h
> > > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > >    * @bo: The buffer object we create the ttm for.
> > > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > > >    * @caching: the desired caching state of the pages
> > > > + * @extra_pages: Extra pages needed for the driver.
> > > >    *
> > > >    * Create a struct ttm_tt to back data with system memory pages.
> > > >    * No pages are actually allocated.
> > > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > >    * NULL: Out of memory.
> > > >    */
> > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > -         uint32_t page_flags, enum ttm_caching caching);
> > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > +         unsigned long extra_pages);
> > > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > > >                      uint32_t page_flags, enum ttm_caching caching);
> > > > -- 
> > > > 2.20.1
> > > > 
> > 

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

* Re: [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-13  8:28           ` Joonas Lahtinen
  0 siblings, 0 replies; 38+ messages in thread
From: Joonas Lahtinen @ 2022-04-13  8:28 UTC (permalink / raw)
  To: Christian König, Ramalingam C; +Cc: intel-gfx, dri-devel, rodrigo.vivi

(+ Tvrtko and Jani)

Quoting Ramalingam C (2022-04-02 06:02:38)
> On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> > I would be nicer to push this through drm-misc-next, but the intel branch
> > works for me as well.
> Hi Christian
> 
> I have pushed this patch into drm-misc-next.

I've now backmerged drm-next containing this commit to drm-intel-gt-next
in order to unblock merging the rest of the series.

> Regards,
> Ram.
> > 
> > Regards,
> > Christian.
> > 
> > Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > > Christian, Joonas and vivi
> > > 
> > > Once the premerge results are greeen, if this patch can be merged into
> > > drm-intel-gt-next along with other patches could you please ack the
> > > request to merge into drm-intel-gt-next?

For future reference, when in doubt who are the right ones to handle,
add all the maintainers and wait for them to reply before proceeding.

Then we can avoid some unnecessary churn where there are more
straightforward options like here: merge via drm-intel-gt-next as
nobody else needs the new functions yet.

Regards, Joonas

> > > Thanks
> > > Ram
> > > 
> > > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > > driver needs extra pages in ttm_tt.
> > > > 
> > > > v2:
> > > >    Used imperative wording [Thomas and Christian]
> > > > 
> > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > cc: Christian Koenig <christian.koenig@amd.com>
> > > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > > ---
> > > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > index dc7f938bfff2..123045b58fec 100644
> > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >           if (!tt)
> > > >                   return NULL;
> > > > - ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > > + ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > > >           if (ret < 0)
> > > >                   goto err_ttm_tt_init;
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > index c40aca99442f..a878910a563c 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >                   i915_tt->is_shmem = true;
> > > >           }
> > > > - ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > > + ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > > >           if (ret)
> > > >                   goto err_free;
> > > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > index 95df5750f47f..9ba871bd19b1 100644
> > > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >           ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > > >           if (ttm == NULL)
> > > >                   return NULL;
> > > > - if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > > + if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > > >                   kfree(ttm);
> > > >                   return NULL;
> > > >           }
> > > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > > >           agp_be->mem = NULL;
> > > >           agp_be->bridge = bridge;
> > > > - if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > > + if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > > >                   kfree(agp_be);
> > > >                   return NULL;
> > > >           }
> > > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > index d234aab800a0..1a66d9fc589a 100644
> > > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > >                                  struct ttm_buffer_object *bo,
> > > >                                  uint32_t page_flags,
> > > > -                        enum ttm_caching caching)
> > > > +                        enum ttm_caching caching,
> > > > +                        unsigned long extra_pages)
> > > >   {
> > > > - ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > > + ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > > >           ttm->caching = ttm_cached;
> > > >           ttm->page_flags = page_flags;
> > > >           ttm->dma_address = NULL;
> > > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > >   }
> > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > -         uint32_t page_flags, enum ttm_caching caching)
> > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > +         unsigned long extra_pages)
> > > >   {
> > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > > >           if (ttm_tt_alloc_page_directory(ttm)) {
> > > >                   pr_err("Failed allocating page table\n");
> > > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > >   {
> > > >           int ret;
> > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > > >           if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > > >                   ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > index b84ecc6d6611..4e3938e62c08 100644
> > > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > > >                                        ttm_cached);
> > > >           else
> > > >                   ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > > -                           ttm_cached);
> > > > +                           ttm_cached, 0);
> > > >           if (unlikely(ret != 0))
> > > >                   goto out_no_init;
> > > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > > index f20832139815..17a0310e8aaa 100644
> > > > --- a/include/drm/ttm/ttm_tt.h
> > > > +++ b/include/drm/ttm/ttm_tt.h
> > > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > >    * @bo: The buffer object we create the ttm for.
> > > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > > >    * @caching: the desired caching state of the pages
> > > > + * @extra_pages: Extra pages needed for the driver.
> > > >    *
> > > >    * Create a struct ttm_tt to back data with system memory pages.
> > > >    * No pages are actually allocated.
> > > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > >    * NULL: Out of memory.
> > > >    */
> > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > -         uint32_t page_flags, enum ttm_caching caching);
> > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > +         unsigned long extra_pages);
> > > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > > >                      uint32_t page_flags, enum ttm_caching caching);
> > > > -- 
> > > > 2.20.1
> > > > 
> > 

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

* Re: [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-04-13  8:28           ` [Intel-gfx] " Joonas Lahtinen
@ 2022-04-13 10:03             ` Ramalingam C
  -1 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-13 10:03 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Tvrtko Ursulin, intel-gfx, dri-devel, rodrigo.vivi, Christian König

On 2022-04-13 at 11:28:28 +0300, Joonas Lahtinen wrote:
> (+ Tvrtko and Jani)
> 
> Quoting Ramalingam C (2022-04-02 06:02:38)
> > On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> > > I would be nicer to push this through drm-misc-next, but the intel branch
> > > works for me as well.
> > Hi Christian
> > 
> > I have pushed this patch into drm-misc-next.
> 
> I've now backmerged drm-next containing this commit to drm-intel-gt-next
> in order to unblock merging the rest of the series.
> 
> > Regards,
> > Ram.
> > > 
> > > Regards,
> > > Christian.
> > > 
> > > Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > > > Christian, Joonas and vivi
> > > > 
> > > > Once the premerge results are greeen, if this patch can be merged into
> > > > drm-intel-gt-next along with other patches could you please ack the
> > > > request to merge into drm-intel-gt-next?
> 
> For future reference, when in doubt who are the right ones to handle,
> add all the maintainers and wait for them to reply before proceeding.
> 
> Then we can avoid some unnecessary churn where there are more
> straightforward options like here: merge via drm-intel-gt-next as
> nobody else needs the new functions yet.
Sure Joonas! thank you for backmerging!

Ram
> 
> Regards, Joonas
> 
> > > > Thanks
> > > > Ram
> > > > 
> > > > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > > > driver needs extra pages in ttm_tt.
> > > > > 
> > > > > v2:
> > > > >    Used imperative wording [Thomas and Christian]
> > > > > 
> > > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > > cc: Christian Koenig <christian.koenig@amd.com>
> > > > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > > > ---
> > > > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > > > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > > > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > > > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > > > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > > > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > > > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > > > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > index dc7f938bfff2..123045b58fec 100644
> > > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >           if (!tt)
> > > > >                   return NULL;
> > > > > - ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > > > + ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > > > >           if (ret < 0)
> > > > >                   goto err_ttm_tt_init;
> > > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > index c40aca99442f..a878910a563c 100644
> > > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >                   i915_tt->is_shmem = true;
> > > > >           }
> > > > > - ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > > > + ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > > > >           if (ret)
> > > > >                   goto err_free;
> > > > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > index 95df5750f47f..9ba871bd19b1 100644
> > > > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >           ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > > > >           if (ttm == NULL)
> > > > >                   return NULL;
> > > > > - if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > > > + if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > > > >                   kfree(ttm);
> > > > >                   return NULL;
> > > > >           }
> > > > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > > > >           agp_be->mem = NULL;
> > > > >           agp_be->bridge = bridge;
> > > > > - if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > > > + if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > > > >                   kfree(agp_be);
> > > > >                   return NULL;
> > > > >           }
> > > > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > index d234aab800a0..1a66d9fc589a 100644
> > > > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > > > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > > >                                  struct ttm_buffer_object *bo,
> > > > >                                  uint32_t page_flags,
> > > > > -                        enum ttm_caching caching)
> > > > > +                        enum ttm_caching caching,
> > > > > +                        unsigned long extra_pages)
> > > > >   {
> > > > > - ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > > > + ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > > > >           ttm->caching = ttm_cached;
> > > > >           ttm->page_flags = page_flags;
> > > > >           ttm->dma_address = NULL;
> > > > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > > >   }
> > > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > > -         uint32_t page_flags, enum ttm_caching caching)
> > > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > > +         unsigned long extra_pages)
> > > > >   {
> > > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > > > >           if (ttm_tt_alloc_page_directory(ttm)) {
> > > > >                   pr_err("Failed allocating page table\n");
> > > > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > >   {
> > > > >           int ret;
> > > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > > > >           if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > > > >                   ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > index b84ecc6d6611..4e3938e62c08 100644
> > > > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >                                        ttm_cached);
> > > > >           else
> > > > >                   ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > > > -                           ttm_cached);
> > > > > +                           ttm_cached, 0);
> > > > >           if (unlikely(ret != 0))
> > > > >                   goto out_no_init;
> > > > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > > > index f20832139815..17a0310e8aaa 100644
> > > > > --- a/include/drm/ttm/ttm_tt.h
> > > > > +++ b/include/drm/ttm/ttm_tt.h
> > > > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > > >    * @bo: The buffer object we create the ttm for.
> > > > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > > > >    * @caching: the desired caching state of the pages
> > > > > + * @extra_pages: Extra pages needed for the driver.
> > > > >    *
> > > > >    * Create a struct ttm_tt to back data with system memory pages.
> > > > >    * No pages are actually allocated.
> > > > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > > >    * NULL: Out of memory.
> > > > >    */
> > > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > > -         uint32_t page_flags, enum ttm_caching caching);
> > > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > > +         unsigned long extra_pages);
> > > > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > > > >                      uint32_t page_flags, enum ttm_caching caching);
> > > > > -- 
> > > > > 2.20.1
> > > > > 
> > > 

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

* Re: [Intel-gfx] [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
@ 2022-04-13 10:03             ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-04-13 10:03 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: intel-gfx, dri-devel, rodrigo.vivi, Christian König

On 2022-04-13 at 11:28:28 +0300, Joonas Lahtinen wrote:
> (+ Tvrtko and Jani)
> 
> Quoting Ramalingam C (2022-04-02 06:02:38)
> > On 2022-04-01 at 16:31:19 +0200, Christian König wrote:
> > > I would be nicer to push this through drm-misc-next, but the intel branch
> > > works for me as well.
> > Hi Christian
> > 
> > I have pushed this patch into drm-misc-next.
> 
> I've now backmerged drm-next containing this commit to drm-intel-gt-next
> in order to unblock merging the rest of the series.
> 
> > Regards,
> > Ram.
> > > 
> > > Regards,
> > > Christian.
> > > 
> > > Am 01.04.22 um 16:28 schrieb Ramalingam C:
> > > > Christian, Joonas and vivi
> > > > 
> > > > Once the premerge results are greeen, if this patch can be merged into
> > > > drm-intel-gt-next along with other patches could you please ack the
> > > > request to merge into drm-intel-gt-next?
> 
> For future reference, when in doubt who are the right ones to handle,
> add all the maintainers and wait for them to reply before proceeding.
> 
> Then we can avoid some unnecessary churn where there are more
> straightforward options like here: merge via drm-intel-gt-next as
> nobody else needs the new functions yet.
Sure Joonas! thank you for backmerging!

Ram
> 
> Regards, Joonas
> 
> > > > Thanks
> > > > Ram
> > > > 
> > > > On 2022-04-01 at 18:07:49 +0530, Ramalingam C wrote:
> > > > > Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
> > > > > driver needs extra pages in ttm_tt.
> > > > > 
> > > > > v2:
> > > > >    Used imperative wording [Thomas and Christian]
> > > > > 
> > > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > > cc: Christian Koenig <christian.koenig@amd.com>
> > > > > cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
> > > > > Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
> > > > > Reviewed-by: Christian Konig <christian.koenig@amd.com>
> > > > > Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> > > > > ---
> > > > >   drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
> > > > >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
> > > > >   drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
> > > > >   drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
> > > > >   drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
> > > > >   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
> > > > >   include/drm/ttm/ttm_tt.h                   |  4 +++-
> > > > >   7 files changed, 15 insertions(+), 11 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > index dc7f938bfff2..123045b58fec 100644
> > > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> > > > > @@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >           if (!tt)
> > > > >                   return NULL;
> > > > > - ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
> > > > > + ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
> > > > >           if (ret < 0)
> > > > >                   goto err_ttm_tt_init;
> > > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > index c40aca99442f..a878910a563c 100644
> > > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > > @@ -293,7 +293,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >                   i915_tt->is_shmem = true;
> > > > >           }
> > > > > - ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
> > > > > + ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
> > > > >           if (ret)
> > > > >                   goto err_free;
> > > > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > index 95df5750f47f..9ba871bd19b1 100644
> > > > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > > > @@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >           ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
> > > > >           if (ttm == NULL)
> > > > >                   return NULL;
> > > > > - if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
> > > > > + if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
> > > > >                   kfree(ttm);
> > > > >                   return NULL;
> > > > >           }
> > > > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > index 6ddc16f0fe2b..d27691f2e451 100644
> > > > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > > > @@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
> > > > >           agp_be->mem = NULL;
> > > > >           agp_be->bridge = bridge;
> > > > > - if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
> > > > > + if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
> > > > >                   kfree(agp_be);
> > > > >                   return NULL;
> > > > >           }
> > > > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > index d234aab800a0..1a66d9fc589a 100644
> > > > > --- a/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> > > > > @@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
> > > > >   static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > > >                                  struct ttm_buffer_object *bo,
> > > > >                                  uint32_t page_flags,
> > > > > -                        enum ttm_caching caching)
> > > > > +                        enum ttm_caching caching,
> > > > > +                        unsigned long extra_pages)
> > > > >   {
> > > > > - ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
> > > > > + ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> > > > >           ttm->caching = ttm_cached;
> > > > >           ttm->page_flags = page_flags;
> > > > >           ttm->dma_address = NULL;
> > > > > @@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
> > > > >   }
> > > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > > -         uint32_t page_flags, enum ttm_caching caching)
> > > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > > +         unsigned long extra_pages)
> > > > >   {
> > > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
> > > > >           if (ttm_tt_alloc_page_directory(ttm)) {
> > > > >                   pr_err("Failed allocating page table\n");
> > > > > @@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > >   {
> > > > >           int ret;
> > > > > - ttm_tt_init_fields(ttm, bo, page_flags, caching);
> > > > > + ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
> > > > >           if (page_flags & TTM_TT_FLAG_EXTERNAL)
> > > > >                   ret = ttm_sg_tt_alloc_page_directory(ttm);
> > > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > index b84ecc6d6611..4e3938e62c08 100644
> > > > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> > > > > @@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
> > > > >                                        ttm_cached);
> > > > >           else
> > > > >                   ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
> > > > > -                           ttm_cached);
> > > > > +                           ttm_cached, 0);
> > > > >           if (unlikely(ret != 0))
> > > > >                   goto out_no_init;
> > > > > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
> > > > > index f20832139815..17a0310e8aaa 100644
> > > > > --- a/include/drm/ttm/ttm_tt.h
> > > > > +++ b/include/drm/ttm/ttm_tt.h
> > > > > @@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > > >    * @bo: The buffer object we create the ttm for.
> > > > >    * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
> > > > >    * @caching: the desired caching state of the pages
> > > > > + * @extra_pages: Extra pages needed for the driver.
> > > > >    *
> > > > >    * Create a struct ttm_tt to back data with system memory pages.
> > > > >    * No pages are actually allocated.
> > > > > @@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
> > > > >    * NULL: Out of memory.
> > > > >    */
> > > > >   int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
> > > > > -         uint32_t page_flags, enum ttm_caching caching);
> > > > > +         uint32_t page_flags, enum ttm_caching caching,
> > > > > +         unsigned long extra_pages);
> > > > >   int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
> > > > >                      uint32_t page_flags, enum ttm_caching caching);
> > > > > -- 
> > > > > 2.20.1
> > > > > 
> > > 

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

* [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt
  2022-03-28 19:07 [PATCH v7 0/9] drm/i915/ttm: Evict and restore of compressed object Ramalingam C
@ 2022-03-28 19:07 ` Ramalingam C
  0 siblings, 0 replies; 38+ messages in thread
From: Ramalingam C @ 2022-03-28 19:07 UTC (permalink / raw)
  To: Hellstrom Thomas, intel-gfx, dri-devel
  Cc: Thomas Hellstrom, Nirmoy Das, Matthew Auld, Christian Koenig

Add a parameter called "extra_pages" for ttm_tt_init, to indicate that
driver needs extra pages in ttm_tt.

v2:
  Used imperative wording [Thomas and Christian]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Christian Koenig <christian.koenig@amd.com>
cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c      |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c    |  2 +-
 drivers/gpu/drm/qxl/qxl_ttm.c              |  2 +-
 drivers/gpu/drm/ttm/ttm_agp_backend.c      |  2 +-
 drivers/gpu/drm/ttm/ttm_tt.c               | 12 +++++++-----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c |  2 +-
 include/drm/ttm/ttm_tt.h                   |  4 +++-
 7 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index dc7f938bfff2..123045b58fec 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -867,7 +867,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
 	if (!tt)
 		return NULL;
 
-	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached);
+	ret = ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
 	if (ret < 0)
 		goto err_ttm_tt_init;
 
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index e4a06fcf741a..3b9f99c765c4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -290,7 +290,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
 		i915_tt->is_shmem = true;
 	}
 
-	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching);
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, 0);
 	if (ret)
 		goto err_free;
 
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 95df5750f47f..9ba871bd19b1 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -113,7 +113,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
 	ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL);
 	if (ttm == NULL)
 		return NULL;
-	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached)) {
+	if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
 		kfree(ttm);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 6ddc16f0fe2b..d27691f2e451 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -134,7 +134,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
 	agp_be->mem = NULL;
 	agp_be->bridge = bridge;
 
-	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined)) {
+	if (ttm_tt_init(&agp_be->ttm, bo, page_flags, ttm_write_combined, 0)) {
 		kfree(agp_be);
 		return NULL;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index d234aab800a0..1a66d9fc589a 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -134,9 +134,10 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
 static void ttm_tt_init_fields(struct ttm_tt *ttm,
 			       struct ttm_buffer_object *bo,
 			       uint32_t page_flags,
-			       enum ttm_caching caching)
+			       enum ttm_caching caching,
+			       unsigned long extra_pages)
 {
-	ttm->num_pages = PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT;
+	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
 	ttm->caching = ttm_cached;
 	ttm->page_flags = page_flags;
 	ttm->dma_address = NULL;
@@ -146,9 +147,10 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
 }
 
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching)
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages)
 {
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, extra_pages);
 
 	if (ttm_tt_alloc_page_directory(ttm)) {
 		pr_err("Failed allocating page table\n");
@@ -180,7 +182,7 @@ int ttm_sg_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
 {
 	int ret;
 
-	ttm_tt_init_fields(ttm, bo, page_flags, caching);
+	ttm_tt_init_fields(ttm, bo, page_flags, caching, 0);
 
 	if (page_flags & TTM_TT_FLAG_EXTERNAL)
 		ret = ttm_sg_tt_alloc_page_directory(ttm);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index b84ecc6d6611..4e3938e62c08 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -517,7 +517,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
 				     ttm_cached);
 	else
 		ret = ttm_tt_init(&vmw_be->dma_ttm, bo, page_flags,
-				  ttm_cached);
+				  ttm_cached, 0);
 	if (unlikely(ret != 0))
 		goto out_no_init;
 
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index f20832139815..17a0310e8aaa 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -140,6 +140,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * @bo: The buffer object we create the ttm for.
  * @page_flags: Page flags as identified by TTM_TT_FLAG_XX flags.
  * @caching: the desired caching state of the pages
+ * @extra_pages: Extra pages needed for the driver.
  *
  * Create a struct ttm_tt to back data with system memory pages.
  * No pages are actually allocated.
@@ -147,7 +148,8 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * NULL: Out of memory.
  */
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
-		uint32_t page_flags, enum ttm_caching caching);
+		uint32_t page_flags, enum ttm_caching caching,
+		unsigned long extra_pages);
 int ttm_sg_tt_init(struct ttm_tt *ttm_dma, struct ttm_buffer_object *bo,
 		   uint32_t page_flags, enum ttm_caching caching);
 
-- 
2.20.1


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

end of thread, other threads:[~2022-04-13 10:02 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 12:37 [PATCH v7 0/9] drm/i915/ttm: Evict and restore of compressed object Ramalingam C
2022-04-01 12:37 ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 1/9] drm/i915/gt: use engine instance directly for offset Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 2/9] drm/i915/gt: Use XY_FAST_COLOR_BLT to clear obj on graphics ver 12+ Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 3/9] drm/i915/gt: Optimize the migration and clear loop Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-05  9:43   ` Balasubramani Vivekanandan
2022-04-05  9:43     ` [Intel-gfx] " Balasubramani Vivekanandan
2022-04-01 12:37 ` [PATCH v7 4/9] drm/i915/gt: Clear compress metadata for Flat-ccs objects Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 5/9] drm/i915/selftest_migrate: Consider the possible roundup of size Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 6/9] drm/i915/selftest_migrate: Check CCS meta data clear Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 14:28   ` Ramalingam C
2022-04-01 14:28     ` [Intel-gfx] " Ramalingam C
2022-04-01 14:31     ` Christian König
2022-04-01 14:31       ` [Intel-gfx] " Christian König
2022-04-02  3:02       ` Ramalingam C
2022-04-02  3:02         ` [Intel-gfx] " Ramalingam C
2022-04-13  8:28         ` Joonas Lahtinen
2022-04-13  8:28           ` [Intel-gfx] " Joonas Lahtinen
2022-04-13 10:03           ` Ramalingam C
2022-04-13 10:03             ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 8/9] drm/i915/gem: Add extra pages in ttm_tt for ccs data Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 12:37 ` [PATCH v7 9/9] drm/i915/migrate: Evict and restore the flatccs capable lmem obj Ramalingam C
2022-04-01 12:37   ` [Intel-gfx] " Ramalingam C
2022-04-01 13:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/ttm: Evict and restore of compressed object (rev7) Patchwork
2022-04-01 13:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-04-01 14:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-01 15:59 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-04-01 18:49   ` Ramalingam C
  -- strict thread matches above, loose matches on Subject: below --
2022-03-28 19:07 [PATCH v7 0/9] drm/i915/ttm: Evict and restore of compressed object Ramalingam C
2022-03-28 19:07 ` [PATCH v7 7/9] drm/ttm: Add a parameter to add extra pages into ttm_tt Ramalingam C

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.