Skip to contentSkip to conversation

discrete card 64K page support

PATCH Superseded Robert Beckett 4 participants 21 messages Jan 25, 2022 – Jan 31, 2022

Subsystems (3)

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v5 cover discrete card 64K page support

This series continues support for 64K pages for discrete cards.
It supersedes the 64K patches from https://patchwork.freedesktop.org/series/95686/#rev4
Changes since that series:

- set min alignment for DG2 to 2MB in i915_address_space_init
- replace coloring with simpler 2MB VA alignment for lmem buffers
- enforce alignment to 2MB for lmem objects on DG2 in i915_vma_insert
- expand vma reservation to round up to 2MB on DG2 in i915_vma_insert
- add alignment test

v2: rebase and fix for async vma that landed
v3:
* fix uapi doc typos
* add needs_compact_pt flag patch
* cleanup vma expansion to use vm->min_alignment instead of hard coding
v4:
* fix err return in igt_ppgtt_compact test
* placate ci robot with explicit enum conversion in misaligned_pin
* remove some blank lines
v5:
* fix obj alignment requirements querying for internal buffers that have no memory region associated. (fixes v3 bug)

Matthew Auld (3):
drm/i915: enforce min GTT alignment for discrete cards drm/i915: support 64K GTT pages for discrete cards drm/i915/uapi: document behaviour for DG2 64K support

Ramalingam C (1):
drm/i915: add needs_compact_pt flag

Robert Beckett (1):
drm/i915: add gtt misalignment test

 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  60 +++++
 .../i915/gem/selftests/i915_gem_client_blt.c  |  23 +-
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c          | 108 ++++++++-
 drivers/gpu/drm/i915/gt/intel_gtt.c           |  12 +
 drivers/gpu/drm/i915/gt/intel_gtt.h           |  21 ++
 drivers/gpu/drm/i915/gt/intel_ppgtt.c         |   1 +
 drivers/gpu/drm/i915/i915_drv.h               |  10 +-
 drivers/gpu/drm/i915/i915_pci.c               |   2 +
 drivers/gpu/drm/i915/i915_vma.c               |   9 +
 drivers/gpu/drm/i915/intel_device_info.h      |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 224 +++++++++++++++---
 include/uapi/drm/i915_drm.h                   |  44 +++-
 12 files changed, 463 insertions(+), 52 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v5 1/5 drm/i915: add needs_compact_pt flag

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
 drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++---
 drivers/gpu/drm/i915/i915_pci.c          |  2 ++
 drivers/gpu/drm/i915/intel_device_info.h |  1 +
 3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +7 -3
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 
 /*
  * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.
+ * device local memory access.
  */
 #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages)
 
+/* Set this flag when platform doesn't allow both 64k pages and 4k pages in
+ * the same PT. this flag means we need to support compact PT layout for the
+ * ppGTT when using the 64K GTT pages.
+ */
+#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt)
+
 #define HAS_IPC(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ipc)
 
 #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
