Skip to contentSkip to conversation

drm/i915/ttm: Evict and restore of compressed object

PATCH Superseded Ramalingam C 4 participants 13 messages Mar 7, 2022

Subsystems (6)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v3 cover drm/i915/ttm: Evict and restore of compressed object

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

v3:
Fast_Clear_0 is used for clearing the ccs data on obj allocation [Thomas] Migration of main memory and ccs data are done in single request [Thomas] Small optimization patch is added for the migration loop
CCS clearing is split into two patches.

Test-with: [email protected]

Ramalingam C (6):
drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+ drm/i915/gt: Clear compress metadata for Flat-ccs objects 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/gt: Optimize the migration loop 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      |  23 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  23 ++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 390 +++++++++++++++++--
 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 +-
 9 files changed, 421 insertions(+), 39 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v3 1/6 drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+

XY_FAST_COLOR_BLT cmd is faster than the older XY_COLOR_BLT. Hence for clearing (Zero out) the pages of the newly allocated object, faster cmd is used.

---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  5 ++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 51 +++++++++++++++++---
 2 files changed, 49 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +5 -0
index d112ffd56418..925e55b6a94f 100644
@@ -205,6 +205,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)
drivers/gpu/drm/i915/gt/intel_migrate.c +44 -7

84 lines not on this page · raw message

Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH v3 1/6] drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+

Hi, Ram.

Typo in patch title FASR/FAST

Quoted 65 lines · Ramalingam C

XY_FAST_COLOR_BLT cmd is faster than the older XY_COLOR_BLT. Hence for
clearing (Zero out) the pages of the newly allocated object, faster cmd
is used.

---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  5 ++ drivers/gpu/drm/i915/gt/intel_migrate.c      | 51 +++++++++++++++++- --

 2 files changed, 49 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +0 -0
index d112ffd56418..925e55b6a94f 100644
@@ -205,6 +205,11 @@


 #define COLOR_BLT_CMD                  (2 << 29 | 0x40 << 22 | (5 - 2))
 #define XY_COLOR_BLT_CMD               (2 << 29 | 0x50 << 22)

drivers/gpu/drm/i915/gt/intel_gpu_commands.h +5 -0
+#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)

drivers/gpu/drm/i915/gt/intel_migrate.c +0 -0
index 20444d6ceb3c..cb68f7bf6b28 100644
@@ -16,6 +16,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)
 {

drivers/gpu/drm/i915/gt/intel_migrate.c +0 -0
@@ -614,20 +616,56 @@ 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, u64 offset, int size, +                     u32 value, bool is_lmem)
 {
-       const int ver = GRAPHICS_VER(rq->engine->i915);
-       u32 *cs;
+       struct drm_i915_private *i915 = rq->engine->i915; +       int mocs = rq->engine->gt->mocs.uc_index << 1;
+       const int ver = GRAPHICS_VER(i915);
+       u32 *cs, mem_type = 0;
+       int ring_sz;

Quoted 8 lines


        GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
        offset += (u64)rq->engine->instance << 32;
-       cs = intel_ring_begin(rq, ver >= 8 ? 8 : 6); +       if (ver >= 12)
+               ring_sz = 16;

Noting that DG1 doesn't use more than 11 dwords? Doesn't matter much I guess if we pad with NOP.

Quoted 7 lines

+       else if (ver >= 8)
+               ring_sz = 8;
+       else
+               ring_sz = 6;
+
+       if (!is_lmem)
+               mem_type = 1 << XY_FAST_COLOR_BLT_MEM_TYPE_SHIFT;

Should we use the MEM_TYPE macros so it becomes clearer what we're doing?

Also does DG1 support the mocs and mem_type fields? If not should we set these to 0 for relevant hardware?

Quoted 48 lines

+
+       cs = intel_ring_begin(rq, ring_sz);
        if (IS_ERR(cs))
                return PTR_ERR(cs);

-       if (ver >= 8) {
+       if (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++ = lower_32_bits(offset);
+               *cs++ = upper_32_bits(offset);
+               *cs++ = mem_type;
+               /* 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;

drivers/gpu/drm/i915/gt/intel_migrate.c +0 -1
@@ -645,7 +683,6 @@ static int emit_clear(struct i915_request *rq,
 u64 offset, int size, u32 value)
                 *cs++ = lower_32_bits(offset);
                 *cs++ = value;
         }
-
         intel_ring_advance(rq, cs);
         return 0;

 }

drivers/gpu/drm/i915/gt/intel_migrate.c +0 -0
@@ -711,7 +748,7 @@ intel_context_migrate_clear(struct intel_context
 *ce,
                 if (err)
                         goto out_rq;
Quoted 6 lines


-               err = emit_clear(rq, offset, len, value); +               err = emit_clear(rq, offset, len, value, is_lmem);
                /* Arbitration is re-enabled between requests. */ out_rq:

Otherwise looks good.

/Thomas

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#3 lore raw

PATCH v3 2/6 drm/i915/gt: Clear compress metadata for Flat-ccs objects

In reply to Ramalingam C

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_FAST_COLOR_BLT cmd provides a option to clear the ccs metadata corresponding to the main memory that is cleared. So on Flat-CCS capable platform we use this option to clear the CCS meta data along with main memory.

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]

---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  3 ++
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 39 ++++++++++++++++++--
 2 files changed, 39 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +3 -0
index 925e55b6a94f..34cead49f35e 100644
@@ -207,8 +207,11 @@
 #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   FAST_CLEAR_0			(2 << 12)
 #define   XY_FAST_COLOR_BLT_DW		16
 #define   XY_FAST_COLOR_BLT_MOCS_MASK	GENMASK(27, 21)
+#define   XY_FAST_COLOR_BLT_AUX_MASK	GENMASK(20, 18)
+#define   XY_FAST_COLOR_BLT_AUX_CCS_E	5
 #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)
drivers/gpu/drm/i915/gt/intel_migrate.c +36 -3
index cb68f7bf6b28..05262f1b438e 100644
@@ -469,6 +469,34 @@ 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 int emit_copy(struct i915_request *rq,
 		     u32 dst_offset, u32 src_offset, int size)
 {
@@ -621,8 +649,8 @@ static int emit_clear(struct i915_request *rq, u64 offset, int size,
 {
 	struct drm_i915_private *i915 = rq->engine->i915;
 	int mocs = rq->engine->gt->mocs.uc_index << 1;
+	u32 *cs, spl_mode = 0, aux = 0, mem_type = 0;
 	const int ver = GRAPHICS_VER(i915);
-	u32 *cs, mem_type = 0;
 	int ring_sz;
 
 	GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
@@ -644,10 +672,15 @@ static int emit_clear(struct i915_request *rq, u64 offset, int size,
 		return PTR_ERR(cs);
 
 	if (ver >= 12) {
+		if (HAS_FLAT_CCS(i915)) {
+			spl_mode = FAST_CLEAR_0;
+			aux = FIELD_PREP(XY_FAST_COLOR_BLT_AUX_MASK,
+					 XY_FAST_COLOR_BLT_AUX_CCS_E);
+		}
 		*cs++ = XY_FAST_COLOR_BLT_CMD | XY_FAST_COLOR_BLT_DEPTH_32 |
-			(XY_FAST_COLOR_BLT_DW - 2);
+			spl_mode | (XY_FAST_COLOR_BLT_DW - 2);
 		*cs++ = FIELD_PREP(XY_FAST_COLOR_BLT_MOCS_MASK, mocs) |
-			(PAGE_SIZE - 1);
+			(PAGE_SIZE - 1) | aux;
 		*cs++ = 0;
 		*cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
 		*cs++ = lower_32_bits(offset);
Signature · 1 line
2.20.1
Reviewed-by Thomas Hellström on v3 2/6
#4 lore raw

Re: [PATCH v3 2/6] drm/i915/gt: Clear compress metadata for Flat-ccs objects

Quoted 119 lines · Ramalingam C

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_FAST_COLOR_BLT cmd provides a option to clear the ccs metadata corresponding to the main memory that is cleared. So on Flat-CCS capable
platform we use this option to clear the CCS meta data along with main
memory.

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]

---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  3 ++ drivers/gpu/drm/i915/gt/intel_migrate.c      | 39
++++++++++++++++++--

 2 files changed, 39 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +3 -0
index 925e55b6a94f..34cead49f35e 100644
@@ -207,8 +207,11 @@
  #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   FAST_CLEAR_0                 (2 << 12)
  #define   XY_FAST_COLOR_BLT_DW         16
  #define   XY_FAST_COLOR_BLT_MOCS_MASK  GENMASK(27, 21)
+#define   XY_FAST_COLOR_BLT_AUX_MASK   GENMASK(20, 18)
+#define   XY_FAST_COLOR_BLT_AUX_CCS_E  5
  #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)
drivers/gpu/drm/i915/gt/intel_migrate.c +0 -0
index cb68f7bf6b28..05262f1b438e 100644
@@ -469,6 +469,34 @@ 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 int emit_copy(struct i915_request *rq,
                     u32 dst_offset, u32 src_offset, int size) {

drivers/gpu/drm/i915/gt/intel_migrate.c +1 -1
@@ -621,8 +649,8 @@ static int emit_clear(struct i915_request *rq,
 u64 offset, int size,
  {
         struct drm_i915_private *i915 = rq->engine->i915;
         int mocs = rq->engine->gt->mocs.uc_index << 1;
+       u32 *cs, spl_mode = 0, aux = 0, mem_type = 0;
         const int ver = GRAPHICS_VER(i915);
-       u32 *cs, mem_type = 0;
         int ring_sz;


        GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);

drivers/gpu/drm/i915/gt/intel_migrate.c +0 -0
@@ -644,10 +672,15 @@ static int emit_clear(struct i915_request *rq,
 u64 offset, int size,
                 return PTR_ERR(cs);
Quoted 5 lines


        if (ver >= 12) {
+               if (HAS_FLAT_CCS(i915)) {
+                       spl_mode = FAST_CLEAR_0;
+                       aux = FIELD_PREP(XY_FAST_COLOR_BLT_AUX_MASK,

Did you have a chance to verify that this actually works, and whether setting aux will clear just the CCS data or both CCS & main DATA?

If so,

Quoted 6 lines

+
XY_FAST_COLOR_BLT_AUX_CCS_E);
+               }
                *cs++ = XY_FAST_COLOR_BLT_CMD | XY_FAST_COLOR_BLT_DEPTH_32 |
-                       (XY_FAST_COLOR_BLT_DW - 2);

Quoted 8 lines

+                       spl_mode | (XY_FAST_COLOR_BLT_DW - 2); *cs++ = FIELD_PREP(XY_FAST_COLOR_BLT_MOCS_MASK, mocs) |
-                       (PAGE_SIZE - 1);
+                       (PAGE_SIZE - 1) | aux;
                *cs++ = 0;
                *cs++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4; *cs++ = lower_32_bits(offset);

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#5 lore raw

PATCH v3 3/6 drm/ttm: Add a parameter to add extra pages into ttm_tt

In reply to Ramalingam C

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]

---
 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(-)
drivers/gpu/drm/drm_gem_vram_helper.c +1 -1
index dc7f938bfff2..123045b58fec 100644
@@ -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;
 
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1 -1
index 45cc5837ce00..1a8262f5f692 100644
@@ -283,7 +283,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;
 
drivers/gpu/drm/qxl/qxl_ttm.c +1 -1
index b2e33d5ba5d0..52156b54498f 100644
@@ -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;
 	}
drivers/gpu/drm/ttm/ttm_agp_backend.c +1 -1
index 6ddc16f0fe2b..d27691f2e451 100644
@@ -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;
 	}
drivers/gpu/drm/ttm/ttm_tt.c +7 -5
index d234aab800a0..1a66d9fc589a 100644
@@ -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);
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +1 -1
index b84ecc6d6611..4e3938e62c08 100644
@@ -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;
 
include/drm/ttm/ttm_tt.h +3 -1
index f20832139815..17a0310e8aaa 100644
@@ -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);
 
Signature · 1 line
2.20.1
#6 lore raw

PATCH v3 4/6 drm/i915/gem: Add extra pages in ttm_tt for ccs data

In reply to Ramalingam C

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]

---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +22 -1
index 1a8262f5f692..c7a36861c38d 100644
@@ -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
@@ -255,12 +256,27 @@ static const struct i915_refct_sgt_ops tt_rsgt_ops = {
 	.release = i915_ttm_tt_release
 };
 
+static inline bool
+i915_gem_object_has_lmem_placement(struct drm_i915_gem_object *obj)
+{
+	int i;
+
+	for (i = 0; i < obj->mm.n_placements; i++)
+		if (obj->mm.placements[i]->type == INTEL_MEMORY_LOCAL)
+			return true;
+
+	return false;
+}
+
 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;
@@ -283,7 +299,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_has_lmem_placement(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;
 
Signature · 1 line
2.20.1
reviewer
#7 lore raw

Re: [PATCH v3 4/6] drm/i915/gem: Add extra pages in ttm_tt for ccs data

Quoted 70 lines · Ramalingam C

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]

---
  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 23 ++++++++++++++++++++++-
  1 file changed, 22 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +16 -0
index 1a8262f5f692..c7a36861c38d 100644
@@ -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
@@ -255,12 +256,27 @@ static const struct i915_refct_sgt_ops tt_rsgt_ops = {
  	.release = i915_ttm_tt_release
  };
 
+static inline bool
+i915_gem_object_has_lmem_placement(struct drm_i915_gem_object *obj)
+{
+	int i;
+
+	for (i = 0; i < obj->mm.n_placements; i++)
+		if (obj->mm.placements[i]->type == INTEL_MEMORY_LOCAL)
+			return true;
+
+	return false;
+}
+
  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;

drivers/gpu/drm/i915/gem/i915_gem_ttm.c static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo, · line 305

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +4 -1
@@ -283,7 +299,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_has_lmem_placement(obj))
+		ccs_pages = DIV_ROUND_UP(DIV_ROUND_UP(bo->base.size,
+						      NUM_BYTES_PER_CCS_BYTE),
+					 PAGE_SIZE);

Did you figure out how to handle the case where we have LMEM + SMEM, and are unable to place the object into LMEM, and then it just ends up being kept in SMEM? AFAIK the vm.insert_entries code has always just assumed that the vma sg_table size is the same as the vma->size, and so will happily create PTEs for the hidden ccs page(s), which might corrupt the users vm, depending on the exact layout.

Also it looks like the _shmem_writeback() call should now use ttm_tt->num_pages, instead of the object size?

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +2 -0
+
+	ret = ttm_tt_init(&i915_tt->ttm, bo, page_flags, caching, ccs_pages);
  	if (ret)
  		goto err_free;
 
#8 lore raw

PATCH v3 5/6 drm/i915/gt: Optimize the migration loop

In reply to Ramalingam C

Move the static calculations out of the loop.

---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 34 ++++++++++++-------------
 1 file changed, 16 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/gt/intel_migrate.c +16 -18
index 05262f1b438e..24e0e73e4a90 100644
@@ -556,6 +556,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;
 
@@ -564,8 +565,20 @@ 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)) {
+		GEM_BUG_ON(!src_is_lmem && !dst_is_lmem);
+
+		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);
@@ -593,19 +606,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)) {
-			GEM_BUG_ON(!src_is_lmem && !dst_is_lmem);
-
-			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) {
@@ -615,12 +615,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)
Signature · 1 line
2.20.1
#9 lore raw