drivers/gpu/drm/i915/i915_pci.c +2 -0
index 4081fd50ba9d..799b56569ef5 100644
@@ -1028,6 +1028,7 @@ static const struct intel_device_info xehpsdv_info = {
 	PLATFORM(INTEL_XEHPSDV),
 	.display = { },
 	.has_64k_pages = 1,
+	.needs_compact_pt = 1,
 	.platform_engine_mask =
 		BIT(RCS0) | BIT(BCS0) |
 		BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |
@@ -1045,6 +1046,7 @@ static const struct intel_device_info dg2_info = {
 	.media.rel = 55,
 	PLATFORM(INTEL_DG2),
 	.has_64k_pages = 1,
+	.needs_compact_pt = 1,
 	.platform_engine_mask =
 		BIT(RCS0) | BIT(BCS0) |
 		BIT(VECS0) | BIT(VECS1) |
drivers/gpu/drm/i915/intel_device_info.h +1 -0
index 3699b1c539ea..c8aaf646430c 100644
@@ -130,6 +130,7 @@ enum intel_ppgtt_type {
 	/* Keep has_* in alphabetical order */ \
 	func(has_64bit_reloc); \
 	func(has_64k_pages); \
+	func(needs_compact_pt); \
 	func(gpu_reset_clobbers_display); \
 	func(has_reset_engine); \
 	func(has_global_mocs); \
Signature · 1 line
2.25.1
#2 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

Quoted 22 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++---
  drivers/gpu/drm/i915/i915_pci.c          |  2 ++
  drivers/gpu/drm/i915/intel_device_info.h |  1 +
  3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -0
index 44c1f98144b4..1258b7779705 100644

drivers/gpu/drm/i915/i915_drv.h IS_SUBPLATFORM(const struct drm_i915_private *i915, · line 1517

Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.h +0 -3
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 
  /*
   * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.

Why do we remove these comment lines?

drivers/gpu/drm/i915/i915_drv.h IS_SUBPLATFORM(const struct drm_i915_private *i915, · line 1519

Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +2 -0
+ * device local memory access.
   */
  #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages)
 
+/* Set this flag when platform doesn't allow both 64k pages and 4k pages in

First line of multi-line comments should be empty.

Quoted 40 lines
drivers/gpu/drm/i915/i915_drv.h +5 -0
+ * the same PT. this flag means we need to support compact PT layout for the
+ * ppGTT when using the 64K GTT pages.
+ */
+#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt)
+
  #define HAS_IPC(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ipc)
 
  #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
drivers/gpu/drm/i915/i915_pci.c +2 -0
index 4081fd50ba9d..799b56569ef5 100644
@@ -1028,6 +1028,7 @@ static const struct intel_device_info xehpsdv_info = {
  	PLATFORM(INTEL_XEHPSDV),
  	.display = { },
  	.has_64k_pages = 1,
+	.needs_compact_pt = 1,
  	.platform_engine_mask =
  		BIT(RCS0) | BIT(BCS0) |
  		BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |
@@ -1045,6 +1046,7 @@ static const struct intel_device_info dg2_info = {
  	.media.rel = 55,
  	PLATFORM(INTEL_DG2),
  	.has_64k_pages = 1,
+	.needs_compact_pt = 1,
  	.platform_engine_mask =
  		BIT(RCS0) | BIT(BCS0) |
  		BIT(VECS0) | BIT(VECS1) |
drivers/gpu/drm/i915/intel_device_info.h +1 -0
index 3699b1c539ea..c8aaf646430c 100644
@@ -130,6 +130,7 @@ enum intel_ppgtt_type {
  	/* Keep has_* in alphabetical order */ \
  	func(has_64bit_reloc); \
  	func(has_64k_pages); \
+	func(needs_compact_pt); \
  	func(gpu_reset_clobbers_display); \
  	func(has_reset_engine); \
  	func(has_global_mocs); \
#3 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

Quoted 19 lines · Thomas Hellström (Intel)
Quoted 17 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- drivers/gpu/drm/i915/i915_pci.c          |  2 ++ drivers/gpu/drm/i915/intel_device_info.h |  1 +

  3 files changed, 10 insertions(+), 3 deletions(-)
Quoted 14 lines
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +0 -2
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private 
 *i915,
   /*
    * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we require or
- * at least support the compact PT layout for the ppGTT when using 
Quoted 2 lines

the 64K
- * GTT pages.

Why do we remove these comment lines?

Because HAS_64K_PAGES now means just 64K page, it no longer means also requires compact pt. This is to support other products that will have 64K but not have the PDE non-sharing restriction in future.

Those lines moved to the next change NEEDS_COMPACT_PT, which is now separate.

Quoted 9 lines
Quoted 7 lines

+ * device local memory access.
   */
  #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages) +/* Set this flag when platform doesn't allow both 64k pages and 4k pages in

First line of multi-line comments should be empty.

thanks. I'm surprised checkpatch didnt spot that.

Quoted 44 lines
Quoted 44 lines

+ * the same PT. this flag means we need to support compact PT layout for the
+ * ppGTT when using the 64K GTT pages.
+ */
+#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt)
+
  #define HAS_IPC(dev_priv) (INTEL_INFO(dev_priv)->display.has_ipc)
  #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))

drivers/gpu/drm/i915/i915_pci.c +1 -0
index 4081fd50ba9d..799b56569ef5 100644
@@ -1028,6 +1028,7 @@ static const struct intel_device_info 
 xehpsdv_info = {
       PLATFORM(INTEL_XEHPSDV),
       .display = { },
       .has_64k_pages = 1,
+    .needs_compact_pt = 1,

      .platform_engine_mask =
          BIT(RCS0) | BIT(BCS0) |
          BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |

drivers/gpu/drm/i915/i915_pci.c +1 -0
@@ -1045,6 +1046,7 @@ static const struct intel_device_info dg2_info = {
       .media.rel = 55,
       PLATFORM(INTEL_DG2),
       .has_64k_pages = 1,
+    .needs_compact_pt = 1,

      .platform_engine_mask =
          BIT(RCS0) | BIT(BCS0) |
          BIT(VECS0) | BIT(VECS1) |

drivers/gpu/drm/i915/intel_device_info.h +1 -0
index 3699b1c539ea..c8aaf646430c 100644
@@ -130,6 +130,7 @@ enum intel_ppgtt_type {
       /* Keep has_* in alphabetical order */ \
       func(has_64bit_reloc); \
       func(has_64k_pages); \
+    func(needs_compact_pt); \
       func(gpu_reset_clobbers_display); \
       func(has_reset_engine); \
       func(has_global_mocs); \
#4 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

Quoted 37 lines · Robert Beckett
Quoted 19 lines · Thomas Hellström (Intel)
Quoted 17 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- drivers/gpu/drm/i915/i915_pci.c          |  2 ++ drivers/gpu/drm/i915/intel_device_info.h |  1 +

  3 files changed, 10 insertions(+), 3 deletions(-)
Quoted 15 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.h +0 -1
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private 
 *i915,
   /*
    * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we 
Quoted 4 lines

require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.

Why do we remove these comment lines?

Quoted 4 lines

Because HAS_64K_PAGES now means just 64K page, it no longer means also requires compact pt. This is to support other products that will have 64K but not have the PDE non-sharing restriction in future.

Those lines moved to the next change NEEDS_COMPACT_PT, which is now separate.

Yes, NEEDS_COMPACT_PT indicates that compact is *required* but does "HAS_64K_PAGES" still mean compact is supported? That information is lost.

/Thomas

#5 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

Quoted 39 lines · Thomas Hellström (Intel)
Quoted 37 lines · Robert Beckett
Quoted 34 lines · Thomas Hellström (Intel)
Quoted 26 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- drivers/gpu/drm/i915/i915_pci.c          |  2 ++ drivers/gpu/drm/i915/intel_device_info.h |  1 +

  3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private 
 *i915,
   /*
    * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we 
Quoted 4 lines

require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.

Why do we remove these comment lines?

Quoted 6 lines
Quoted 4 lines

Because HAS_64K_PAGES now means just 64K page, it no longer means also requires compact pt. This is to support other products that will have 64K but not have the PDE non-sharing restriction in future.

Those lines moved to the next change NEEDS_COMPACT_PT, which is now separate.

Yes, NEEDS_COMPACT_PT indicates that compact is *required* but does "HAS_64K_PAGES" still mean compact is supported? That information is lost.

Not any more.
I discussed the ambiguity of the original wording with mauld on irc.
We came to the conclusion that HAS_64K_PAGES should mean just that, that the hw has support for 64K pages, and says nothing about compact-pt at all.

NEEDS_COMPACT_PT means that the hw has compact-pt support and the driver is required to use it as it is a hw limitation.

There will be other devices that can support compact-pt but do not mandate its use. In this case, the current code would not use them, but there is potential for some future opportunistic use of that in the driver if desired (currently expected to include accelerated move/clear). If any opportunistic use is added to the driver, a new flag can be added along with the code that uses it to indicate compact-pt availability that is not mandatory (HAS_COMPACT_PT most likely), but as there is no code requiring it currently it should not be added yet, and the comments left as this patch does.

Quoted 4 lines

/Thomas

#6 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

In reply to Thomas Hellström (Intel)
Quoted 39 lines · Thomas Hellström (Intel)
Quoted 37 lines · Robert Beckett
Quoted 34 lines · Thomas Hellström (Intel)
Quoted 26 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- drivers/gpu/drm/i915/i915_pci.c          |  2 ++ drivers/gpu/drm/i915/intel_device_info.h |  1 +

  3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private 
 *i915,
   /*
    * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we 
Quoted 4 lines

require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.

Why do we remove these comment lines?

Quoted 6 lines
Quoted 4 lines

Because HAS_64K_PAGES now means just 64K page, it no longer means also requires compact pt. This is to support other products that will have 64K but not have the PDE non-sharing restriction in future.

Those lines moved to the next change NEEDS_COMPACT_PT, which is now separate.

Yes, NEEDS_COMPACT_PT indicates that compact is *required* but does "HAS_64K_PAGES" still mean compact is supported? That information is lost.

Not any more.
I discussed the ambiguity of the original wording with mauld on irc.
We came to the conclusion that HAS_64K_PAGES should mean just that, that the hw has support for 64K pages, and says nothing about compact-pt at all.

NEEDS_COMPACT_PT means that the hw has compact-pt support and the driver is required to use it as it is a hw limitation.

There will be other devices that can support compact-pt but do not mandate its use. In this case, the current code would not use them, but there is potential for some future opportunistic use of that in the driver if desired (currently expected to include accelerated move/clear). If any opportunistic use is added to the driver, a new flag can be added along with the code that uses it to indicate compact-pt availability that is not mandatory (HAS_COMPACT_PT most likely), but as there is no code requiring it currently it should not be added yet, and the comments left as this patch does.

Quoted 4 lines

/Thomas

Reviewed-by
#7 lore raw

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

Quoted 47 lines · Robert Beckett
Quoted 44 lines · Thomas Hellström (Intel)
Quoted 41 lines · Robert Beckett
Quoted 19 lines · Thomas Hellström (Intel)
Quoted 17 lines · Robert Beckett

From: Ramalingam C <[email protected]>

Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for device local memory access.

---
  drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- drivers/gpu/drm/i915/i915_pci.c          |  2 ++ drivers/gpu/drm/i915/intel_device_info.h |  1 +

  3 files changed, 10 insertions(+), 3 deletions(-)
Quoted 15 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.h +0 -1
index 44c1f98144b4..1258b7779705 100644
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct 
 drm_i915_private *i915,
   /*
    * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we 
Quoted 4 lines

require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.

Why do we remove these comment lines?

Because HAS_64K_PAGES now means just 64K page, it no longer means also requires compact pt. This is to support other products that will have 64K but not have the PDE non-sharing restriction in future.

Those lines moved to the next change NEEDS_COMPACT_PT, which is now separate.

Quoted 9 lines
Quoted 1 line

Yes, NEEDS_COMPACT_PT indicates that compact is *required* but does "HAS_64K_PAGES" still mean compact is supported? That information is lost.

Not any more.
I discussed the ambiguity of the original wording with mauld on irc.
We came to the conclusion that HAS_64K_PAGES should mean just that, that the hw has support for 64K pages, and says nothing about compact-pt at all.

NEEDS_COMPACT_PT means that the hw has compact-pt support and the driver is required to use it as it is a hw limitation.

There will be other devices that can support compact-pt but do not mandate its use. In this case, the current code would not use them, but there is potential for some future opportunistic use of that in the driver if desired (currently expected to include accelerated move/clear). If any opportunistic use is added to the driver, a new flag can be added along with the code that uses it to indicate compact-pt availability that is not mandatory (HAS_COMPACT_PT most likely), but as there is no code requiring it currently it should not be added yet, and the comments left as this patch does.

Ok, Thanks for the clarification.

Quoted 4 lines
Quoted 4 lines

/Thomas

#8 lore raw

PATCH v5 2/5 drm/i915: enforce min GTT alignment for discrete cards

In reply to Robert Beckett

From: Matthew Auld <[email protected]>

For local-memory objects we need to align the GTT addresses to 64K, both for the ppgtt and ggtt.

We need to support vm->min_alignment > 4K, depending on the vm itself and the type of object we are inserting. With this in mind update the GTT selftests to take this into account.

For compact-pt we further align and pad lmem object GTT addresses to 2MB to ensure PDEs contain consistent page sizes as required by the HW.

v3:
* use needs_compact_pt flag to discriminate between 64K and 64K with compact-pt
* add i915_vm_obj_min_alignment
* use i915_vm_obj_min_alignment to round up vma reservation if compact-pt instead of hard coding
v5:
* fix i915_vm_obj_min_alignment for internal objects which have no memory region

---
 .../i915/gem/selftests/i915_gem_client_blt.c  | 23 +++--
 drivers/gpu/drm/i915/gt/intel_gtt.c           | 12 +++
 drivers/gpu/drm/i915/gt/intel_gtt.h           | 18 ++++
 drivers/gpu/drm/i915/i915_vma.c               |  9 ++
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++++++++-------
 5 files changed, 117 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +15 -8
index c8ff8bf0986d..f0bfce53258f 100644
@@ -39,6 +39,7 @@ struct tiled_blits {
 	struct blit_buffer scratch;
 	struct i915_vma *batch;
 	u64 hole;
+	u64 align;
 	u32 width;
 	u32 height;
 };
@@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
 		goto err_free;
 	}
 
-	hole_size = 2 * PAGE_ALIGN(WIDTH * HEIGHT * 4);
+	t->align = I915_GTT_PAGE_SIZE_2M; /* XXX worst case, derive from vm! */
+	t->align = max(t->align,
+		       i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_LOCAL));
+	t->align = max(t->align,
+		       i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_SYSTEM));
+
+	hole_size = 2 * round_up(WIDTH * HEIGHT * 4, t->align);
 	hole_size *= 2; /* room to maneuver */
-	hole_size += 2 * I915_GTT_MIN_ALIGNMENT;
+	hole_size += 2 * t->align; /* padding on either side */
 
 	mutex_lock(&t->ce->vm->mutex);
 	memset(&hole, 0, sizeof(hole));
 	err = drm_mm_insert_node_in_range(&t->ce->vm->mm, &hole,
-					  hole_size, 0, I915_COLOR_UNEVICTABLE,
+					  hole_size, t->align,
+					  I915_COLOR_UNEVICTABLE,
 					  0, U64_MAX,
 					  DRM_MM_INSERT_BEST);
 	if (!err)
@@ -428,7 +436,7 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
 		goto err_put;
 	}
 
-	t->hole = hole.start + I915_GTT_MIN_ALIGNMENT;
+	t->hole = hole.start + t->align;
 	pr_info("Using hole at %llx\n", t->hole);
 
 	err = tiled_blits_create_buffers(t, WIDTH, HEIGHT, prng);
@@ -455,7 +463,7 @@ static void tiled_blits_destroy(struct tiled_blits *t)
 static int tiled_blits_prepare(struct tiled_blits *t,
 			       struct rnd_state *prng)
 {
-	u64 offset = PAGE_ALIGN(t->width * t->height * 4);
+	u64 offset = round_up(t->width * t->height * 4, t->align);
 	u32 *map;
 	int err;
 	int i;
@@ -486,8 +494,7 @@ static int tiled_blits_prepare(struct tiled_blits *t,
 
 static int tiled_blits_bounce(struct tiled_blits *t, struct rnd_state *prng)
 {
-	u64 offset =
-		round_up(t->width * t->height * 4, 2 * I915_GTT_MIN_ALIGNMENT);
+	u64 offset = round_up(t->width * t->height * 4, 2 * t->align);
 	int err;
 
 	/* We want to check position invariant tiling across GTT eviction */
@@ -500,7 +507,7 @@ static int tiled_blits_bounce(struct tiled_blits *t, struct rnd_state *prng)
 
 	/* Reposition so that we overlap the old addresses, and slightly off */
 	err = tiled_blit(t,
-			 &t->buffers[2], t->hole + I915_GTT_MIN_ALIGNMENT,
+			 &t->buffers[2], t->hole + t->align,
 			 &t->buffers[1], t->hole + 3 * offset / 2);
 	if (err)
 		return err;
drivers/gpu/drm/i915/gt/intel_gtt.c +12 -0
index 46be4197b93f..df23ebdfc994 100644
@@ -223,6 +223,18 @@ void i915_address_space_init(struct i915_address_space *vm, int subclass)
 
 	GEM_BUG_ON(!vm->total);
 	drm_mm_init(&vm->mm, 0, vm->total);
+
+	memset64(vm->min_alignment, I915_GTT_MIN_ALIGNMENT,
+		 ARRAY_SIZE(vm->min_alignment));
+
+	if (HAS_64K_PAGES(vm->i915) && NEEDS_COMPACT_PT(vm->i915)) {
+		vm->min_alignment[INTEL_MEMORY_LOCAL] = I915_GTT_PAGE_SIZE_2M;
+		vm->min_alignment[INTEL_MEMORY_STOLEN_LOCAL] = I915_GTT_PAGE_SIZE_2M;
+	} else if (HAS_64K_PAGES(vm->i915)) {
+		vm->min_alignment[INTEL_MEMORY_LOCAL] = I915_GTT_PAGE_SIZE_64K;
+		vm->min_alignment[INTEL_MEMORY_STOLEN_LOCAL] = I915_GTT_PAGE_SIZE_64K;
+	}
+
 	vm->mm.head_node.color = I915_COLOR_UNEVICTABLE;
 
 	INIT_LIST_HEAD(&vm->bound_list);
drivers/gpu/drm/i915/gt/intel_gtt.h +18 -0
index 8073438b67c8..ba9f040f8606 100644
@@ -29,6 +29,8 @@
 #include "i915_selftest.h"
 #include "i915_vma_resource.h"
 #include "i915_vma_types.h"
+#include "i915_params.h"
+#include "intel_memory_region.h"
 
 #define I915_GFP_ALLOW_FAIL (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)
 
@@ -223,6 +225,7 @@ struct i915_address_space {
 	struct device *dma;
 	u64 total;		/* size addr space maps (ex. 2GB for ggtt) */
 	u64 reserved;		/* size addr space reserved */
+	u64 min_alignment[INTEL_MEMORY_STOLEN_LOCAL + 1];
 
 	unsigned int bind_async_flags;
 
@@ -384,6 +387,21 @@ i915_vm_has_scratch_64K(struct i915_address_space *vm)
 	return vm->scratch_order == get_order(I915_GTT_PAGE_SIZE_64K);
 }
 
+static inline u64 i915_vm_min_alignment(struct i915_address_space *vm,
+					enum intel_memory_type type)
+{
+	return vm->min_alignment[type];
+}
+
+static inline u64 i915_vm_obj_min_alignment(struct i915_address_space *vm,
+					    struct drm_i915_gem_object  *obj)
+{
+	struct intel_memory_region *mr = READ_ONCE(obj->mm.region);
+	enum intel_memory_type type = mr ? mr->type : INTEL_MEMORY_SYSTEM;
+
+	return i915_vm_min_alignment(vm, type);
+}
+
 static inline bool
 i915_vm_has_cache_coloring(struct i915_address_space *vm)
 {
drivers/gpu/drm/i915/i915_vma.c +9 -0
index b959e904c4d3..3b31d2ba6864 100644
@@ -745,6 +745,14 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
 		end = min_t(u64, end, (1ULL << 32) - I915_GTT_PAGE_SIZE);
 	GEM_BUG_ON(!IS_ALIGNED(end, I915_GTT_PAGE_SIZE));
 
+	alignment = max(alignment, i915_vm_obj_min_alignment(vma->vm, vma->obj));
+	/*
+	 * for compact-pt we round up the reservation to prevent
+	 * any smaller pages being used within the same PDE
+	 */
+	if (NEEDS_COMPACT_PT(vma->vm->i915))
+		size = round_up(size, alignment);
+
 	/* If binding the object/GGTT view requires more space than the entire
 	 * aperture has, reject it early before evicting everything in a vain
 	 * attempt to find space.
@@ -757,6 +765,7 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
 	}
 
 	color = 0;
+
 	if (i915_vm_has_cache_coloring(vma->vm))
 		color = vma->obj->cache_level;
 
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +63 -33

297 lines not on this page · raw message

Signature · 1 line
2.25.1
#9 lore raw

Re: [Intel-gfx] [PATCH v5 2/5] drm/i915: enforce min GTT alignment for discrete cards

Quoted 50 lines · Robert Beckett

From: Matthew Auld <[email protected]>

For local-memory objects we need to align the GTT addresses to 64K, both for the ppgtt and ggtt.

We need to support vm->min_alignment > 4K, depending on the vm itself and the type of object we are inserting. With this in mind update the GTT selftests to take this into account.

For compact-pt we further align and pad lmem object GTT addresses to 2MB to ensure PDEs contain consistent page sizes as required by the HW.

v3:
* use needs_compact_pt flag to discriminate between 64K and 64K with compact-pt
* add i915_vm_obj_min_alignment
* use i915_vm_obj_min_alignment to round up vma reservation if compact-pt instead of hard coding
v5:
* fix i915_vm_obj_min_alignment for internal objects which have no memory region

---
  .../i915/gem/selftests/i915_gem_client_blt.c  | 23 +++--
  drivers/gpu/drm/i915/gt/intel_gtt.c           | 12 +++
  drivers/gpu/drm/i915/gt/intel_gtt.h           | 18 ++++
  drivers/gpu/drm/i915/i915_vma.c               |  9 ++
  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++++++++-------
  5 files changed, 117 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -0
index c8ff8bf0986d..f0bfce53258f 100644
@@ -39,6 +39,7 @@ struct tiled_blits {
  	struct blit_buffer scratch;
  	struct i915_vma *batch;
  	u64 hole;
+	u64 align;
  	u32 width;
  	u32 height;
  };

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng) · line 418

Quoted 9 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +5 -1
@@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
  		goto err_free;
  	}
 
-	hole_size = 2 * PAGE_ALIGN(WIDTH * HEIGHT * 4);
+	t->align = I915_GTT_PAGE_SIZE_2M; /* XXX worst case, derive from vm! */
+	t->align = max(t->align,
+		       i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_LOCAL));
+	t->align = max(t->align,
+		       i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_SYSTEM));

Don't we always end up with 2M here, regardless of the vm restrictions?

#10 lore raw

Re: [Intel-gfx] [PATCH v5 2/5] drm/i915: enforce min GTT alignment for discrete cards

Quoted 56 lines · Thomas Hellström (Intel)
Quoted 54 lines · Robert Beckett

From: Matthew Auld <[email protected]>

For local-memory objects we need to align the GTT addresses to 64K, both for the ppgtt and ggtt.

We need to support vm->min_alignment > 4K, depending on the vm itself and the type of object we are inserting. With this in mind update the GTT selftests to take this into account.

For compact-pt we further align and pad lmem object GTT addresses to 2MB to ensure PDEs contain consistent page sizes as required by the HW.

v3:
    * use needs_compact_pt flag to discriminate between 64K and 64K with compact-pt
    * add i915_vm_obj_min_alignment
    * use i915_vm_obj_min_alignment to round up vma reservation if compact-pt instead of hard coding
v5:
    * fix i915_vm_obj_min_alignment for internal objects which have no memory region

---
  .../i915/gem/selftests/i915_gem_client_blt.c  | 23 +++-- drivers/gpu/drm/i915/gt/intel_gtt.c           | 12 +++ drivers/gpu/drm/i915/gt/intel_gtt.h           | 18 ++++ drivers/gpu/drm/i915/i915_vma.c               |  9 ++ drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++++++++-------

  5 files changed, 117 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -1
index c8ff8bf0986d..f0bfce53258f 100644
@@ -39,6 +39,7 @@ struct tiled_blits {
       struct blit_buffer scratch;
       struct i915_vma *batch;
       u64 hole;
+    u64 align;
       u32 width;
       u32 height;
   };
@@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs 
 *engine, struct rnd_state *prng)
           goto err_free;
       }
-    hole_size = 2 * PAGE_ALIGN(WIDTH * HEIGHT * 4);
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -0
+    t->align = I915_GTT_PAGE_SIZE_2M; /* XXX worst case, derive from 

vm! */
+    t->align = max(t->align,
+               i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_LOCAL)); +    t->align = max(t->align,
+               i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_SYSTEM));

Don't we always end up with 2M here, regardless of the vm restrictions?

agreed. I will drop the 2M worst case.

Quoted 2 lines
#11 lore raw

PATCH v5 3/5 drm/i915: support 64K GTT pages for discrete cards

In reply to Robert Beckett

From: Matthew Auld <[email protected]>

discrete cards optimise 64K GTT pages for local-memory, since everything should be allocated at 64K granularity. We say goodbye to sparse entries, and instead get a compact 256B page-table for 64K pages, which should be more cache friendly. 4K pages for local-memory are no longer supported by the HW.

v4: don't return uninitialized err in igt_ppgtt_compact

---
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  60 ++++++++++
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c          | 108 +++++++++++++++++-
 drivers/gpu/drm/i915/gt/intel_gtt.h           |   3 +
 drivers/gpu/drm/i915/gt/intel_ppgtt.c         |   1 +
 4 files changed, 169 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +60 -0
index f36191ebf964..a7d9bdb85d70 100644
@@ -1478,6 +1478,65 @@ static int igt_ppgtt_sanity_check(void *arg)
 	return err;
 }
 
+static int igt_ppgtt_compact(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct drm_i915_gem_object *obj;
+	int err;
+
+	/*
+	 * Simple test to catch issues with compact 64K pages -- since the pt is
+	 * compacted to 256B that gives us 32 entries per pt, however since the
+	 * backing page for the pt is 4K, any extra entries we might incorrectly
+	 * write out should be ignored by the HW. If ever hit such a case this
+	 * test should catch it since some of our writes would land in scratch.
+	 */
+
+	if (!HAS_64K_PAGES(i915)) {
+		pr_info("device lacks compact 64K page support, skipping\n");
+		return 0;
+	}
+
+	if (!HAS_LMEM(i915)) {
+		pr_info("device lacks LMEM support, skipping\n");
+		return 0;
+	}
+
+	/* We want the range to cover multiple page-table boundaries. */
+	obj = i915_gem_object_create_lmem(i915, SZ_4M, 0);
+	if (IS_ERR(obj))
+		return PTR_ERR(obj);
+
+	err = i915_gem_object_pin_pages_unlocked(obj);
+	if (err)
+		goto out_put;
+
+	if (obj->mm.page_sizes.phys < I915_GTT_PAGE_SIZE_64K) {
+		pr_info("LMEM compact unable to allocate huge-page(s)\n");
+		goto out_unpin;
+	}
+
+	/*
+	 * Disable 2M GTT pages by forcing the page-size to 64K for the GTT
+	 * insertion.
+	 */
+	obj->mm.page_sizes.sg = I915_GTT_PAGE_SIZE_64K;
+
+	err = igt_write_huge(i915, obj);
+	if (err)
+		pr_err("LMEM compact write-huge failed\n");
+
+out_unpin:
+	i915_gem_object_unpin_pages(obj);
+out_put:
+	i915_gem_object_put(obj);
+
+	if (err == -ENOMEM)
+		err = 0;
+
+	return err;
+}
+
 static int igt_tmpfs_fallback(void *arg)
 {
 	struct drm_i915_private *i915 = arg;
@@ -1735,6 +1794,7 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_tmpfs_fallback),
 		SUBTEST(igt_ppgtt_smoke_huge),
 		SUBTEST(igt_ppgtt_sanity_check),
+		SUBTEST(igt_ppgtt_compact),
 	};
 
 	if (!HAS_PPGTT(i915)) {
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +105 -3

134 lines not on this page · raw message

drivers/gpu/drm/i915/gt/intel_gtt.h +3 -0
index ba9f040f8606..e6ce0be6d484 100644
@@ -92,6 +92,8 @@ typedef u64 gen8_pte_t;
 
 #define GEN12_GGTT_PTE_LM	BIT_ULL(1)
 
+#define GEN12_PDE_64K BIT(6)
+
 /*
  * Cacheability Control is a 4-bit value. The low three bits are stored in bits
  * 3:1 of the PTE, while the fourth bit is stored in bit 11 of the PTE.
@@ -160,6 +162,7 @@ struct i915_page_table {
 		atomic_t used;
 		struct i915_page_table *stash;
 	};
+	bool is_compact;
 };
 
 struct i915_page_directory {
drivers/gpu/drm/i915/gt/intel_ppgtt.c +1 -0
index 48e6e2f87700..043652dc6892 100644
@@ -26,6 +26,7 @@ struct i915_page_table *alloc_pt(struct i915_address_space *vm)
 		return ERR_PTR(-ENOMEM);
 	}
 
+	pt->is_compact = false;
 	atomic_set(&pt->used, 0);
 	return pt;
 }
Signature · 1 line
2.25.1
Reviewed-by on v5 3/5
#12 lore raw

Re: [Intel-gfx] [PATCH v5 3/5] drm/i915: support 64K GTT pages for discrete cards

Quoted 10 lines · Robert Beckett

From: Matthew Auld <[email protected]>

discrete cards optimise 64K GTT pages for local-memory, since everything should be allocated at 64K granularity. We say goodbye to sparse entries, and instead get a compact 256B page-table for 64K pages, which should be more cache friendly. 4K pages for local-memory are no longer supported by the HW.

v4: don't return uninitialized err in igt_ppgtt_compact

Quoted 267 lines
---
  .../gpu/drm/i915/gem/selftests/huge_pages.c   |  60 ++++++++++
  drivers/gpu/drm/i915/gt/gen8_ppgtt.c          | 108 +++++++++++++++++-
  drivers/gpu/drm/i915/gt/intel_gtt.h           |   3 +
  drivers/gpu/drm/i915/gt/intel_ppgtt.c         |   1 +
  4 files changed, 169 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +60 -0
index f36191ebf964..a7d9bdb85d70 100644
@@ -1478,6 +1478,65 @@ static int igt_ppgtt_sanity_check(void *arg)
  	return err;
  }
 
+static int igt_ppgtt_compact(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct drm_i915_gem_object *obj;
+	int err;
+
+	/*
+	 * Simple test to catch issues with compact 64K pages -- since the pt is
+	 * compacted to 256B that gives us 32 entries per pt, however since the
+	 * backing page for the pt is 4K, any extra entries we might incorrectly
+	 * write out should be ignored by the HW. If ever hit such a case this
+	 * test should catch it since some of our writes would land in scratch.
+	 */
+
+	if (!HAS_64K_PAGES(i915)) {
+		pr_info("device lacks compact 64K page support, skipping\n");
+		return 0;
+	}
+
+	if (!HAS_LMEM(i915)) {
+		pr_info("device lacks LMEM support, skipping\n");
+		return 0;
+	}
+
+	/* We want the range to cover multiple page-table boundaries. */
+	obj = i915_gem_object_create_lmem(i915, SZ_4M, 0);
+	if (IS_ERR(obj))
+		return PTR_ERR(obj);
+
+	err = i915_gem_object_pin_pages_unlocked(obj);
+	if (err)
+		goto out_put;
+
+	if (obj->mm.page_sizes.phys < I915_GTT_PAGE_SIZE_64K) {
+		pr_info("LMEM compact unable to allocate huge-page(s)\n");
+		goto out_unpin;
+	}
+
+	/*
+	 * Disable 2M GTT pages by forcing the page-size to 64K for the GTT
+	 * insertion.
+	 */
+	obj->mm.page_sizes.sg = I915_GTT_PAGE_SIZE_64K;
+
+	err = igt_write_huge(i915, obj);
+	if (err)
+		pr_err("LMEM compact write-huge failed\n");
+
+out_unpin:
+	i915_gem_object_unpin_pages(obj);
+out_put:
+	i915_gem_object_put(obj);
+
+	if (err == -ENOMEM)
+		err = 0;
+
+	return err;
+}
+
  static int igt_tmpfs_fallback(void *arg)
  {
  	struct drm_i915_private *i915 = arg;
@@ -1735,6 +1794,7 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915)
  		SUBTEST(igt_tmpfs_fallback),
  		SUBTEST(igt_ppgtt_smoke_huge),
  		SUBTEST(igt_ppgtt_sanity_check),
+		SUBTEST(igt_ppgtt_compact),
  	};
 
  	if (!HAS_PPGTT(i915)) {
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +105 -3
index c43e724afa9f..62471730266c 100644
@@ -233,6 +233,8 @@ static u64 __gen8_ppgtt_clear(struct i915_address_space * const vm,
  						   start, end, lvl);
  		} else {
  			unsigned int count;
+			unsigned int pte = gen8_pd_index(start, 0);
+			unsigned int num_ptes;
  			u64 *vaddr;
 
  			count = gen8_pt_count(start, end);
@@ -242,10 +244,18 @@ static u64 __gen8_ppgtt_clear(struct i915_address_space * const vm,
  			    atomic_read(&pt->used));
  			GEM_BUG_ON(!count || count >= atomic_read(&pt->used));
 
+			num_ptes = count;
+			if (pt->is_compact) {
+				GEM_BUG_ON(num_ptes % 16);
+				GEM_BUG_ON(pte % 16);
+				num_ptes /= 16;
+				pte /= 16;
+			}
+
  			vaddr = px_vaddr(pt);
-			memset64(vaddr + gen8_pd_index(start, 0),
+			memset64(vaddr + pte,
  				 vm->scratch[0]->encode,
-				 count);
+				 num_ptes);
 
  			atomic_sub(count, &pt->used);
  			start += count;
@@ -453,6 +463,95 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt,
  	return idx;
  }
 
+static void
+xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
+			  struct i915_vma_resource *vma_res,
+			  struct sgt_dma *iter,
+			  enum i915_cache_level cache_level,
+			  u32 flags)
+{
+	const gen8_pte_t pte_encode = vm->pte_encode(0, cache_level, flags);
+	unsigned int rem = sg_dma_len(iter->sg);
+	u64 start = vma_res->start;
+
+	GEM_BUG_ON(!i915_vm_is_4lvl(vm));
+
+	do {
+		struct i915_page_directory * const pdp =
+			gen8_pdp_for_page_address(vm, start);
+		struct i915_page_directory * const pd =
+			i915_pd_entry(pdp, __gen8_pte_index(start, 2));
+		struct i915_page_table *pt =
+			i915_pt_entry(pd, __gen8_pte_index(start, 1));
+		gen8_pte_t encode = pte_encode;
+		unsigned int page_size;
+		gen8_pte_t *vaddr;
+		u16 index, max;
+
+		max = I915_PDES;
+
+		if (vma_res->bi.page_sizes.sg & I915_GTT_PAGE_SIZE_2M &&
+		    IS_ALIGNED(iter->dma, I915_GTT_PAGE_SIZE_2M) &&
+		    rem >= I915_GTT_PAGE_SIZE_2M &&
+		    !__gen8_pte_index(start, 0)) {
+			index = __gen8_pte_index(start, 1);
+			encode |= GEN8_PDE_PS_2M;
+			page_size = I915_GTT_PAGE_SIZE_2M;
+
+			vaddr = px_vaddr(pd);
+		} else {
+			if (encode & GEN12_PPGTT_PTE_LM) {
+				GEM_BUG_ON(__gen8_pte_index(start, 0) % 16);
+				GEM_BUG_ON(rem < I915_GTT_PAGE_SIZE_64K);
+				GEM_BUG_ON(!IS_ALIGNED(iter->dma,
+						       I915_GTT_PAGE_SIZE_64K));
+
+				index = __gen8_pte_index(start, 0) / 16;
+				page_size = I915_GTT_PAGE_SIZE_64K;
+
+				max /= 16;
+
+				vaddr = px_vaddr(pd);
+				vaddr[__gen8_pte_index(start, 1)] |= GEN12_PDE_64K;
+
+				pt->is_compact = true;
+			} else {
+				GEM_BUG_ON(pt->is_compact);
+				index =  __gen8_pte_index(start, 0);
+				page_size = I915_GTT_PAGE_SIZE;
+			}
+
+			vaddr = px_vaddr(pt);
+		}
+
+		do {
+			GEM_BUG_ON(rem < page_size);
+			vaddr[index++] = encode | iter->dma;
+
+			start += page_size;
+			iter->dma += page_size;
+			rem -= page_size;
+			if (iter->dma >= iter->max) {
+				iter->sg = __sg_next(iter->sg);
+				if (!iter->sg)
+					break;
+
+				rem = sg_dma_len(iter->sg);
+				if (!rem)
+					break;
+
+				iter->dma = sg_dma_address(iter->sg);
+				iter->max = iter->dma + rem;
+
+				if (unlikely(!IS_ALIGNED(iter->dma, page_size)))
+					break;
+			}
+		} while (rem >= page_size && index < max);
+
+		vma_res->page_sizes_gtt |= page_size;
+	} while (iter->sg && sg_dma_len(iter->sg));
+}
+
  static void gen8_ppgtt_insert_huge(struct i915_address_space *vm,
  				   struct i915_vma_resource *vma_res,
  				   struct sgt_dma *iter,
@@ -586,7 +685,10 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
  	struct sgt_dma iter = sgt_dma(vma_res);
 
  	if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
-		gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
+		if (HAS_64K_PAGES(vm->i915))
+			xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
+		else
+			gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
  	} else  {
  		u64 idx = vma_res->start >> GEN8_PTE_SHIFT;
 
drivers/gpu/drm/i915/gt/intel_gtt.h +3 -0
index ba9f040f8606..e6ce0be6d484 100644
@@ -92,6 +92,8 @@ typedef u64 gen8_pte_t;
 
  #define GEN12_GGTT_PTE_LM	BIT_ULL(1)
 
+#define GEN12_PDE_64K BIT(6)
+
  /*
   * Cacheability Control is a 4-bit value. The low three bits are stored in bits
   * 3:1 of the PTE, while the fourth bit is stored in bit 11 of the PTE.
@@ -160,6 +162,7 @@ struct i915_page_table {
  		atomic_t used;
  		struct i915_page_table *stash;
  	};
+	bool is_compact;
  };
 
  struct i915_page_directory {
drivers/gpu/drm/i915/gt/intel_ppgtt.c +1 -0
index 48e6e2f87700..043652dc6892 100644
@@ -26,6 +26,7 @@ struct i915_page_table *alloc_pt(struct i915_address_space *vm)
  		return ERR_PTR(-ENOMEM);
  	}
 
+	pt->is_compact = false;
  	atomic_set(&pt->used, 0);
  	return pt;
  }
#13 lore raw

PATCH v5 4/5 drm/i915: add gtt misalignment test

In reply to Robert Beckett

add test to check handling of misaligned offsets and sizes

v4:
* remove spurious blank lines
* explicitly cast intel_region_id to intel_memory_type in misaligned_pin

---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 128 ++++++++++++++++++
 1 file changed, 128 insertions(+)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +128 -0
index b80788a2b7f9..f082b5ff3b5e 100644
@@ -22,10 +22,12 @@
  *
  */
 
+#include "gt/intel_gtt.h"
 #include <linux/list_sort.h>
 #include <linux/prime_numbers.h>
 
 #include "gem/i915_gem_context.h"
+#include "gem/i915_gem_region.h"
 #include "gem/selftests/mock_context.h"
 #include "gt/intel_context.h"
 #include "gt/intel_gpu_commands.h"
@@ -1067,6 +1069,120 @@ static int shrink_boom(struct i915_address_space *vm,
 	return err;
 }
 
+static int misaligned_case(struct i915_address_space *vm, struct intel_memory_region *mr,
+			   u64 addr, u64 size, unsigned long flags)
+{
+	struct drm_i915_gem_object *obj;
+	struct i915_vma *vma;
+	int err = 0;
+	u64 expected_vma_size, expected_node_size;
+
+	obj = i915_gem_object_create_region(mr, size, 0, 0);
+	if (IS_ERR(obj))
+		return PTR_ERR(obj);
+
+	vma = i915_vma_instance(obj, vm, NULL);
+	if (IS_ERR(vma)) {
+		err = PTR_ERR(vma);
+		goto err_put;
+	}
+
+	err = i915_vma_pin(vma, 0, 0, addr | flags);
+	if (err)
+		goto err_put;
+	i915_vma_unpin(vma);
+
+	if (!drm_mm_node_allocated(&vma->node)) {
+		err = -EINVAL;
+		goto err_put;
+	}
+
+	if (i915_vma_misplaced(vma, 0, 0, addr | flags)) {
+		err = -EINVAL;
+		goto err_put;
+	}
+
+	expected_vma_size = round_up(size, 1 << (ffs(vma->resource->page_sizes_gtt) - 1));
+	expected_node_size = expected_vma_size;
+
+	if (IS_DG2(vm->i915) && i915_gem_object_is_lmem(obj)) {
+		/* dg2 should expand lmem node to 2MB */
+		expected_vma_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
+		expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
+	}
+
+	if (vma->size != expected_vma_size || vma->node.size != expected_node_size) {
+		err = i915_vma_unbind(vma);
+		err = -EBADSLT;
+		goto err_put;
+	}
+
+	err = i915_vma_unbind(vma);
+	if (err)
+		goto err_put;
+
+	GEM_BUG_ON(drm_mm_node_allocated(&vma->node));
+
+err_put:
+	i915_gem_object_put(obj);
+	cleanup_freed_objects(vm->i915);
+	return err;
+}
+
+static int misaligned_pin(struct i915_address_space *vm,
+			  u64 hole_start, u64 hole_end,
+			  unsigned long end_time)
+{
+	struct intel_memory_region *mr;
+	enum intel_region_id id;
+	unsigned long flags = PIN_OFFSET_FIXED | PIN_USER;
+	int err = 0;
+	u64 hole_size = hole_end - hole_start;
+
+	if (i915_is_ggtt(vm))
+		flags |= PIN_GLOBAL;
+
+	for_each_memory_region(mr, vm->i915, id) {
+		u64 min_alignment = i915_vm_min_alignment(vm, (enum intel_memory_type)id);
+		u64 size = min_alignment;
+		u64 addr = round_up(hole_start + (hole_size / 2), min_alignment);
+
+		/* we can't test < 4k alignment due to flags being encoded in lower bits */
+		if (min_alignment != I915_GTT_PAGE_SIZE_4K) {
+			err = misaligned_case(vm, mr, addr + (min_alignment / 2), size, flags);
+			/* misaligned should error with -EINVAL*/
+			if (!err)
+				err = -EBADSLT;
+			if (err != -EINVAL)
+				return err;
+		}
+
+		/* test for vma->size expansion to min page size */
+		err = misaligned_case(vm, mr, addr, PAGE_SIZE, flags);
+		if (min_alignment > hole_size) {
+			if (!err)
+				err = -EBADSLT;
+			else if (err == -ENOSPC)
+				err = 0;
+		}
+		if (err)
+			return err;
+
+		/* test for intermediate size not expanding vma->size for large alignments */
+		err = misaligned_case(vm, mr, addr, size / 2, flags);
+		if (min_alignment > hole_size) {
+			if (!err)
+				err = -EBADSLT;
+			else if (err == -ENOSPC)
+				err = 0;
+		}
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
 static int exercise_ppgtt(struct drm_i915_private *dev_priv,
 			  int (*func)(struct i915_address_space *vm,
 				      u64 hole_start, u64 hole_end,
@@ -1136,6 +1252,11 @@ static int igt_ppgtt_shrink_boom(void *arg)
 	return exercise_ppgtt(arg, shrink_boom);
 }
 
+static int igt_ppgtt_misaligned_pin(void *arg)
+{
+	return exercise_ppgtt(arg, misaligned_pin);
+}
+
 static int sort_holes(void *priv, const struct list_head *A,
 		      const struct list_head *B)
 {
@@ -1208,6 +1329,11 @@ static int igt_ggtt_lowlevel(void *arg)
 	return exercise_ggtt(arg, lowlevel_hole);
 }
 
+static int igt_ggtt_misaligned_pin(void *arg)
+{
+	return exercise_ggtt(arg, misaligned_pin);
+}
+
 static int igt_ggtt_page(void *arg)
 {
 	const unsigned int count = PAGE_SIZE/sizeof(u32);
@@ -2180,12 +2306,14 @@ int i915_gem_gtt_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_ppgtt_fill),
 		SUBTEST(igt_ppgtt_shrink),
 		SUBTEST(igt_ppgtt_shrink_boom),
+		SUBTEST(igt_ppgtt_misaligned_pin),
 		SUBTEST(igt_ggtt_lowlevel),
 		SUBTEST(igt_ggtt_drunk),
 		SUBTEST(igt_ggtt_walk),
 		SUBTEST(igt_ggtt_pot),
 		SUBTEST(igt_ggtt_fill),
 		SUBTEST(igt_ggtt_page),
+		SUBTEST(igt_ggtt_misaligned_pin),
 		SUBTEST(igt_cs_tlb),
 	};
 
Signature · 1 line
2.25.1
#14 lore raw

Re: [Intel-gfx] [PATCH v5 4/5] drm/i915: add gtt misalignment test

Quoted 61 lines · Robert Beckett

add test to check handling of misaligned offsets and sizes

v4:
* remove spurious blank lines
* explicitly cast intel_region_id to intel_memory_type in misaligned_pin

---
  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 128 ++++++++++++++++++
  1 file changed, 128 insertions(+)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +30 -0
index b80788a2b7f9..f082b5ff3b5e 100644
@@ -22,10 +22,12 @@
   *
   */
 
+#include "gt/intel_gtt.h"
  #include <linux/list_sort.h>
  #include <linux/prime_numbers.h>
 
  #include "gem/i915_gem_context.h"
+#include "gem/i915_gem_region.h"
  #include "gem/selftests/mock_context.h"
  #include "gt/intel_context.h"
  #include "gt/intel_gpu_commands.h"
@@ -1067,6 +1069,120 @@ static int shrink_boom(struct i915_address_space *vm,
  	return err;
  }
 
+static int misaligned_case(struct i915_address_space *vm, struct intel_memory_region *mr,
+			   u64 addr, u64 size, unsigned long flags)
+{
+	struct drm_i915_gem_object *obj;
+	struct i915_vma *vma;
+	int err = 0;
+	u64 expected_vma_size, expected_node_size;
+
+	obj = i915_gem_object_create_region(mr, size, 0, 0);
+	if (IS_ERR(obj))
+		return PTR_ERR(obj);
+
+	vma = i915_vma_instance(obj, vm, NULL);
+	if (IS_ERR(vma)) {
+		err = PTR_ERR(vma);
+		goto err_put;
+	}
+
+	err = i915_vma_pin(vma, 0, 0, addr | flags);
+	if (err)
+		goto err_put;
+	i915_vma_unpin(vma);
+
+	if (!drm_mm_node_allocated(&vma->node)) {
+		err = -EINVAL;
+		goto err_put;
+	}
+

drivers/gpu/drm/i915/selftests/i915_gem_gtt.c static int shrink_boom(struct i915_address_space *vm, · line 1109

Quoted 10 lines
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +10 -0
+	if (i915_vma_misplaced(vma, 0, 0, addr | flags)) {
+		err = -EINVAL;
+		goto err_put;
+	}
+
+	expected_vma_size = round_up(size, 1 << (ffs(vma->resource->page_sizes_gtt) - 1));
+	expected_node_size = expected_vma_size;
+
+	if (IS_DG2(vm->i915) && i915_gem_object_is_lmem(obj)) {
+		/* dg2 should expand lmem node to 2MB */

Should this test be NEEDS_COMPACT_PT()?

Otherwise LGTM. Reviewed-by: Thomas Hellström <[email protected]>

#15 lore raw

Re: [Intel-gfx] [PATCH v5 4/5] drm/i915: add gtt misalignment test

Quoted 76 lines · Thomas Hellström (Intel)
Quoted 61 lines · Robert Beckett

add test to check handling of misaligned offsets and sizes

v4:
    * remove spurious blank lines
    * explicitly cast intel_region_id to intel_memory_type in misaligned_pin

---
  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 128 ++++++++++++++++++

  1 file changed, 128 insertions(+)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +31 -0
index b80788a2b7f9..f082b5ff3b5e 100644
@@ -22,10 +22,12 @@
    *
    */
+#include "gt/intel_gtt.h"
   #include <linux/list_sort.h>
   #include <linux/prime_numbers.h>
   #include "gem/i915_gem_context.h"
+#include "gem/i915_gem_region.h"
   #include "gem/selftests/mock_context.h"
   #include "gt/intel_context.h"
   #include "gt/intel_gpu_commands.h"
@@ -1067,6 +1069,120 @@ static int shrink_boom(struct 
 i915_address_space *vm,
       return err;
   }
+static int misaligned_case(struct i915_address_space *vm, struct 
 intel_memory_region *mr,
+               u64 addr, u64 size, unsigned long flags)
+{
+    struct drm_i915_gem_object *obj;
+    struct i915_vma *vma;
+    int err = 0;
+    u64 expected_vma_size, expected_node_size;
+
+    obj = i915_gem_object_create_region(mr, size, 0, 0);
+    if (IS_ERR(obj))
+        return PTR_ERR(obj);
+
+    vma = i915_vma_instance(obj, vm, NULL);
+    if (IS_ERR(vma)) {
+        err = PTR_ERR(vma);
+        goto err_put;
+    }
+
+    err = i915_vma_pin(vma, 0, 0, addr | flags);
+    if (err)
+        goto err_put;
+    i915_vma_unpin(vma);
+
+    if (!drm_mm_node_allocated(&vma->node)) {
+        err = -EINVAL;
+        goto err_put;
+    }
+
+    if (i915_vma_misplaced(vma, 0, 0, addr | flags)) {

drivers/gpu/drm/i915/selftests/i915_gem_gtt.c static int shrink_boom(struct · line 1111

Quoted 10 lines
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +9 -0
+        err = -EINVAL;
+        goto err_put;
+    }
+
+    expected_vma_size = round_up(size, 1 << 
 (ffs(vma->resource->page_sizes_gtt) - 1));
+    expected_node_size = expected_vma_size;
+
+    if (IS_DG2(vm->i915) && i915_gem_object_is_lmem(obj)) {
+        /* dg2 should expand lmem node to 2MB */

Should this test be NEEDS_COMPACT_PT()?

Quoted 1 line

Otherwise LGTM. Reviewed-by: Thomas Hellström <[email protected]>

Thanks. Good catch, forgot to retrofit the new macro here.

Quoted 2 lines
#16 lore raw

PATCH v5 5/5 drm/i915/uapi: document behaviour for DG2 64K support

In reply to Robert Beckett

From: Matthew Auld <[email protected]>

On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing with device local-memory. This is quite tricky for various reasons, so try to document the new implicit uapi for this.

v3: fix typos and less emphasis
v2: Fixed suggestions on formatting [Daniel]

---
 include/uapi/drm/i915_drm.h | 44 ++++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 5 deletions(-)
include/uapi/drm/i915_drm.h +39 -5
index 5e678917da70..77e5e74c32c1 100644
@@ -1118,10 +1118,16 @@ struct drm_i915_gem_exec_object2 {
 	/**
 	 * When the EXEC_OBJECT_PINNED flag is specified this is populated by
 	 * the user with the GTT offset at which this object will be pinned.
+	 *
 	 * When the I915_EXEC_NO_RELOC flag is specified this must contain the
 	 * presumed_offset of the object.
+	 *
 	 * During execbuffer2 the kernel populates it with the value of the
 	 * current GTT offset of the object, for future presumed_offset writes.
+	 *
+	 * See struct drm_i915_gem_create_ext for the rules when dealing with
+	 * alignment restrictions with I915_MEMORY_CLASS_DEVICE, on devices with
+	 * minimum page sizes, like DG2.
 	 */
 	__u64 offset;
 
@@ -3145,11 +3151,39 @@ struct drm_i915_gem_create_ext {
 	 *
 	 * The (page-aligned) allocated size for the object will be returned.
 	 *
-	 * Note that for some devices we have might have further minimum
-	 * page-size restrictions(larger than 4K), like for device local-memory.
-	 * However in general the final size here should always reflect any
-	 * rounding up, if for example using the I915_GEM_CREATE_EXT_MEMORY_REGIONS
-	 * extension to place the object in device local-memory.
+	 *
+	 * DG2 64K min page size implications:
+	 *
+	 * On discrete platforms, starting from DG2, we have to contend with GTT
+	 * page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE
+	 * objects.  Specifically the hardware only supports 64K or larger GTT
+	 * page sizes for such memory. The kernel will already ensure that all
+	 * I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page
+	 * sizes underneath.
+	 *
+	 * Note that the returned size here will always reflect any required
+	 * rounding up done by the kernel, i.e 4K will now become 64K on devices
+	 * such as DG2.
+	 *
+	 * Special DG2 GTT address alignment requirement:
+	 *
+	 * The GTT alignment will also need to be at least 2M for such objects.
+	 *
+	 * Note that due to how the hardware implements 64K GTT page support, we
+	 * have some further complications:
+	 *
+	 *   1) The entire PDE (which covers a 2MB virtual address range), must
+	 *   contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same
+	 *   PDE is forbidden by the hardware.
+	 *
+	 *   2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM
+	 *   objects.
+	 *
+	 * To keep things simple for userland, we mandate that any GTT mappings
+	 * must be aligned to and rounded up to 2MB. As this only wastes virtual
+	 * address space and avoids userland having to copy any needlessly
+	 * complicated PDE sharing scheme (coloring) and only affects DG2, this
+	 * is deemed to be a good compromise.
 	 */
 	__u64 size;
 	/**
Signature · 1 line
2.25.1
Reviewed-by Thomas Hellström on v5 5/5
#17 lore raw

Re: [Intel-gfx] [PATCH v5 5/5] drm/i915/uapi: document behaviour for DG2 64K support

Quoted 21 lines · Robert Beckett

From: Matthew Auld <[email protected]>

On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing with device local-memory. This is quite tricky for various reasons, so try to document the new implicit uapi for this.

v3: fix typos and less emphasis
v2: Fixed suggestions on formatting [Daniel]

Quoted 1 line

---

#18 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for discrete card 64K page support (rev3)

In reply to Robert Beckett
== Series Details ==

== Series Details ==

Series: discrete card 64K page support (rev3)
URL : https://patchwork.freedesktop.org/series/99119/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
df51c5a24eef drm/i915: add needs_compact_pt flag
c3d4f40f9033 drm/i915: enforce min GTT alignment for discrete cards
-:294: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#294: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:457:
+						if (offset < hole_start + aligned_size)

-:306: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #306: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:481:
+ if (offset + aligned_size > hole_end)

-:324: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #324: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:497:
+ if (offset < hole_start + aligned_size)

-:336: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #336: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:520:
+ if (offset + aligned_size > hole_end)

-:354: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #354: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:536:
+ if (offset < hole_start + aligned_size)

-:366: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #366: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:560:
+ if (offset + aligned_size > hole_end)

-:384: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #384: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:576:
+ if (offset < hole_start + aligned_size)

-:396: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #396: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:599:
+ if (offset + aligned_size > hole_end)

total: 0 errors, 8 warnings, 0 checks, 436 lines checked c39377079d4d drm/i915: support 64K GTT pages for discrete cards c3028878f829 drm/i915: add gtt misalignment test 7dd58d6f3a52 drm/i915/uapi: document behaviour for DG2 64K support

#20 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for discrete card 64K page support (rev3)

In reply to Robert Beckett
== Series Details ==

== Series Details ==

Series: discrete card 64K page support (rev3)
URL : https://patchwork.freedesktop.org/series/99119/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11134 -> Patchwork_22104
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_22104, 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_22104/index.html

Participating hosts (47 -> 42)
------------------------------

Missing (5): fi-hsw-4200u fi-bsw-cyan fi-icl-u2 fi-ctg-p8600 fi-bdw-samus

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gtt:
- fi-bsw-kefka: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bsw-kefka/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bsw-kefka/igt@i915_selftest@[email protected]
- fi-bwr-2160: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bwr-2160/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bwr-2160/igt@i915_selftest@[email protected]
- fi-skl-guc: [PASS][5] -> [DMESG-FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-skl-guc/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-guc/igt@i915_selftest@[email protected]
- fi-kbl-8809g: [PASS][7] -> [DMESG-FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-kbl-8809g/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-8809g/igt@i915_selftest@[email protected]
- fi-blb-e6850: [PASS][9] -> [DMESG-FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-blb-e6850/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-blb-e6850/igt@i915_selftest@[email protected]
- fi-bdw-5557u: NOTRUN -> [DMESG-FAIL][11]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bdw-5557u/igt@i915_selftest@[email protected]
- fi-kbl-7567u: [PASS][12] -> [DMESG-FAIL][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-kbl-7567u/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-7567u/igt@i915_selftest@[email protected]
- fi-glk-j4005: [PASS][14] -> [DMESG-FAIL][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-glk-j4005/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-glk-j4005/igt@i915_selftest@[email protected]
- fi-bsw-nick: [PASS][16] -> [DMESG-FAIL][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bsw-nick/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bsw-nick/igt@i915_selftest@[email protected]
- fi-cfl-8109u: [PASS][18] -> [DMESG-FAIL][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-cfl-8109u/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-8109u/igt@i915_selftest@[email protected]
- fi-snb-2520m: [PASS][20] -> [DMESG-FAIL][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-snb-2520m/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-snb-2520m/igt@i915_selftest@[email protected]
- fi-cfl-8700k: [PASS][22] -> [DMESG-FAIL][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-cfl-8700k/igt@i915_selftest@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-8700k/igt@i915_selftest@[email protected]
- fi-cml-u2: [PASS][24] -> [DMESG-FAIL][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-cml-u2/igt@i915_selftest@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cml-u2/igt@i915_selftest@[email protected]
- fi-ilk-650: [PASS][26] -> [DMESG-FAIL][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-ilk-650/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-ilk-650/igt@i915_selftest@[email protected]
- fi-bsw-n3050: [PASS][28] -> [INCOMPLETE][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bsw-n3050/igt@i915_selftest@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bsw-n3050/igt@i915_selftest@[email protected]
- fi-hsw-4770: [PASS][30] -> [DMESG-FAIL][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-hsw-4770/igt@i915_selftest@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-hsw-4770/igt@i915_selftest@[email protected]
- fi-cfl-guc: [PASS][32] -> [DMESG-FAIL][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-cfl-guc/igt@i915_selftest@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-guc/igt@i915_selftest@[email protected]
- fi-skl-6700k2: [PASS][34] -> [DMESG-FAIL][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-skl-6700k2/igt@i915_selftest@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-6700k2/igt@i915_selftest@[email protected]
- fi-elk-e7500: [PASS][36] -> [DMESG-FAIL][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-elk-e7500/igt@i915_selftest@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-elk-e7500/igt@i915_selftest@[email protected]
- fi-kbl-soraka: [PASS][38] -> [INCOMPLETE][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-kbl-soraka/igt@i915_selftest@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-soraka/igt@i915_selftest@[email protected]
- fi-glk-dsi: [PASS][40] -> [DMESG-FAIL][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-glk-dsi/igt@i915_selftest@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-glk-dsi/igt@i915_selftest@[email protected]
- fi-ivb-3770: [PASS][42] -> [DMESG-FAIL][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-ivb-3770/igt@i915_selftest@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-ivb-3770/igt@i915_selftest@[email protected]
- bat-dg1-6: [PASS][44] -> [DMESG-FAIL][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/bat-dg1-6/igt@i915_selftest@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/bat-dg1-6/igt@i915_selftest@[email protected]
- fi-snb-2600: [PASS][46] -> [DMESG-FAIL][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-snb-2600/igt@i915_selftest@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-snb-2600/igt@i915_selftest@[email protected]
- fi-rkl-guc: [PASS][48] -> [DMESG-FAIL][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-rkl-guc/igt@i915_selftest@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-rkl-guc/igt@i915_selftest@[email protected]
- fi-kbl-x1275: [PASS][50] -> [DMESG-FAIL][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-kbl-x1275/igt@i915_selftest@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-x1275/igt@i915_selftest@[email protected]
- fi-kbl-7500u: [PASS][52] -> [DMESG-FAIL][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-kbl-7500u/igt@i915_selftest@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-7500u/igt@i915_selftest@[email protected]
- fi-rkl-11600: [PASS][54] -> [DMESG-FAIL][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-rkl-11600/igt@i915_selftest@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-rkl-11600/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@gtt:
- {bat-jsl-2}: [PASS][56] -> [DMESG-FAIL][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/bat-jsl-2/igt@i915_selftest@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/bat-jsl-2/igt@i915_selftest@[email protected]
- {fi-ehl-2}: [PASS][58] -> [DMESG-FAIL][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-ehl-2/igt@i915_selftest@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-ehl-2/igt@i915_selftest@[email protected]
- {fi-tgl-dsi}: [PASS][60] -> [INCOMPLETE][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-tgl-dsi/igt@i915_selftest@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-tgl-dsi/igt@i915_selftest@[email protected]
- {fi-jsl-1}: [PASS][62] -> [INCOMPLETE][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-jsl-1/igt@i915_selftest@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-jsl-1/igt@i915_selftest@[email protected]
- {bat-jsl-1}: [PASS][64] -> [DMESG-FAIL][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/bat-jsl-1/igt@i915_selftest@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/bat-jsl-1/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_flink_basic@bad-flink:
- fi-skl-6600u: [PASS][66] -> [FAIL][67] ([i915#4547])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-skl-6600u/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-6600u/igt@[email protected]

* igt@i915_selftest@live@gtt:
- fi-bxt-dsi: [PASS][68] -> [DMESG-FAIL][69] ([i915#2927])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bxt-dsi/igt@i915_selftest@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bxt-dsi/igt@i915_selftest@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-bdw-5557u: NOTRUN -> [SKIP][70] ([fdo#109271] / [fdo#111827]) +8 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bdw-5557u/igt@[email protected]

* igt@kms_psr@cursor_plane_move:
- fi-bdw-5557u: NOTRUN -> [SKIP][71] ([fdo#109271]) +13 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bdw-5557u/igt@kms_psr@cursor_plane_move.html

* igt@runner@aborted:
- fi-rkl-11600: NOTRUN -> [FAIL][72] ([i915#4312])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-rkl-11600/igt@[email protected]
- fi-snb-2600: NOTRUN -> [FAIL][73] ([i915#4312])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-snb-2600/igt@[email protected]
- fi-ilk-650: NOTRUN -> [FAIL][74] ([fdo#109271] / [i915#4312])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-ilk-650/igt@[email protected]
- fi-kbl-x1275: NOTRUN -> [FAIL][75] ([i915#1436] / [i915#4312])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-x1275/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][76] ([fdo#109271] / [i915#1436] / [i915#3428] / [i915#4312])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bsw-kefka/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [FAIL][77] ([i915#4312])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-8700k/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [FAIL][78] ([i915#4312])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-8109u/igt@[email protected]
- fi-glk-dsi: NOTRUN -> [FAIL][79] ([i915#4312] / [k.org#202321])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-glk-dsi/igt@[email protected]
- fi-kbl-8809g: NOTRUN -> [FAIL][80] ([i915#1436] / [i915#4312])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-8809g/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [FAIL][81] ([i915#4312])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-snb-2520m/igt@[email protected]
- fi-bwr-2160: NOTRUN -> [FAIL][82] ([i915#4312])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bwr-2160/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [FAIL][83] ([i915#1436] / [i915#4312])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-soraka/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [FAIL][84] ([fdo#109271] / [i915#1436] / [i915#4312])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-hsw-4770/igt@[email protected]
- fi-kbl-7500u: NOTRUN -> [FAIL][85] ([i915#1436] / [i915#4312])
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-7500u/igt@[email protected]
- fi-cml-u2: NOTRUN -> [FAIL][86] ([i915#4312])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cml-u2/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [FAIL][87] ([i915#4312])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-rkl-guc/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [FAIL][88] ([fdo#109271] / [i915#4312])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-ivb-3770/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][89] ([i915#4312])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bxt-dsi/igt@[email protected]
- bat-dg1-6: NOTRUN -> [FAIL][90] ([i915#4312])
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/bat-dg1-6/igt@[email protected]
- fi-elk-e7500: NOTRUN -> [FAIL][91] ([fdo#109271] / [i915#4312])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-elk-e7500/igt@[email protected]
- fi-cfl-guc: NOTRUN -> [FAIL][92] ([i915#4312])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-cfl-guc/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [FAIL][93] ([i915#4312] / [k.org#202321])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-glk-j4005/igt@[email protected]
- fi-kbl-7567u: NOTRUN -> [FAIL][94] ([i915#1436] / [i915#4312])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-kbl-7567u/igt@[email protected]
- fi-skl-guc: NOTRUN -> [FAIL][95] ([i915#1436] / [i915#4312])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-guc/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [FAIL][96] ([i915#1436] / [i915#4312])
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-6700k2/igt@[email protected]
- fi-blb-e6850: NOTRUN -> [FAIL][97] ([fdo#109271] / [i915#2403] / [i915#4312])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-blb-e6850/igt@[email protected]

#### Warnings ####

* igt@runner@aborted:
- fi-skl-6600u: [FAIL][98] ([i915#2722] / [i915#4312]) -> [FAIL][99] ([i915#4312])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-skl-6600u/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-skl-6600u/igt@[email protected]
- fi-bdw-5557u: [FAIL][100] ([i915#2426] / [i915#4312]) -> [FAIL][101] ([i915#4312])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bdw-5557u/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bdw-5557u/igt@[email protected]
- fi-bsw-n3050: [FAIL][102] ([fdo#109271] / [i915#1436] / [i915#2722] / [i915#3428] / [i915#4312]) -> [FAIL][103] ([fdo#109271] / [i915#1436] / [i915#3428] / [i915#4312])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11134/fi-bsw-n3050/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22104/fi-bsw-n3050/igt@[email protected]

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#2927]: https://gitlab.freedesktop.org/drm/intel/issues/2927
[i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
[i915#3970]: https://gitlab.freedesktop.org/drm/intel/issues/3970
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321

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

* Linux: CI_DRM_11134 -> Patchwork_22104

CI-20190529: 20190529
CI_DRM_11134: 9a17b3d929e29406336a90f557b0d353bff07c76 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6332: 27c9c3f5181a840c777399be7681d2cadd7940cd @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_22104: 7dd58d6f3a52394e686da97e30c5db85194a2ce7 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7dd58d6f3a52 drm/i915/uapi: document behaviour for DG2 64K support c3028878f829 drm/i915: add gtt misalignment test c39377079d4d drm/i915: support 64K GTT pages for discrete cards c3d4f40f9033 drm/i915: enforce min GTT alignment for discrete cards df51c5a24eef drm/i915: add needs_compact_pt flag

== Logs ==

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