PATCH v3 6/6 drm/i915/migrate: Evict and restore the flatccs capable lmem obj

In reply to Ramalingam C

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]

---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  15 +
 drivers/gpu/drm/i915/gt/intel_migrate.c      | 274 ++++++++++++++++++-
 2 files changed, 285 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +15 -0
index 34cead49f35e..fa428a67620e 100644
@@ -153,8 +153,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)
@@ -203,6 +205,19 @@
 #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			GENMASK(17, 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)
drivers/gpu/drm/i915/gt/intel_migrate.c +270 -4

320 lines not on this page · raw message

Signature · 1 line
2.20.1
#10 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/ttm: Evict and restore of compressed object

In reply to Ramalingam C
== Series Details ==

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
ca55d5422881 drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+
ecd91714c6d2 drm/i915/gt: Clear compress metadata for Flat-ccs objects
f5878410b6ff drm/ttm: Add a parameter to add extra pages into ttm_tt
-:92: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#92: FILE: drivers/gpu/drm/ttm/ttm_tt.c:150:
+		uint32_t page_flags, enum ttm_caching caching,

-:139: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t' #139: 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 7160c760c643 drm/i915/gem: Add extra pages in ttm_tt for ccs data 1f4b56203045 drm/i915/gt: Optimize the migration loop 68f3742dad6a drm/i915/migrate: Evict and restore the flatccs capable lmem obj -:38: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #38: FILE: drivers/gpu/drm/i915/gt/intel_gpu_commands.h:156:
+#define MI_FLUSH_DW_CCS (1<<16)

                          		  ^

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

                          		  ^

total: 0 errors, 0 warnings, 2 checks, 349 lines checked

#11 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Evict and restore of compressed object

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: drm/i915/ttm: Evict and restore of compressed object
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.
#12 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/ttm: Evict and restore of compressed object

In reply to Ramalingam C
== Series Details ==

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_11332 -> Patchwork_22501
====================================================

Summary
-------

**FAILURE**

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

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

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

Participating hosts (44 -> 39)
------------------------------

Additional (1): fi-tgl-1115g4
Missing (6): shard-tglu fi-bsw-cyan shard-rkl shard-dg1 bat-jsl-2 fi-bdw-samus

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@migrate:
- fi-bsw-kefka: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-bsw-kefka/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bsw-kefka/igt@i915_selftest@[email protected]
- fi-kbl-8809g: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-kbl-8809g/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-8809g/igt@i915_selftest@[email protected]
- fi-kbl-x1275: [PASS][5] -> [DMESG-FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-kbl-x1275/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-x1275/igt@i915_selftest@[email protected]
- fi-rkl-guc: [PASS][7] -> [DMESG-FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-rkl-guc/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-rkl-guc/igt@i915_selftest@[email protected]
- fi-skl-6700k2: [PASS][9] -> [DMESG-FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-skl-6700k2/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-skl-6700k2/igt@i915_selftest@[email protected]
- fi-cfl-guc: [PASS][11] -> [DMESG-FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-cfl-guc/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-guc/igt@i915_selftest@[email protected]
- fi-bsw-n3050: [PASS][13] -> [DMESG-FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-bsw-n3050/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bsw-n3050/igt@i915_selftest@[email protected]
- fi-cfl-8700k: [PASS][15] -> [DMESG-FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-cfl-8700k/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-8700k/igt@i915_selftest@[email protected]
- fi-bxt-dsi: [PASS][17] -> [DMESG-FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-bxt-dsi/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bxt-dsi/igt@i915_selftest@[email protected]
- fi-cfl-8109u: [PASS][19] -> [DMESG-FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-cfl-8109u/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-8109u/igt@i915_selftest@[email protected]
- fi-glk-j4005: [PASS][21] -> [DMESG-FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-glk-j4005/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-glk-j4005/igt@i915_selftest@[email protected]
- bat-dg1-5: [PASS][23] -> [DMESG-FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-dg1-5/igt@i915_selftest@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg1-5/igt@i915_selftest@[email protected]
- fi-kbl-7567u: [PASS][25] -> [DMESG-FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-kbl-7567u/igt@i915_selftest@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-7567u/igt@i915_selftest@[email protected]
- fi-kbl-7500u: [PASS][27] -> [DMESG-FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-kbl-7500u/igt@i915_selftest@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-7500u/igt@i915_selftest@[email protected]
- fi-glk-dsi: [PASS][29] -> [DMESG-FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-glk-dsi/igt@i915_selftest@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-glk-dsi/igt@i915_selftest@[email protected]
- bat-dg1-6: [PASS][31] -> [DMESG-FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-dg1-6/igt@i915_selftest@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg1-6/igt@i915_selftest@[email protected]
- fi-kbl-soraka: [PASS][33] -> [DMESG-FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-kbl-soraka/igt@i915_selftest@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-soraka/igt@i915_selftest@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live@gt_lrc:
- {bat-dg2-9}: NOTRUN -> [INCOMPLETE][35]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg2-9/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@migrate:
- {fi-ehl-2}: [PASS][36] -> [DMESG-FAIL][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-ehl-2/igt@i915_selftest@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-ehl-2/igt@i915_selftest@[email protected]
- {bat-jsl-1}: [PASS][38] -> [DMESG-FAIL][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-jsl-1/igt@i915_selftest@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-jsl-1/igt@i915_selftest@[email protected]
- {fi-tgl-dsi}: [PASS][40] -> [DMESG-FAIL][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-tgl-dsi/igt@i915_selftest@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-dsi/igt@i915_selftest@[email protected]
- {bat-rpls-2}: [PASS][42] -> [DMESG-FAIL][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-rpls-2/igt@i915_selftest@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-rpls-2/igt@i915_selftest@[email protected]
- {fi-jsl-1}: [PASS][44] -> [DMESG-FAIL][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-jsl-1/igt@i915_selftest@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-jsl-1/igt@i915_selftest@[email protected]
- {bat-adlp-6}: [PASS][46] -> [DMESG-FAIL][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-adlp-6/igt@i915_selftest@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-adlp-6/igt@i915_selftest@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- {bat-dg2-9}: NOTRUN -> [FAIL][48]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg2-9/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- {bat-dg2-9}: NOTRUN -> [DMESG-WARN][49]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg2-9/igt@[email protected]

* igt@prime_vgem@basic-write:
- {bat-dg2-9}: NOTRUN -> [SKIP][50] +16 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg2-9/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3@smem:
- fi-bdw-5557u: [PASS][51] -> [INCOMPLETE][52] ([i915#146])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-bdw-5557u/igt@gem_exec_suspend@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bdw-5557u/igt@gem_exec_suspend@[email protected]

* igt@gem_flink_basic@bad-flink:
- fi-skl-6600u: [PASS][53] -> [INCOMPLETE][54] ([i915#4547])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-skl-6600u/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-skl-6600u/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-tgl-1115g4: NOTRUN -> [SKIP][55] ([i915#2190])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-tgl-1115g4: NOTRUN -> [SKIP][56] ([i915#4613]) +3 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@i915_pm_backlight@basic-brightness:
- fi-tgl-1115g4: NOTRUN -> [SKIP][57] ([i915#1155])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- fi-tgl-1115g4: NOTRUN -> [INCOMPLETE][58] ([i915#62])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [PASS][59] -> [INCOMPLETE][60] ([i915#3921])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-snb-2600/igt@i915_selftest@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-snb-2600/igt@i915_selftest@[email protected]

* igt@kms_chamelium@vga-hpd-fast:
- fi-tgl-1115g4: NOTRUN -> [SKIP][61] ([fdo#111827]) +8 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-1115g4: NOTRUN -> [SKIP][62] ([i915#4103]) +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@kms_flip@basic-flip-vs-modeset@c-dp3:
- fi-tgl-1115g4: NOTRUN -> [DMESG-WARN][63] ([i915#4002]) +87 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@kms_flip@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-1115g4: NOTRUN -> [SKIP][64] ([fdo#109285])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- fi-tgl-1115g4: NOTRUN -> [SKIP][65] ([fdo#110189]) +3 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

* igt@prime_vgem@basic-userptr:
- fi-tgl-1115g4: NOTRUN -> [SKIP][66] ([i915#3301])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]

* igt@runner@aborted:
- fi-cfl-8109u: NOTRUN -> [FAIL][67] ([i915#4312] / [i915#5257])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-8109u/igt@[email protected]
- fi-glk-dsi: NOTRUN -> [FAIL][68] ([i915#4312] / [i915#5257] / [k.org#202321])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-glk-dsi/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [FAIL][69] ([i915#1436] / [i915#4312] / [i915#5257])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-soraka/igt@[email protected]
- fi-kbl-7500u: NOTRUN -> [FAIL][70] ([i915#1436] / [i915#4312] / [i915#5257])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-7500u/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][71] ([i915#4312] / [i915#5257])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bxt-dsi/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [FAIL][72] ([i915#2722] / [i915#4312])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-1115g4/igt@[email protected]
- bat-dg1-6: NOTRUN -> [FAIL][73] ([i915#4312])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg1-6/igt@[email protected]
- fi-cfl-guc: NOTRUN -> [FAIL][74] ([i915#4312] / [i915#5257])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-guc/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [FAIL][75] ([i915#4312] / [i915#5257] / [k.org#202321])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-glk-j4005/igt@[email protected]
- fi-kbl-7567u: NOTRUN -> [FAIL][76] ([i915#1436] / [i915#4312] / [i915#5257])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-7567u/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [FAIL][77] ([i915#1436] / [i915#4312] / [i915#5257])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-skl-6700k2/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][78] ([fdo#109271] / [i915#1436] / [i915#3428] / [i915#4312])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bsw-n3050/igt@[email protected]
- fi-kbl-x1275: NOTRUN -> [FAIL][79] ([i915#1436] / [i915#4312] / [i915#5257])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-x1275/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][80] ([fdo#109271] / [i915#1436] / [i915#3428] / [i915#4312])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-bsw-kefka/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [FAIL][81] ([i915#4312] / [i915#5257])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-cfl-8700k/igt@[email protected]
- bat-dg1-5: NOTRUN -> [FAIL][82] ([i915#4312])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg1-5/igt@[email protected]
- fi-kbl-8809g: NOTRUN -> [FAIL][83] ([i915#1436] / [i915#4312] / [i915#5257])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-kbl-8809g/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [FAIL][84] ([i915#4312])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-rkl-guc/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_heartbeat:
- {fi-tgl-dsi}: [DMESG-FAIL][85] ([i915#541]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@requests:
- {bat-rpls-2}: [DMESG-FAIL][87] ([i915#5087]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-rpls-2/igt@i915_selftest@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_busy@basic@flip:
- {bat-dg2-9}: [DMESG-WARN][89] -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-dg2-9/igt@kms_busy@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-dg2-9/igt@kms_busy@[email protected]

* igt@kms_flip@basic-flip-vs-modeset@a-edp1:
- {bat-adlp-6}: [DMESG-WARN][91] ([i915#3576]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11332/bat-adlp-6/igt@kms_flip@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22501/bat-adlp-6/igt@kms_flip@[email protected]

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

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
[i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
[i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
[i915#4002]: https://gitlab.freedesktop.org/drm/intel/issues/4002
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5087]: https://gitlab.freedesktop.org/drm/intel/issues/5087
[i915#5193]: https://gitlab.freedesktop.org/drm/intel/issues/5193
[i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321

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

* IGT: IGT_6366 -> IGTPW_6745
* Linux: CI_DRM_11332 -> Patchwork_22501

CI-20190529: 20190529
CI_DRM_11332: 8025c79350b90e5a8029234d433578f12abbae2b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6745: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6745/index.html
IGT_6366: 8c0bb07b7b4d9b724a897a7665fb9b1c450b2cb6 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_22501: 68f3742dad6a65397cfce5c46302638ffbd660f4 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

68f3742dad6a drm/i915/migrate: Evict and restore the flatccs capable lmem obj 1f4b56203045 drm/i915/gt: Optimize the migration loop
7160c760c643 drm/i915/gem: Add extra pages in ttm_tt for ccs data f5878410b6ff drm/ttm: Add a parameter to add extra pages into ttm_tt ecd91714c6d2 drm/i915/gt: Clear compress metadata for Flat-ccs objects ca55d5422881 drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+

== Logs ==

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