Skip to contentSkip to conversation

drm/xe: Removed unused xe_ggtt_printk

PATCH In review Rodrigo Vivi 3 participants 18 messages Aug 15, 2024 – Aug 16, 2024

Subsystems (6)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/12 drm/xe: Removed unused xe_ggtt_printk

Apparently this was only useful when enabling ggtt support for the very first time and never used again.
It is also not useful now that we have the ggtt_dump available through debugfs.

---
 drivers/gpu/drm/xe/xe_ggtt.c | 20 --------------------
 drivers/gpu/drm/xe/xe_ggtt.h |  1 -
 2 files changed, 21 deletions(-)
drivers/gpu/drm/xe/xe_ggtt.c +0 -20
index 0cdbc1296e88..add14f3dea1f 100644
@@ -314,26 +314,6 @@ static void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
 	ggtt_invalidate_gt_tlb(ggtt->tile->media_gt);
 }
 
-void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix)
-{
-	u16 pat_index = tile_to_xe(ggtt->tile)->pat.idx[XE_CACHE_WB];
-	u64 addr, scratch_pte;
-
-	scratch_pte = ggtt->pt_ops->pte_encode_bo(ggtt->scratch, 0, pat_index);
-
-	printk("%sGlobal GTT:", prefix);
-	for (addr = 0; addr < ggtt->size; addr += XE_PAGE_SIZE) {
-		unsigned int i = addr / XE_PAGE_SIZE;
-
-		xe_tile_assert(ggtt->tile, addr <= U32_MAX);
-		if (ggtt->gsm[i] == scratch_pte)
-			continue;
-
-		printk("%s    ggtt[0x%08x] = 0x%016llx",
-		       prefix, (u32)addr, ggtt->gsm[i]);
-	}
-}
-
 static void xe_ggtt_dump_node(struct xe_ggtt *ggtt,
 			      const struct drm_mm_node *node, const char *description)
 {
drivers/gpu/drm/xe/xe_ggtt.h +0 -1
index 6a96fd54bf60..2546bab97507 100644
@@ -12,7 +12,6 @@ struct drm_printer;
 
 int xe_ggtt_init_early(struct xe_ggtt *ggtt);
 int xe_ggtt_init(struct xe_ggtt *ggtt);
-void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix);
 
 int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct drm_mm_node *node);
 void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct drm_mm_node *node);
Signature · 1 line
2.46.0
author maintainer
#1 lore raw

PATCH 2/12 drm/xe: Introduce GGTT documentation

Document xe_ggtt and ensure it is part of the built kernel docs.

v2: - Accepted all Michal's suggestions
- Rebased on top of new set_pte per platform/wa function pointer
v3: - Typos and other acronym fixes (Michal)

---
 Documentation/gpu/xe/xe_mm.rst     |  15 ++++
 drivers/gpu/drm/xe/xe_ggtt.c       | 136 +++++++++++++++++++++++------
 drivers/gpu/drm/xe/xe_ggtt_types.h |  34 ++++++--
 3 files changed, 150 insertions(+), 35 deletions(-)
Documentation/gpu/xe/xe_mm.rst +15 -0
index 6c8fd8b4a466..95864a4502dd 100644
@@ -7,6 +7,21 @@ Memory Management
 .. kernel-doc:: drivers/gpu/drm/xe/xe_bo_doc.h
    :doc: Buffer Objects (BO)
 
+GGTT
+====
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt.c
+   :doc: Global Graphics Translation Table (GGTT)
+
+GGTT Internal API
+-----------------
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt_types.h
+   :internal:
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt.c
+   :internal:
+
 Pagetable building
 ==================
 
drivers/gpu/drm/xe/xe_ggtt.c +108 -28

208 lines not on this page · raw message

drivers/gpu/drm/xe/xe_ggtt_types.h +27 -7
index 2245d88d8f39..154de298a4e3 100644
@@ -13,30 +13,50 @@
 struct xe_bo;
 struct xe_gt;
 
+/**
+ * struct xe_ggtt - Main GGTT struct
+ *
+ * In general, each tile can contains its own Global Graphics Translation Table
+ * (GGTT) instance.
+ */
 struct xe_ggtt {
+	/** @tile: Back pointer to tile where this GGTT belongs */
 	struct xe_tile *tile;
-
+	/** @size: Total size of this GGTT */
 	u64 size;
 
 #define XE_GGTT_FLAGS_64K BIT(0)
+	/**
+	 * @flags: Flags for this GGTT
+	 * Acceptable flags:
+	 * - %XE_GGTT_FLAGS_64K - if PTE size is 64K. Otherwise, regular is 4K.
+	 */
 	unsigned int flags;
-
+	/** @scratch: Internal object allocation used as a scratch page */
 	struct xe_bo *scratch;
-
+	/** @lock: Mutex lock to protect GGTT data */
 	struct mutex lock;
-
+	/**
+	 *  @gsm: The iomem pointer to the actual location of the translation
+	 * table located in the GSM for easy PTE manipulation
+	 */
 	u64 __iomem *gsm;
-
+	/** @pt_ops: Page Table operations per platform */
 	const struct xe_ggtt_pt_ops *pt_ops;
-
+	/** @mm: The memory manager used to manage individual GGTT allocations */
 	struct drm_mm mm;
-
 	/** @access_count: counts GGTT writes */
 	unsigned int access_count;
 };
 
+/**
+ * struct xe_ggtt_pt_ops - GGTT Page table operations
+ * Which can vary from platform to platform.
+ */
 struct xe_ggtt_pt_ops {
+	/** @pte_encode_bo: Encode PTE address for a given BO */
 	u64 (*pte_encode_bo)(struct xe_bo *bo, u64 bo_offset, u16 pat_index);
+	/** @ggtt_set_pte: Directly write into GGTT's PTE */
 	void (*ggtt_set_pte)(struct xe_ggtt *ggtt, u64 addr, u64 pte);
 };
 
Signature · 1 line
2.46.0
author maintainer
#2 lore raw

PATCH 3/12 drm/xe: Remove unnecessary drm_mm.h includes

In reply to Rodrigo Vivi

These includes are no longer necessary, and where appropriate are replaced by the linux/types.h one.

---
 drivers/gpu/drm/xe/xe_migrate.h        | 2 +-
 drivers/gpu/drm/xe/xe_res_cursor.h     | 1 -
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/xe/xe_migrate.h +1 -1
index 7929cc2425e8..0109866e398a 100644
@@ -6,7 +6,7 @@
 #ifndef _XE_MIGRATE_
 #define _XE_MIGRATE_
 
-#include <drm/drm_mm.h>
+#include <linux/types.h>
 
 struct dma_fence;
 struct iosys_map;
drivers/gpu/drm/xe/xe_res_cursor.h +0 -1
index 655af89b31a9..dca374b6521c 100644
@@ -26,7 +26,6 @@
 
 #include <linux/scatterlist.h>
 
-#include <drm/drm_mm.h>
 #include <drm/ttm/ttm_placement.h>
 #include <drm/ttm/ttm_range_manager.h>
 #include <drm/ttm/ttm_resource.h>
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c +0 -1
index f46fd2df84de..f7113cf6109d 100644
@@ -5,7 +5,6 @@
  */
 
 #include <drm/drm_managed.h>
-#include <drm/drm_mm.h>
 
 #include <drm/ttm/ttm_device.h>
 #include <drm/ttm/ttm_placement.h>
Signature · 1 line
2.46.0
author maintainer
#3 lore raw

PATCH 4/12 drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt

In reply to Rodrigo Vivi

DPT code is so dependent on i915 vma implementation and it is not ported yet to Xe.

This patch limits inspection to DPT's VMA struct to intel_dpt component only, so the Xe GGTT code can evolve.

Cc Matthew Brost <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Juha-Pekka Heikkila <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dpt.c           | 4 ++++
 drivers/gpu/drm/i915/display/intel_dpt.h           | 1 +
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 ++-
 drivers/gpu/drm/xe/display/xe_fb_pin.c             | 9 +++++++--
 4 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dpt.c +4 -0
index 73a1918e2537..3a6d99044828 100644
@@ -317,3 +317,7 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 	i915_vm_put(&dpt->vm);
 }
 
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return dpt_vma->node.start;
+}
drivers/gpu/drm/i915/display/intel_dpt.h +1 -0
index ff18a525bfbe..7336e905142d 100644
@@ -20,5 +20,6 @@ void intel_dpt_suspend(struct drm_i915_private *i915);
 void intel_dpt_resume(struct drm_i915_private *i915);
 struct i915_address_space *
 intel_dpt_create(struct intel_framebuffer *fb);
+u64 intel_dpt_offset(struct i915_vma *dpt_vma);
 
 #endif /* __INTEL_DPT_H__ */
drivers/gpu/drm/i915/display/skl_universal_plane.c +2 -1
index ba5a628b4757..1cf1d5c8b9dc 100644
@@ -14,6 +14,7 @@
 #include "intel_de.h"
 #include "intel_display_irq.h"
 #include "intel_display_types.h"
+#include "intel_dpt.h"
 #include "intel_fb.h"
 #include "intel_fbc.h"
 #include "intel_frontbuffer.h"
@@ -1162,7 +1163,7 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
 		 * within the DPT is always 0.
 		 */
 		drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
-			    plane_state->dpt_vma->node.start);
+			    intel_dpt_offset(plane_state->dpt_vma));
 		drm_WARN_ON(&i915->drm, offset & 0x1fffff);
 		return offset >> 9;
 	} else {
drivers/gpu/drm/xe/display/xe_fb_pin.c +7 -2
index d7db44e79eaf..42d431ff14e7 100644
@@ -377,8 +377,8 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
 }
 
 /*
- * For Xe introduce dummy intel_dpt_create which just return NULL and
- * intel_dpt_destroy which does nothing.
+ * For Xe introduce dummy intel_dpt_create which just return NULL,
+ * intel_dpt_destroy which does nothing, and fake intel_dpt_ofsset returning 0;
  */
 struct i915_address_space *intel_dpt_create(struct intel_framebuffer *fb)
 {
@@ -389,3 +389,8 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 {
 	return;
 }
+
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return 0;
+}
Signature · 1 line
2.46.0
#4 lore raw

Re: [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt

Quoted 36 lines · Rodrigo Vivi

DPT code is so dependent on i915 vma implementation and it is not ported yet to Xe.

This patch limits inspection to DPT's VMA struct to intel_dpt component only, so the Xe GGTT code can evolve.

Cc Matthew Brost <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Juha-Pekka Heikkila <[email protected]>

---

drivers/gpu/drm/i915/display/intel_dpt.c           | 4 ++++
drivers/gpu/drm/i915/display/intel_dpt.h           | 1 +
drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 ++-
drivers/gpu/drm/xe/display/xe_fb_pin.c             | 9 +++++++--
4 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dpt.c +4 -0
index 73a1918e2537..3a6d99044828 100644
@@ -317,3 +317,7 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 	i915_vm_put(&dpt->vm);
 }
 
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return dpt_vma->node.start;
+}
drivers/gpu/drm/i915/display/intel_dpt.h +0 -0
index ff18a525bfbe..7336e905142d 100644
@@ -20,5 +20,6 @@ void intel_dpt_suspend(struct drm_i915_private *i915);
 void intel_dpt_resume(struct drm_i915_private *i915);
Quoted 3 lines

struct i915_address_space *
intel_dpt_create(struct intel_framebuffer *fb);
+u64 intel_dpt_offset(struct i915_vma *dpt_vma);

CI doesn't show the exact line, but build is breaking here:

./../drivers/gpu/drm/i915/display/intel_dpt.h:23:1: error: unknown type name ‘u64’

   23 | u64 intel_dpt_offset(struct i915_vma *dpt_vma);
      | ^~~

make[7]: *** [../drivers/gpu/drm/i915/Makefile:419: drivers/gpu/drm/i915/display/intel_dpt.hdrtest] Error 1 make[6]: *** [../scripts/Makefile.build:485: drivers/gpu/drm/i915] Error 2

#include <linux/types.h>

to fix it.

And CONFIG_DRM_XE_WERROR in your .config

Lucas De Marchi

Quoted 50 lines

#endif /* __INTEL_DPT_H__ */

drivers/gpu/drm/i915/display/skl_universal_plane.c +2 -1
index ba5a628b4757..1cf1d5c8b9dc 100644
@@ -14,6 +14,7 @@
 #include "intel_de.h"
 #include "intel_display_irq.h"
 #include "intel_display_types.h"
+#include "intel_dpt.h"
 #include "intel_fb.h"
 #include "intel_fbc.h"
 #include "intel_frontbuffer.h"
@@ -1162,7 +1163,7 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
 		 * within the DPT is always 0.
 		 */
 		drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
-			    plane_state->dpt_vma->node.start);
+			    intel_dpt_offset(plane_state->dpt_vma));
 		drm_WARN_ON(&i915->drm, offset & 0x1fffff);
 		return offset >> 9;
 	} else {
drivers/gpu/drm/xe/display/xe_fb_pin.c +7 -2
index d7db44e79eaf..42d431ff14e7 100644
@@ -377,8 +377,8 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
 }
 
 /*
- * For Xe introduce dummy intel_dpt_create which just return NULL and
- * intel_dpt_destroy which does nothing.
+ * For Xe introduce dummy intel_dpt_create which just return NULL,
+ * intel_dpt_destroy which does nothing, and fake intel_dpt_ofsset returning 0;
 */
 struct i915_address_space *intel_dpt_create(struct intel_framebuffer *fb)
 {
@@ -389,3 +389,8 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 {
 	return;
 }
+
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return 0;
+}
Signature · 1 line
2.46.0
author maintainer
#5 lore raw

Re: [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt

Quoted 44 lines · Lucas De Marchi
Quoted 36 lines · Rodrigo Vivi

DPT code is so dependent on i915 vma implementation and it is not ported yet to Xe.

This patch limits inspection to DPT's VMA struct to intel_dpt component only, so the Xe GGTT code can evolve.

Cc Matthew Brost <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Juha-Pekka Heikkila <[email protected]>

---

drivers/gpu/drm/i915/display/intel_dpt.c           | 4 ++++
drivers/gpu/drm/i915/display/intel_dpt.h           | 1 +
drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 ++-
drivers/gpu/drm/xe/display/xe_fb_pin.c             | 9 +++++++--
4 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dpt.c +4 -0
index 73a1918e2537..3a6d99044828 100644
@@ -317,3 +317,7 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 	i915_vm_put(&dpt->vm);
 }
 
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return dpt_vma->node.start;
+}
drivers/gpu/drm/i915/display/intel_dpt.h +0 -0
index ff18a525bfbe..7336e905142d 100644
@@ -20,5 +20,6 @@ void intel_dpt_suspend(struct drm_i915_private *i915);
 void intel_dpt_resume(struct drm_i915_private *i915);
Quoted 3 lines

struct i915_address_space *
intel_dpt_create(struct intel_framebuffer *fb);
+u64 intel_dpt_offset(struct i915_vma *dpt_vma);

CI doesn't show the exact line, but build is breaking here:

./../drivers/gpu/drm/i915/display/intel_dpt.h:23:1: error: unknown type name ‘u64’

Quoted 8 lines
   23 | u64 intel_dpt_offset(struct i915_vma *dpt_vma);
      | ^~~

make[7]: *** [../drivers/gpu/drm/i915/Makefile:419: drivers/gpu/drm/i915/display/intel_dpt.hdrtest] Error 1 make[6]: *** [../scripts/Makefile.build:485: drivers/gpu/drm/i915] Error 2

#include <linux/types.h>

to fix it.

Thanks. I had seen the build failure and thought I was on some wrong base or something and didn't carefully look that.

Quoted 2 lines

And CONFIG_DRM_XE_WERROR in your .config

The oddest part is that I do have this here.
In both of the machines where I was always building this code and absolutely no warning of any kind! o.O

Quoted 53 lines

Lucas De Marchi

Quoted 50 lines

#endif /* __INTEL_DPT_H__ */

drivers/gpu/drm/i915/display/skl_universal_plane.c +2 -1
index ba5a628b4757..1cf1d5c8b9dc 100644
@@ -14,6 +14,7 @@
 #include "intel_de.h"
 #include "intel_display_irq.h"
 #include "intel_display_types.h"
+#include "intel_dpt.h"
 #include "intel_fb.h"
 #include "intel_fbc.h"
 #include "intel_frontbuffer.h"
@@ -1162,7 +1163,7 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
 		 * within the DPT is always 0.
 		 */
 		drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
-			    plane_state->dpt_vma->node.start);
+			    intel_dpt_offset(plane_state->dpt_vma));
 		drm_WARN_ON(&i915->drm, offset & 0x1fffff);
 		return offset >> 9;
 	} else {
drivers/gpu/drm/xe/display/xe_fb_pin.c +7 -2
index d7db44e79eaf..42d431ff14e7 100644
@@ -377,8 +377,8 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
 }
 
 /*
- * For Xe introduce dummy intel_dpt_create which just return NULL and
- * intel_dpt_destroy which does nothing.
+ * For Xe introduce dummy intel_dpt_create which just return NULL,
+ * intel_dpt_destroy which does nothing, and fake intel_dpt_ofsset returning 0;
 */
 struct i915_address_space *intel_dpt_create(struct intel_framebuffer *fb)
 {
@@ -389,3 +389,8 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 {
 	return;
 }
+
+u64 intel_dpt_offset(struct i915_vma *dpt_vma)
+{
+	return 0;
+}
Signature · 1 line
2.46.0
author maintainer
#6 lore raw

PATCH 5/12 drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node

In reply to Rodrigo Vivi

The xe_ggtt component uses drm_mm to manage the GGTT.
The drm_mm_node is just a node inside drm_mm, but in Xe we use that only in the GGTT context. So, this patch encapsulates the drm_mm_node into a xe_ggtt's new struct.

This is the first step towards limiting all the drm_mm access through xe_ggtt. The ultimate goal is to have a better control of the node insertion and removal, so the removal can be delegated to a delayed workqueue.

v2: Fix includes and typos (Michal and Brost)

---
 .../gpu/drm/xe/compat-i915-headers/i915_vma.h |  7 +-
 drivers/gpu/drm/xe/display/xe_fb_pin.c        | 10 +--
 drivers/gpu/drm/xe/xe_bo.c                    |  2 +-
 drivers/gpu/drm/xe/xe_bo.h                    |  6 +-
 drivers/gpu/drm/xe/xe_bo_types.h              |  5 +-
 drivers/gpu/drm/xe/xe_device_types.h          |  2 +-
 drivers/gpu/drm/xe/xe_ggtt.c                  | 72 +++++++++----------
 drivers/gpu/drm/xe/xe_ggtt.h                  | 12 ++--
 drivers/gpu/drm/xe/xe_ggtt_types.h            |  8 +++
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    | 39 +++++-----
 .../gpu/drm/xe/xe_gt_sriov_pf_config_types.h  |  5 +-
 11 files changed, 90 insertions(+), 78 deletions(-)
drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h +4 -3
index a20d2638ea7a..3028ac1ba72f 100644
@@ -7,7 +7,8 @@
 #define I915_VMA_H
 
 #include <uapi/drm/i915_drm.h>
-#include <drm/drm_mm.h>
+
+#include "xe_ggtt_types.h"
 
 /* We don't want these from i915_drm.h in case of Xe */
 #undef I915_TILING_X
@@ -19,7 +20,7 @@ struct xe_bo;
 
 struct i915_vma {
 	struct xe_bo *bo, *dpt;
-	struct drm_mm_node node;
+	struct xe_ggtt_node node;
 };
 
 #define i915_ggtt_clear_scanout(bo) do { } while (0)
@@ -28,7 +29,7 @@ struct i915_vma {
 
 static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
 {
-	return vma->node.start;
+	return vma->node.base.start;
 }
 
 #endif
drivers/gpu/drm/xe/display/xe_fb_pin.c +5 -5
index 42d431ff14e7..a93923fb8721 100644
@@ -204,7 +204,7 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 	if (xe_bo_is_vram(bo) && ggtt->flags & XE_GGTT_FLAGS_64K)
 		align = max_t(u32, align, SZ_64K);
 
-	if (bo->ggtt_node.size && view->type == I915_GTT_VIEW_NORMAL) {
+	if (bo->ggtt_node.base.size && view->type == I915_GTT_VIEW_NORMAL) {
 		vma->node = bo->ggtt_node;
 	} else if (view->type == I915_GTT_VIEW_NORMAL) {
 		u32 x, size = bo->ttm.base.size;
@@ -218,7 +218,7 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 			u64 pte = ggtt->pt_ops->pte_encode_bo(bo, x,
 							      xe->pat.idx[XE_CACHE_NONE]);
 
-			ggtt->pt_ops->ggtt_set_pte(ggtt, vma->node.start + x, pte);
+			ggtt->pt_ops->ggtt_set_pte(ggtt, vma->node.base.start + x, pte);
 		}
 	} else {
 		u32 i, ggtt_ofs;
@@ -232,7 +232,7 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 		if (ret)
 			goto out_unlock;
 
-		ggtt_ofs = vma->node.start;
+		ggtt_ofs = vma->node.base.start;
 
 		for (i = 0; i < ARRAY_SIZE(rot_info->plane); i++)
 			write_ggtt_rotated(bo, ggtt, &ggtt_ofs,
@@ -325,8 +325,8 @@ static void __xe_unpin_fb_vma(struct i915_vma *vma)
 
 	if (vma->dpt)
 		xe_bo_unpin_map_no_vm(vma->dpt);
-	else if (!drm_mm_node_allocated(&vma->bo->ggtt_node) ||
-		 vma->bo->ggtt_node.start != vma->node.start)
+	else if (!drm_mm_node_allocated(&vma->bo->ggtt_node.base) ||
+		 vma->bo->ggtt_node.base.start != vma->node.base.start)
 		xe_ggtt_remove_node(ggtt, &vma->node, false);
 
 	ttm_bo_reserve(&vma->bo->ttm, false, false, NULL);
drivers/gpu/drm/xe/xe_bo.c +1 -1
index 56a089aa3916..74c850777246 100644
@@ -1098,7 +1098,7 @@ static void xe_ttm_bo_destroy(struct ttm_buffer_object *ttm_bo)
 
 	xe_assert(xe, list_empty(&ttm_bo->base.gpuva.list));
 
-	if (bo->ggtt_node.size)
+	if (bo->ggtt_node.base.size)
 		xe_ggtt_remove_bo(bo->tile->mem.ggtt, bo);
 
 #ifdef CONFIG_PROC_FS
drivers/gpu/drm/xe/xe_bo.h +3 -3
index 1c9dc8adaaa3..faffbda55517 100644
@@ -195,9 +195,9 @@ xe_bo_main_addr(struct xe_bo *bo, size_t page_size)
 static inline u32
 xe_bo_ggtt_addr(struct xe_bo *bo)
 {
-	XE_WARN_ON(bo->ggtt_node.size > bo->size);
-	XE_WARN_ON(bo->ggtt_node.start + bo->ggtt_node.size > (1ull << 32));
-	return bo->ggtt_node.start;
+	XE_WARN_ON(bo->ggtt_node.base.size > bo->size);
+	XE_WARN_ON(bo->ggtt_node.base.start + bo->ggtt_node.base.size > (1ull << 32));
+	return bo->ggtt_node.base.start;
 }
 
 int xe_bo_vmap(struct xe_bo *bo);
drivers/gpu/drm/xe/xe_bo_types.h +3 -2
index ebc8abf7930a..4b1de9f5be00 100644
@@ -8,12 +8,13 @@
 
 #include <linux/iosys-map.h>
 
-#include <drm/drm_mm.h>
 #include <drm/ttm/ttm_bo.h>
 #include <drm/ttm/ttm_device.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 #include <drm/ttm/ttm_placement.h>
 
+#include "xe_ggtt_types.h"
+
 struct xe_device;
 struct xe_vm;
 
@@ -39,7 +40,7 @@ struct xe_bo {
 	/** @placement: current placement for this BO */
 	struct ttm_placement placement;
 	/** @ggtt_node: GGTT node if this BO is mapped in the GGTT */
-	struct drm_mm_node ggtt_node;
+	struct xe_ggtt_node ggtt_node;
 	/** @vmap: iosys map of this buffer */
 	struct iosys_map vmap;
 	/** @ttm_kmap: TTM bo kmap object for internal use only. Keep off. */
drivers/gpu/drm/xe/xe_device_types.h +1 -1
index 16a24eadd94b..d2b3d8a0c1bd 100644
@@ -204,7 +204,7 @@ struct xe_tile {
 			struct xe_memirq memirq;
 
 			/** @sriov.vf.ggtt_balloon: GGTT regions excluded from use. */
-			struct drm_mm_node ggtt_balloon[2];
+			struct xe_ggtt_node ggtt_balloon[2];
 		} vf;
 	} sriov;
 
drivers/gpu/drm/xe/xe_ggtt.c +36 -36

192 lines not on this page · raw message

drivers/gpu/drm/xe/xe_ggtt.h +6 -6
index 2546bab97507..30a521f7b075 100644
@@ -13,15 +13,15 @@ struct drm_printer;
 int xe_ggtt_init_early(struct xe_ggtt *ggtt);
 int xe_ggtt_init(struct xe_ggtt *ggtt);
 
-int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct drm_mm_node *node);
-void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct drm_mm_node *node);
+int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
+void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
 
-int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
+int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 				u32 size, u32 align);
 int xe_ggtt_insert_special_node_locked(struct xe_ggtt *ggtt,
-				       struct drm_mm_node *node,
+				       struct xe_ggtt_node *node,
 				       u32 size, u32 align, u32 mm_flags);
-void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
+void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 			 bool invalidate);
 void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
@@ -32,7 +32,7 @@ void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p);
 
 #ifdef CONFIG_PCI_IOV
-void xe_ggtt_assign(struct xe_ggtt *ggtt, const struct drm_mm_node *node, u16 vfid);
+void xe_ggtt_assign(struct xe_ggtt *ggtt, const struct xe_ggtt_node *node, u16 vfid);
 #endif
 
 #endif
drivers/gpu/drm/xe/xe_ggtt_types.h +8 -0
index 154de298a4e3..af312a7d1031 100644
@@ -49,6 +49,14 @@ struct xe_ggtt {
 	unsigned int access_count;
 };
 
+/**
+ * struct xe_ggtt_node - A node in GGTT
+ */
+struct xe_ggtt_node {
+	/** @base: A drm_mm_node */
+	struct drm_mm_node base;
+};
+
 /**
  * struct xe_ggtt_pt_ops - GGTT Page table operations
  * Which can vary from platform to platform.
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +21 -18
index 227527785afd..f107ae550c0f 100644
@@ -6,6 +6,9 @@
 #include <linux/string_choices.h>
 #include <linux/wordpart.h>
 
+/* FIXME: remove this after encapsulating all drm_mm_node access into xe_ggtt */
+#include <drm/drm_mm.h>
+
 #include "abi/guc_actions_sriov_abi.h"
 #include "abi/guc_klvs_abi.h"
 
@@ -232,14 +235,14 @@ static u32 encode_config_ggtt(u32 *cfg, const struct xe_gt_sriov_config *config)
 {
 	u32 n = 0;
 
-	if (drm_mm_node_allocated(&config->ggtt_region)) {
+	if (drm_mm_node_allocated(&config->ggtt_region.base)) {
 		cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_GGTT_START);
-		cfg[n++] = lower_32_bits(config->ggtt_region.start);
-		cfg[n++] = upper_32_bits(config->ggtt_region.start);
+		cfg[n++] = lower_32_bits(config->ggtt_region.base.start);
+		cfg[n++] = upper_32_bits(config->ggtt_region.base.start);
 
 		cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_GGTT_SIZE);
-		cfg[n++] = lower_32_bits(config->ggtt_region.size);
-		cfg[n++] = upper_32_bits(config->ggtt_region.size);
+		cfg[n++] = lower_32_bits(config->ggtt_region.base.size);
+		cfg[n++] = upper_32_bits(config->ggtt_region.base.size);
 	}
 
 	return n;
@@ -369,11 +372,11 @@ static int pf_distribute_config_ggtt(struct xe_tile *tile, unsigned int vfid, u6
 	return err ?: err2;
 }
 
-static void pf_release_ggtt(struct xe_tile *tile, struct drm_mm_node *node)
+static void pf_release_ggtt(struct xe_tile *tile, struct xe_ggtt_node *node)
 {
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 
-	if (drm_mm_node_allocated(node)) {
+	if (drm_mm_node_allocated(&node->base)) {
 		/*
 		 * explicit GGTT PTE assignment to the PF using xe_ggtt_assign()
 		 * is redundant, as PTE will be implicitly re-assigned to PF by
@@ -391,7 +394,7 @@ static void pf_release_vf_config_ggtt(struct xe_gt *gt, struct xe_gt_sriov_confi
 static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 {
 	struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
-	struct drm_mm_node *node = &config->ggtt_region;
+	struct xe_ggtt_node *node = &config->ggtt_region;
 	struct xe_tile *tile = gt_to_tile(gt);
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 	u64 alignment = pf_get_ggtt_alignment(gt);
@@ -403,14 +406,14 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 
 	size = round_up(size, alignment);
 
-	if (drm_mm_node_allocated(node)) {
+	if (drm_mm_node_allocated(&node->base)) {
 		err = pf_distribute_config_ggtt(tile, vfid, 0, 0);
 		if (unlikely(err))
 			return err;
 
 		pf_release_ggtt(tile, node);
 	}
-	xe_gt_assert(gt, !drm_mm_node_allocated(node));
+	xe_gt_assert(gt, !drm_mm_node_allocated(&node->base));
 
 	if (!size)
 		return 0;
@@ -421,9 +424,9 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 
 	xe_ggtt_assign(ggtt, node, vfid);
 	xe_gt_sriov_dbg_verbose(gt, "VF%u assigned GGTT %llx-%llx\n",
-				vfid, node->start, node->start + node->size - 1);
+				vfid, node->base.start, node->base.start + node->base.size - 1);
 
-	err = pf_distribute_config_ggtt(gt->tile, vfid, node->start, node->size);
+	err = pf_distribute_config_ggtt(gt->tile, vfid, node->base.start, node->base.size);
 	if (unlikely(err))
 		return err;
 
@@ -433,10 +436,10 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 static u64 pf_get_vf_config_ggtt(struct xe_gt *gt, unsigned int vfid)
 {
 	struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
-	struct drm_mm_node *node = &config->ggtt_region;
+	struct xe_ggtt_node *node = &config->ggtt_region;
 
 	xe_gt_assert(gt, !xe_gt_is_media_type(gt));
-	return drm_mm_node_allocated(node) ? node->size : 0;
+	return drm_mm_node_allocated(&node->base) ? node->base.size : 0;
 }
 
 /**
@@ -2025,13 +2028,13 @@ int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p)
 
 	for (n = 1; n <= total_vfs; n++) {
 		config = &gt->sriov.pf.vfs[n].config;
-		if (!drm_mm_node_allocated(&config->ggtt_region))
+		if (!drm_mm_node_allocated(&config->ggtt_region.base))
 			continue;
 
-		string_get_size(config->ggtt_region.size, 1, STRING_UNITS_2, buf, sizeof(buf));
+		string_get_size(config->ggtt_region.base.size, 1, STRING_UNITS_2, buf, sizeof(buf));
 		drm_printf(p, "VF%u:\t%#0llx-%#llx\t(%s)\n",
-			   n, config->ggtt_region.start,
-			   config->ggtt_region.start + config->ggtt_region.size - 1, buf);
+			   n, config->ggtt_region.base.start,
+			   config->ggtt_region.base.start + config->ggtt_region.base.size - 1, buf);
 	}
 
 	return 0;
drivers/gpu/drm/xe/xe_gt_sriov_pf_config_types.h +2 -3
index 7bc66656fcc7..a73d9a4b9e64 100644
@@ -6,8 +6,7 @@
 #ifndef _XE_GT_SRIOV_PF_CONFIG_TYPES_H_
 #define _XE_GT_SRIOV_PF_CONFIG_TYPES_H_
 
-#include <drm/drm_mm.h>
-
+#include "xe_ggtt_types.h"
 #include "xe_guc_klv_thresholds_set_types.h"
 
 struct xe_bo;
@@ -19,7 +18,7 @@ struct xe_bo;
  */
 struct xe_gt_sriov_config {
 	/** @ggtt_region: GGTT region assigned to the VF. */
-	struct drm_mm_node ggtt_region;
+	struct xe_ggtt_node ggtt_region;
 	/** @lmem_obj: LMEM allocation for use by the VF. */
 	struct xe_bo *lmem_obj;
 	/** @num_ctxs: number of GuC contexts IDs.  */
Signature · 1 line
2.46.0
author maintainer
#7 lore raw

PATCH 6/12 drm/xe: Rename xe_ggtt_node related functions

In reply to Rodrigo Vivi

Bring some consistency and prepare for more xe_ggtt_node related functions to be introduced.

---
 drivers/gpu/drm/xe/display/xe_fb_pin.c     |  8 +-
 drivers/gpu/drm/xe/xe_ggtt.c               | 86 +++++++++++-----------
 drivers/gpu/drm/xe/xe_ggtt.h               | 12 +--
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c |  4 +-
 4 files changed, 54 insertions(+), 56 deletions(-)
drivers/gpu/drm/xe/display/xe_fb_pin.c +3 -5
index a93923fb8721..db74c3395ef8 100644
@@ -209,8 +209,7 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 	} else if (view->type == I915_GTT_VIEW_NORMAL) {
 		u32 x, size = bo->ttm.base.size;
 
-		ret = xe_ggtt_insert_special_node_locked(ggtt, &vma->node, size,
-							 align, 0);
+		ret = xe_ggtt_node_insert_locked(ggtt, &vma->node, size, align, 0);
 		if (ret)
 			goto out_unlock;
 
@@ -227,8 +226,7 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 		/* display seems to use tiles instead of bytes here, so convert it back.. */
 		u32 size = intel_rotation_info_size(rot_info) * XE_PAGE_SIZE;
 
-		ret = xe_ggtt_insert_special_node_locked(ggtt, &vma->node, size,
-							 align, 0);
+		ret = xe_ggtt_node_insert_locked(ggtt, &vma->node, size, align, 0);
 		if (ret)
 			goto out_unlock;
 
@@ -327,7 +325,7 @@ static void __xe_unpin_fb_vma(struct i915_vma *vma)
 		xe_bo_unpin_map_no_vm(vma->dpt);
 	else if (!drm_mm_node_allocated(&vma->bo->ggtt_node.base) ||
 		 vma->bo->ggtt_node.base.start != vma->node.base.start)
-		xe_ggtt_remove_node(ggtt, &vma->node, false);
+		xe_ggtt_node_remove(ggtt, &vma->node, false);
 
 	ttm_bo_reserve(&vma->bo->ttm, false, false, NULL);
 	ttm_bo_unpin(&vma->bo->ttm);
drivers/gpu/drm/xe/xe_ggtt.c +43 -43

131 lines not on this page · raw message

drivers/gpu/drm/xe/xe_ggtt.h +6 -6
index 30a521f7b075..5147930357de 100644
@@ -16,12 +16,12 @@ int xe_ggtt_init(struct xe_ggtt *ggtt);
 int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
 void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
 
-int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
-				u32 size, u32 align);
-int xe_ggtt_insert_special_node_locked(struct xe_ggtt *ggtt,
-				       struct xe_ggtt_node *node,
-				       u32 size, u32 align, u32 mm_flags);
-void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+int xe_ggtt_node_insert(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+			u32 size, u32 align);
+int xe_ggtt_node_insert_locked(struct xe_ggtt *ggtt,
+			       struct xe_ggtt_node *node,
+			       u32 size, u32 align, u32 mm_flags);
+void xe_ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 			 bool invalidate);
 void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +2 -2
index f107ae550c0f..3ca98f8a0eae 100644
@@ -382,7 +382,7 @@ static void pf_release_ggtt(struct xe_tile *tile, struct xe_ggtt_node *node)
 		 * is redundant, as PTE will be implicitly re-assigned to PF by
 		 * the xe_ggtt_clear() called by below xe_ggtt_remove_node().
 		 */
-		xe_ggtt_remove_node(ggtt, node, false);
+		xe_ggtt_node_remove(ggtt, node, false);
 	}
 }
 
@@ -418,7 +418,7 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 	if (!size)
 		return 0;
 
-	err = xe_ggtt_insert_special_node(ggtt, node, size, alignment);
+	err = xe_ggtt_node_insert(ggtt, node, size, alignment);
 	if (unlikely(err))
 		return err;
 
Signature · 1 line
2.46.0
author maintainer
#8 lore raw

PATCH 7/12 drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node

In reply to Rodrigo Vivi

Continue with the encapsulation of drm_mm_node inside xe_ggtt.

---
 drivers/gpu/drm/xe/display/xe_fb_pin.c     |  2 +-
 drivers/gpu/drm/xe/xe_ggtt.c               | 11 +++++++++++
 drivers/gpu/drm/xe/xe_ggtt.h               |  1 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 12 ++++++------
 4 files changed, 19 insertions(+), 7 deletions(-)
drivers/gpu/drm/xe/display/xe_fb_pin.c +1 -1
index db74c3395ef8..de4930b67a29 100644
@@ -323,7 +323,7 @@ static void __xe_unpin_fb_vma(struct i915_vma *vma)
 
 	if (vma->dpt)
 		xe_bo_unpin_map_no_vm(vma->dpt);
-	else if (!drm_mm_node_allocated(&vma->bo->ggtt_node.base) ||
+	else if (!xe_ggtt_node_allocated(&vma->bo->ggtt_node) ||
 		 vma->bo->ggtt_node.base.start != vma->node.base.start)
 		xe_ggtt_node_remove(ggtt, &vma->node, false);
 
drivers/gpu/drm/xe/xe_ggtt.c +11 -0
index e0da24bb5774..7c8bbaa30fca 100644
@@ -477,6 +477,17 @@ void xe_ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 	drm_dev_exit(idx);
 }
 
+/**
+ * xe_ggtt_node_allocated - Check if node is allocated
+ * @node: the &xe_ggtt_node to be inspected
+ *
+ * Return: True if allocated, False otherwise.
+ */
+bool xe_ggtt_node_allocated(const struct xe_ggtt_node *node)
+{
+	return drm_mm_node_allocated(&node->base);
+}
+
 /**
  * xe_ggtt_map_bo - Map the BO into GGTT
  * @ggtt: the &xe_ggtt where node will be mapped
drivers/gpu/drm/xe/xe_ggtt.h +1 -0
index 5147930357de..f816b3c0732b 100644
@@ -23,6 +23,7 @@ int xe_ggtt_node_insert_locked(struct xe_ggtt *ggtt,
 			       u32 size, u32 align, u32 mm_flags);
 void xe_ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 			 bool invalidate);
+bool xe_ggtt_node_allocated(const struct xe_ggtt_node *node);
 void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +6 -6
index 3ca98f8a0eae..947750d97d7d 100644
@@ -235,7 +235,7 @@ static u32 encode_config_ggtt(u32 *cfg, const struct xe_gt_sriov_config *config)
 {
 	u32 n = 0;
 
-	if (drm_mm_node_allocated(&config->ggtt_region.base)) {
+	if (xe_ggtt_node_allocated(&config->ggtt_region)) {
 		cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_GGTT_START);
 		cfg[n++] = lower_32_bits(config->ggtt_region.base.start);
 		cfg[n++] = upper_32_bits(config->ggtt_region.base.start);
@@ -376,7 +376,7 @@ static void pf_release_ggtt(struct xe_tile *tile, struct xe_ggtt_node *node)
 {
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 
-	if (drm_mm_node_allocated(&node->base)) {
+	if (xe_ggtt_node_allocated(node)) {
 		/*
 		 * explicit GGTT PTE assignment to the PF using xe_ggtt_assign()
 		 * is redundant, as PTE will be implicitly re-assigned to PF by
@@ -406,14 +406,14 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 
 	size = round_up(size, alignment);
 
-	if (drm_mm_node_allocated(&node->base)) {
+	if (xe_ggtt_node_allocated(node)) {
 		err = pf_distribute_config_ggtt(tile, vfid, 0, 0);
 		if (unlikely(err))
 			return err;
 
 		pf_release_ggtt(tile, node);
 	}
-	xe_gt_assert(gt, !drm_mm_node_allocated(&node->base));
+	xe_gt_assert(gt, !xe_ggtt_node_allocated(node));
 
 	if (!size)
 		return 0;
@@ -439,7 +439,7 @@ static u64 pf_get_vf_config_ggtt(struct xe_gt *gt, unsigned int vfid)
 	struct xe_ggtt_node *node = &config->ggtt_region;
 
 	xe_gt_assert(gt, !xe_gt_is_media_type(gt));
-	return drm_mm_node_allocated(&node->base) ? node->base.size : 0;
+	return xe_ggtt_node_allocated(node) ? node->base.size : 0;
 }
 
 /**
@@ -2028,7 +2028,7 @@ int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p)
 
 	for (n = 1; n <= total_vfs; n++) {
 		config = &gt->sriov.pf.vfs[n].config;
-		if (!drm_mm_node_allocated(&config->ggtt_region.base))
+		if (!xe_ggtt_node_allocated(&config->ggtt_region))
 			continue;
 
 		string_get_size(config->ggtt_region.base.size, 1, STRING_UNITS_2, buf, sizeof(buf));
Signature · 1 line
2.46.0
author maintainer
#9 lore raw

PATCH 8/12 drm/xe: Introduce xe_ggtt_largest_hole

In reply to Rodrigo Vivi

Introduce a new xe_ggtt_largest_hole helper that attends the SRIOV demand and continue with the goal of limiting drm_mm access to xe_ggtt.

v2: Fix a typo (Michal)

Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/xe/xe_ggtt.c               | 35 ++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_ggtt.h               |  1 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 23 ++------------
 3 files changed, 38 insertions(+), 21 deletions(-)
drivers/gpu/drm/xe/xe_ggtt.c +35 -0
index 7c8bbaa30fca..2d055f489879 100644
@@ -584,6 +584,41 @@ void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo)
 			    bo->flags & XE_BO_FLAG_GGTT_INVALIDATE);
 }
 
+/**
+ * xe_ggtt_largest_hole - Largest GGTT hole
+ * @ggtt: the &xe_ggtt that will be inspected
+ * @alignment: minimum alignment
+ * @spare: If not NULL: in: desired memory size to be spared / out: Adjusted possible spare
+ *
+ * Return: size of the largest continuous GGTT region
+ */
+u64 xe_ggtt_largest_hole(struct xe_ggtt *ggtt, u64 alignment, u64 *spare)
+{
+	const struct drm_mm *mm = &ggtt->mm;
+	const struct drm_mm_node *entry;
+	u64 hole_min_start = xe_wopcm_size(tile_to_xe(ggtt->tile));
+	u64 hole_start, hole_end, hole_size;
+	u64 max_hole = 0;
+
+	mutex_lock(&ggtt->lock);
+
+	drm_mm_for_each_hole(entry, mm, hole_start, hole_end) {
+		hole_start = max(hole_start, hole_min_start);
+		hole_start = ALIGN(hole_start, alignment);
+		hole_end = ALIGN_DOWN(hole_end, alignment);
+		if (hole_start >= hole_end)
+			continue;
+		hole_size = hole_end - hole_start;
+		if (spare)
+			*spare -= min3(*spare, hole_size, max_hole);
+		max_hole = max(max_hole, hole_size);
+	}
+
+	mutex_unlock(&ggtt->lock);
+
+	return max_hole;
+}
+
 #ifdef CONFIG_PCI_IOV
 static u64 xe_encode_vfid_pte(u16 vfid)
 {
drivers/gpu/drm/xe/xe_ggtt.h +1 -0
index f816b3c0732b..31060fe7644b 100644
@@ -29,6 +29,7 @@ int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
 			 u64 start, u64 end);
 void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
+u64 xe_ggtt_largest_hole(struct xe_ggtt *ggtt, u64 alignment, u64 *spare);
 
 int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p);
 
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +2 -21
index 947750d97d7d..1852ff45bea4 100644
@@ -590,30 +590,11 @@ int xe_gt_sriov_pf_config_bulk_set_ggtt(struct xe_gt *gt, unsigned int vfid,
 static u64 pf_get_max_ggtt(struct xe_gt *gt)
 {
 	struct xe_ggtt *ggtt = gt_to_tile(gt)->mem.ggtt;
-	const struct drm_mm *mm = &ggtt->mm;
-	const struct drm_mm_node *entry;
 	u64 alignment = pf_get_ggtt_alignment(gt);
 	u64 spare = pf_get_spare_ggtt(gt);
-	u64 hole_min_start = xe_wopcm_size(gt_to_xe(gt));
-	u64 hole_start, hole_end, hole_size;
-	u64 max_hole = 0;
-
-	mutex_lock(&ggtt->lock);
-
-	drm_mm_for_each_hole(entry, mm, hole_start, hole_end) {
-		hole_start = max(hole_start, hole_min_start);
-		hole_start = ALIGN(hole_start, alignment);
-		hole_end = ALIGN_DOWN(hole_end, alignment);
-		if (hole_start >= hole_end)
-			continue;
-		hole_size = hole_end - hole_start;
-		xe_gt_sriov_dbg_verbose(gt, "HOLE start %llx size %lluK\n",
-					hole_start, hole_size / SZ_1K);
-		spare -= min3(spare, hole_size, max_hole);
-		max_hole = max(max_hole, hole_size);
-	}
+	u64 max_hole;
 
-	mutex_unlock(&ggtt->lock);
+	max_hole = xe_ggtt_largest_hole(ggtt, alignment, &spare);
 
 	xe_gt_sriov_dbg_verbose(gt, "HOLE max %lluK reserved %lluK\n",
 				max_hole / SZ_1K, spare / SZ_1K);
Signature · 1 line
2.46.0
author maintainer
#10 lore raw

PATCH 9/12 drm/xe: Introduce xe_ggtt_print_holes

In reply to Rodrigo Vivi

Introduce a new xe_ggtt_print_holes helper that attends the SRIOV demand and finishes the goal of limiting drm_mm access to xe_ggtt.

---
 drivers/gpu/drm/xe/xe_ggtt.c               | 40 ++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_ggtt.h               |  1 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 25 +-------------
 3 files changed, 42 insertions(+), 24 deletions(-)
drivers/gpu/drm/xe/xe_ggtt.c +40 -0
index 2d055f489879..960f5a28b7ed 100644
@@ -682,3 +682,43 @@ int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p)
 	mutex_unlock(&ggtt->lock);
 	return err;
 }
+
+/**
+ * xe_ggtt_print_holes - Print holes
+ * @ggtt: the &xe_ggtt to be inspected
+ * @alignment: min alignment
+ * @p: the &drm_printer
+ *
+ * Print GGTT ranges that are available and return total size available.
+ *
+ * Return: Total available size.
+ */
+u64 xe_ggtt_print_holes(struct xe_ggtt *ggtt, u64 alignment, struct drm_printer *p)
+{
+	const struct drm_mm *mm = &ggtt->mm;
+	const struct drm_mm_node *entry;
+	u64 hole_min_start = xe_wopcm_size(tile_to_xe(ggtt->tile));
+	u64 hole_start, hole_end, hole_size;
+	u64 total;
+	char buf[10];
+
+	mutex_lock(&ggtt->lock);
+
+	drm_mm_for_each_hole(entry, mm, hole_start, hole_end) {
+		hole_start = max(hole_start, hole_min_start);
+		hole_start = ALIGN(hole_start, alignment);
+		hole_end = ALIGN_DOWN(hole_end, alignment);
+		if (hole_start >= hole_end)
+			continue;
+		hole_size = hole_end - hole_start;
+		total += hole_size;
+
+		string_get_size(hole_size, 1, STRING_UNITS_2, buf, sizeof(buf));
+		drm_printf(p, "range:\t%#llx-%#llx\t(%s)\n",
+			   hole_start, hole_end - 1, buf);
+	}
+
+	mutex_unlock(&ggtt->lock);
+
+	return total;
+}
drivers/gpu/drm/xe/xe_ggtt.h +1 -0
index 31060fe7644b..67ae5f1602a3 100644
@@ -32,6 +32,7 @@ void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
 u64 xe_ggtt_largest_hole(struct xe_ggtt *ggtt, u64 alignment, u64 *spare);
 
 int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p);
+u64 xe_ggtt_print_holes(struct xe_ggtt *ggtt, u64 alignment, struct drm_printer *p);
 
 #ifdef CONFIG_PCI_IOV
 void xe_ggtt_assign(struct xe_ggtt *ggtt, const struct xe_ggtt_node *node, u16 vfid);
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +1 -24
index 1852ff45bea4..e133594cc6bd 100644
@@ -6,9 +6,6 @@
 #include <linux/string_choices.h>
 #include <linux/wordpart.h>
 
-/* FIXME: remove this after encapsulating all drm_mm_node access into xe_ggtt */
-#include <drm/drm_mm.h>
-
 #include "abi/guc_actions_sriov_abi.h"
 #include "abi/guc_klvs_abi.h"
 
@@ -2103,11 +2100,7 @@ int xe_gt_sriov_pf_config_print_dbs(struct xe_gt *gt, struct drm_printer *p)
 int xe_gt_sriov_pf_config_print_available_ggtt(struct xe_gt *gt, struct drm_printer *p)
 {
 	struct xe_ggtt *ggtt = gt_to_tile(gt)->mem.ggtt;
-	const struct drm_mm *mm = &ggtt->mm;
-	const struct drm_mm_node *entry;
 	u64 alignment = pf_get_ggtt_alignment(gt);
-	u64 hole_min_start = xe_wopcm_size(gt_to_xe(gt));
-	u64 hole_start, hole_end, hole_size;
 	u64 spare, avail, total = 0;
 	char buf[10];
 
@@ -2116,24 +2109,8 @@ int xe_gt_sriov_pf_config_print_available_ggtt(struct xe_gt *gt, struct drm_prin
 	mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
 
 	spare = pf_get_spare_ggtt(gt);
+	total = xe_ggtt_print_holes(ggtt, alignment, p);
 
-	mutex_lock(&ggtt->lock);
-
-	drm_mm_for_each_hole(entry, mm, hole_start, hole_end) {
-		hole_start = max(hole_start, hole_min_start);
-		hole_start = ALIGN(hole_start, alignment);
-		hole_end = ALIGN_DOWN(hole_end, alignment);
-		if (hole_start >= hole_end)
-			continue;
-		hole_size = hole_end - hole_start;
-		total += hole_size;
-
-		string_get_size(hole_size, 1, STRING_UNITS_2, buf, sizeof(buf));
-		drm_printf(p, "range:\t%#llx-%#llx\t(%s)\n",
-			   hole_start, hole_end - 1, buf);
-	}
-
-	mutex_unlock(&ggtt->lock);
 	mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
 
 	string_get_size(total, 1, STRING_UNITS_2, buf, sizeof(buf));
Signature · 1 line
2.46.0
author maintainer
#11 lore raw

PATCH 10/12 drm/xe: Rename xe_ggtt balloon functions to make the node clear

In reply to Rodrigo Vivi

These operations are related to node. Convert them to the new appropriate name space xe_ggtt_node.

Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/xe/xe_ggtt.c        | 12 ++++++------
 drivers/gpu/drm/xe/xe_ggtt.h        |  4 ++--
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 10 +++++-----
 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/gpu/drm/xe/xe_ggtt.c +6 -6
index 960f5a28b7ed..05c3e6e929ae 100644
@@ -347,17 +347,17 @@ static void xe_ggtt_dump_node(struct xe_ggtt *ggtt,
 }
 
 /**
- * xe_ggtt_balloon - prevent allocation of specified GGTT addresses
+ * xe_ggtt_node_balloon - prevent allocation of specified GGTT addresses
  * @ggtt: the &xe_ggtt where we want to make reservation
  * @start: the starting GGTT address of the reserved region
  * @end: then end GGTT address of the reserved region
  * @node: the &xe_ggtt_node to hold reserved GGTT node
  *
- * Use xe_ggtt_deballoon() to release a reserved GGTT node.
+ * Use xe_ggtt_node_deballoon() to release a reserved GGTT node.
  *
  * Return: 0 on success or a negative error code on failure.
  */
-int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_node *node)
+int xe_ggtt_node_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_node *node)
 {
 	int err;
 
@@ -384,13 +384,13 @@ int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_nod
 }
 
 /**
- * xe_ggtt_deballoon - release a reserved GGTT region
+ * xe_ggtt_node_deballoon - release a reserved GGTT region
  * @ggtt: the &xe_ggtt where reserved node belongs
  * @node: the &xe_ggtt_node with reserved GGTT region
  *
- * See xe_ggtt_balloon() for details.
+ * See xe_ggtt_node_balloon() for details.
  */
-void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node)
+void xe_ggtt_node_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node)
 {
 	if (!drm_mm_node_allocated(&node->base))
 		return;
drivers/gpu/drm/xe/xe_ggtt.h +2 -2
index 67ae5f1602a3..e68cede2e6b5 100644
@@ -13,8 +13,8 @@ struct drm_printer;
 int xe_ggtt_init_early(struct xe_ggtt *ggtt);
 int xe_ggtt_init(struct xe_ggtt *ggtt);
 
-int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
-void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
+int xe_ggtt_node_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
+void xe_ggtt_node_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
 
 int xe_ggtt_node_insert(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
 			u32 size, u32 align);
drivers/gpu/drm/xe/xe_gt_sriov_vf.c +5 -5
index 47222bd9988d..9a1be23ae71d 100644
@@ -528,7 +528,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	start = xe_wopcm_size(xe);
 	end = config->ggtt_base;
 	if (end != start) {
-		err = xe_ggtt_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[0]);
+		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[0]);
 		if (err)
 			goto failed;
 	}
@@ -536,7 +536,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	start = config->ggtt_base + config->ggtt_size;
 	end = GUC_GGTT_TOP;
 	if (end != start) {
-		err = xe_ggtt_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[1]);
+		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[1]);
 		if (err)
 			goto deballoon;
 	}
@@ -544,7 +544,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	return 0;
 
 deballoon:
-	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
+	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
 failed:
 	return err;
 }
@@ -555,8 +555,8 @@ static void deballoon_ggtt(struct drm_device *drm, void *arg)
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 
 	xe_tile_assert(tile, IS_SRIOV_VF(tile_to_xe(tile)));
-	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[1]);
-	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
+	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[1]);
+	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
 }
 
 /**
Signature · 1 line
2.46.0
author maintainer
#12 lore raw

PATCH 11/12 drm/xe: Make xe_ggtt_node struct independent

In reply to Rodrigo Vivi

In some rare cases, the drm_mm node cannot be removed synchronously due to runtime PM conditions. In this situation, the node removal will be delegated to a workqueue that will be able to wake up the device before removing the node.

However, in this situation, the lifetime of the xe_ggtt_node cannot be restricted to the lifetime of the parent object. So, this patch introduces the infrastructure so the xe_ggtt_node struct can be allocated in advance and freed when needed.

By having the ggtt backpointer, it also ensure that the init function is always called before any attempt to insert or reserve the node in the GGTT.

v2: s/xe_ggtt_node_force_fini/xe_ggtt_node_fini and use it
internaly (Brost)

Cc Matthew Auld <[email protected]>
Cc Michal Wajdeczko <[email protected]>
Cc Matthew Brost <[email protected]>
---
 .../gpu/drm/xe/compat-i915-headers/i915_vma.h |   4 +-
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |  36 ++++--
 drivers/gpu/drm/xe/xe_bo.c                    |   2 +-
 drivers/gpu/drm/xe/xe_bo.h                    |   9 +-
 drivers/gpu/drm/xe/xe_bo_types.h              |   2 +-
 drivers/gpu/drm/xe/xe_device_types.h          |   2 +-
 drivers/gpu/drm/xe/xe_ggtt.c                  | 103 ++++++++++++++++--
 drivers/gpu/drm/xe/xe_ggtt.h                  |   2 +
 drivers/gpu/drm/xe/xe_ggtt_types.h            |   8 +-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    |  34 +++---
 .../gpu/drm/xe/xe_gt_sriov_pf_config_types.h  |   2 +-
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c           |  26 ++++-
 12 files changed, 181 insertions(+), 49 deletions(-)
drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h +2 -2
index 3028ac1ba72f..bdae8392e125 100644
@@ -20,7 +20,7 @@ struct xe_bo;
 
 struct i915_vma {
 	struct xe_bo *bo, *dpt;
-	struct xe_ggtt_node node;
+	struct xe_ggtt_node *node;
 };
 
 #define i915_ggtt_clear_scanout(bo) do { } while (0)
@@ -29,7 +29,7 @@ struct i915_vma {
 
 static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
 {
-	return vma->node.base.start;
+	return vma->node->base.start;
 }
 
 #endif
drivers/gpu/drm/xe/display/xe_fb_pin.c +26 -10
index de4930b67a29..087e553d9c65 100644
@@ -204,20 +204,28 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 	if (xe_bo_is_vram(bo) && ggtt->flags & XE_GGTT_FLAGS_64K)
 		align = max_t(u32, align, SZ_64K);
 
-	if (bo->ggtt_node.base.size && view->type == I915_GTT_VIEW_NORMAL) {
+	if (bo->ggtt_node && view->type == I915_GTT_VIEW_NORMAL) {
 		vma->node = bo->ggtt_node;
 	} else if (view->type == I915_GTT_VIEW_NORMAL) {
 		u32 x, size = bo->ttm.base.size;
 
-		ret = xe_ggtt_node_insert_locked(ggtt, &vma->node, size, align, 0);
-		if (ret)
+		vma->node = xe_ggtt_node_init(ggtt);
+		if (IS_ERR(vma->node)) {
+			ret = PTR_ERR(vma->node);
 			goto out_unlock;
+		}
+
+		ret = xe_ggtt_node_insert_locked(ggtt, vma->node, size, align, 0);
+		if (ret) {
+			xe_ggtt_node_fini(vma->node);
+			goto out_unlock;
+		}
 
 		for (x = 0; x < size; x += XE_PAGE_SIZE) {
 			u64 pte = ggtt->pt_ops->pte_encode_bo(bo, x,
 							      xe->pat.idx[XE_CACHE_NONE]);
 
-			ggtt->pt_ops->ggtt_set_pte(ggtt, vma->node.base.start + x, pte);
+			ggtt->pt_ops->ggtt_set_pte(ggtt, vma->node->base.start + x, pte);
 		}
 	} else {
 		u32 i, ggtt_ofs;
@@ -226,11 +234,19 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
 		/* display seems to use tiles instead of bytes here, so convert it back.. */
 		u32 size = intel_rotation_info_size(rot_info) * XE_PAGE_SIZE;
 
-		ret = xe_ggtt_node_insert_locked(ggtt, &vma->node, size, align, 0);
-		if (ret)
+		vma->node = xe_ggtt_node_init(ggtt);
+		if (IS_ERR(vma->node)) {
+			ret = PTR_ERR(vma->node);
 			goto out_unlock;
+		}
+
+		ret = xe_ggtt_node_insert_locked(ggtt, vma->node, size, align, 0);
+		if (ret) {
+			xe_ggtt_node_fini(vma->node);
+			goto out_unlock;
+		}
 
-		ggtt_ofs = vma->node.base.start;
+		ggtt_ofs = vma->node->base.start;
 
 		for (i = 0; i < ARRAY_SIZE(rot_info->plane); i++)
 			write_ggtt_rotated(bo, ggtt, &ggtt_ofs,
@@ -323,9 +339,9 @@ static void __xe_unpin_fb_vma(struct i915_vma *vma)
 
 	if (vma->dpt)
 		xe_bo_unpin_map_no_vm(vma->dpt);
-	else if (!xe_ggtt_node_allocated(&vma->bo->ggtt_node) ||
-		 vma->bo->ggtt_node.base.start != vma->node.base.start)
-		xe_ggtt_node_remove(ggtt, &vma->node, false);
+	else if (!xe_ggtt_node_allocated(vma->bo->ggtt_node) ||
+		 vma->bo->ggtt_node->base.start != vma->node->base.start)
+		xe_ggtt_node_remove(ggtt, vma->node, false);
 
 	ttm_bo_reserve(&vma->bo->ttm, false, false, NULL);
 	ttm_bo_unpin(&vma->bo->ttm);
drivers/gpu/drm/xe/xe_bo.c +1 -1
index 74c850777246..c4261527b1c7 100644
@@ -1098,7 +1098,7 @@ static void xe_ttm_bo_destroy(struct ttm_buffer_object *ttm_bo)
 
 	xe_assert(xe, list_empty(&ttm_bo->base.gpuva.list));
 
-	if (bo->ggtt_node.base.size)
+	if (bo->ggtt_node)
 		xe_ggtt_remove_bo(bo->tile->mem.ggtt, bo);
 
 #ifdef CONFIG_PROC_FS
drivers/gpu/drm/xe/xe_bo.h +6 -3
index faffbda55517..f588e3a98105 100644
@@ -195,9 +195,12 @@ xe_bo_main_addr(struct xe_bo *bo, size_t page_size)
 static inline u32
 xe_bo_ggtt_addr(struct xe_bo *bo)
 {
-	XE_WARN_ON(bo->ggtt_node.base.size > bo->size);
-	XE_WARN_ON(bo->ggtt_node.base.start + bo->ggtt_node.base.size > (1ull << 32));
-	return bo->ggtt_node.base.start;
+	if (XE_WARN_ON(!bo->ggtt_node))
+		return -ENOENT;
+
+	XE_WARN_ON(bo->ggtt_node->base.size > bo->size);
+	XE_WARN_ON(bo->ggtt_node->base.start + bo->ggtt_node->base.size > (1ull << 32));
+	return bo->ggtt_node->base.start;
 }
 
 int xe_bo_vmap(struct xe_bo *bo);
drivers/gpu/drm/xe/xe_bo_types.h +1 -1
index 4b1de9f5be00..2ed558ac2264 100644
@@ -40,7 +40,7 @@ struct xe_bo {
 	/** @placement: current placement for this BO */
 	struct ttm_placement placement;
 	/** @ggtt_node: GGTT node if this BO is mapped in the GGTT */
-	struct xe_ggtt_node ggtt_node;
+	struct xe_ggtt_node *ggtt_node;
 	/** @vmap: iosys map of this buffer */
 	struct iosys_map vmap;
 	/** @ttm_kmap: TTM bo kmap object for internal use only. Keep off. */
drivers/gpu/drm/xe/xe_device_types.h +1 -1
index d2b3d8a0c1bd..06fcb92568c7 100644
@@ -204,7 +204,7 @@ struct xe_tile {
 			struct xe_memirq memirq;
 
 			/** @sriov.vf.ggtt_balloon: GGTT regions excluded from use. */
-			struct xe_ggtt_node ggtt_balloon[2];
+			struct xe_ggtt_node *ggtt_balloon[2];
 		} vf;
 	} sriov;
 
drivers/gpu/drm/xe/xe_ggtt.c +92 -11

223 lines not on this page · raw message

drivers/gpu/drm/xe/xe_ggtt.h +2 -0
index e68cede2e6b5..0e6f8c396ae1 100644
@@ -13,6 +13,8 @@ struct drm_printer;
 int xe_ggtt_init_early(struct xe_ggtt *ggtt);
 int xe_ggtt_init(struct xe_ggtt *ggtt);
 
+struct xe_ggtt_node *xe_ggtt_node_init(struct xe_ggtt *ggtt);
+void xe_ggtt_node_fini(struct xe_ggtt_node *node);
 int xe_ggtt_node_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
 void xe_ggtt_node_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
 
drivers/gpu/drm/xe/xe_ggtt_types.h +7 -1
index af312a7d1031..0e8822ae13fc 100644
@@ -50,9 +50,15 @@ struct xe_ggtt {
 };
 
 /**
- * struct xe_ggtt_node - A node in GGTT
+ * struct xe_ggtt_node - A node in GGTT.
+ *
+ * This struct needs to be initialized (only-once) with xe_ggtt_node_init() before any node
+ * insertion, reservation, or 'ballooning'.
+ * It will, then, be finalized by either xe_ggtt_node_remove() or xe_ggtt_node_deballoon().
  */
 struct xe_ggtt_node {
+	/** @ggtt: Back pointer to xe_ggtt where this region will be inserted at */
+	struct xe_ggtt *ggtt;
 	/** @base: A drm_mm_node */
 	struct drm_mm_node base;
 };
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +21 -13
index e133594cc6bd..c617cdc1e4db 100644
@@ -232,14 +232,14 @@ static u32 encode_config_ggtt(u32 *cfg, const struct xe_gt_sriov_config *config)
 {
 	u32 n = 0;
 
-	if (xe_ggtt_node_allocated(&config->ggtt_region)) {
+	if (xe_ggtt_node_allocated(config->ggtt_region)) {
 		cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_GGTT_START);
-		cfg[n++] = lower_32_bits(config->ggtt_region.base.start);
-		cfg[n++] = upper_32_bits(config->ggtt_region.base.start);
+		cfg[n++] = lower_32_bits(config->ggtt_region->base.start);
+		cfg[n++] = upper_32_bits(config->ggtt_region->base.start);
 
 		cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_GGTT_SIZE);
-		cfg[n++] = lower_32_bits(config->ggtt_region.base.size);
-		cfg[n++] = upper_32_bits(config->ggtt_region.base.size);
+		cfg[n++] = lower_32_bits(config->ggtt_region->base.size);
+		cfg[n++] = upper_32_bits(config->ggtt_region->base.size);
 	}
 
 	return n;
@@ -385,13 +385,13 @@ static void pf_release_ggtt(struct xe_tile *tile, struct xe_ggtt_node *node)
 
 static void pf_release_vf_config_ggtt(struct xe_gt *gt, struct xe_gt_sriov_config *config)
 {
-	pf_release_ggtt(gt_to_tile(gt), &config->ggtt_region);
+	pf_release_ggtt(gt_to_tile(gt), config->ggtt_region);
 }
 
 static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 {
 	struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
-	struct xe_ggtt_node *node = &config->ggtt_region;
+	struct xe_ggtt_node *node = config->ggtt_region;
 	struct xe_tile *tile = gt_to_tile(gt);
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 	u64 alignment = pf_get_ggtt_alignment(gt);
@@ -415,9 +415,15 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 	if (!size)
 		return 0;
 
+	node = xe_ggtt_node_init(ggtt);
+	if (IS_ERR(node))
+		return PTR_ERR(node);
+
 	err = xe_ggtt_node_insert(ggtt, node, size, alignment);
-	if (unlikely(err))
+	if (unlikely(err)) {
+		xe_ggtt_node_fini(node);
 		return err;
+	}
 
 	xe_ggtt_assign(ggtt, node, vfid);
 	xe_gt_sriov_dbg_verbose(gt, "VF%u assigned GGTT %llx-%llx\n",
@@ -433,7 +439,7 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
 static u64 pf_get_vf_config_ggtt(struct xe_gt *gt, unsigned int vfid)
 {
 	struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
-	struct xe_ggtt_node *node = &config->ggtt_region;
+	struct xe_ggtt_node *node = config->ggtt_region;
 
 	xe_gt_assert(gt, !xe_gt_is_media_type(gt));
 	return xe_ggtt_node_allocated(node) ? node->base.size : 0;
@@ -2006,13 +2012,15 @@ int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p)
 
 	for (n = 1; n <= total_vfs; n++) {
 		config = &gt->sriov.pf.vfs[n].config;
-		if (!xe_ggtt_node_allocated(&config->ggtt_region))
+		if (!xe_ggtt_node_allocated(config->ggtt_region))
 			continue;
 
-		string_get_size(config->ggtt_region.base.size, 1, STRING_UNITS_2, buf, sizeof(buf));
+		string_get_size(config->ggtt_region->base.size, 1, STRING_UNITS_2,
+				buf, sizeof(buf));
 		drm_printf(p, "VF%u:\t%#0llx-%#llx\t(%s)\n",
-			   n, config->ggtt_region.base.start,
-			   config->ggtt_region.base.start + config->ggtt_region.base.size - 1, buf);
+			   n, config->ggtt_region->base.start,
+			   config->ggtt_region->base.start + config->ggtt_region->base.size - 1,
+			   buf);
 	}
 
 	return 0;
drivers/gpu/drm/xe/xe_gt_sriov_pf_config_types.h +1 -1
index a73d9a4b9e64..2d3b73d78f14 100644
@@ -18,7 +18,7 @@ struct xe_bo;
  */
 struct xe_gt_sriov_config {
 	/** @ggtt_region: GGTT region assigned to the VF. */
-	struct xe_ggtt_node ggtt_region;
+	struct xe_ggtt_node *ggtt_region;
 	/** @lmem_obj: LMEM allocation for use by the VF. */
 	struct xe_bo *lmem_obj;
 	/** @num_ctxs: number of GuC contexts IDs.  */
drivers/gpu/drm/xe/xe_gt_sriov_vf.c +21 -5
index 9a1be23ae71d..3d9f6a700564 100644
@@ -495,6 +495,22 @@ u64 xe_gt_sriov_vf_lmem(struct xe_gt *gt)
 	return gt->sriov.vf.self_config.lmem_size;
 }
 
+static int vf_balloon_ggtt_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+				u64 start, u64 end)
+{
+	int err;
+
+	node = xe_ggtt_node_init(ggtt);
+	if (IS_ERR(node))
+		return PTR_ERR(node);
+
+	err = xe_ggtt_node_balloon(ggtt, start, end, node);
+	if (err)
+		xe_ggtt_node_fini(node);
+
+	return err;
+}
+
 static int vf_balloon_ggtt(struct xe_gt *gt)
 {
 	struct xe_gt_sriov_vf_selfconfig *config = &gt->sriov.vf.self_config;
@@ -528,7 +544,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	start = xe_wopcm_size(xe);
 	end = config->ggtt_base;
 	if (end != start) {
-		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[0]);
+		err = vf_balloon_ggtt_node(ggtt, tile->sriov.vf.ggtt_balloon[0], start, end);
 		if (err)
 			goto failed;
 	}
@@ -536,7 +552,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	start = config->ggtt_base + config->ggtt_size;
 	end = GUC_GGTT_TOP;
 	if (end != start) {
-		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[1]);
+		err = vf_balloon_ggtt_node(ggtt, tile->sriov.vf.ggtt_balloon[1], start, end);
 		if (err)
 			goto deballoon;
 	}
@@ -544,7 +560,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
 	return 0;
 
 deballoon:
-	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
+	xe_ggtt_node_deballoon(ggtt, tile->sriov.vf.ggtt_balloon[0]);
 failed:
 	return err;
 }
@@ -555,8 +571,8 @@ static void deballoon_ggtt(struct drm_device *drm, void *arg)
 	struct xe_ggtt *ggtt = tile->mem.ggtt;
 
 	xe_tile_assert(tile, IS_SRIOV_VF(tile_to_xe(tile)));
-	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[1]);
-	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
+	xe_ggtt_node_deballoon(ggtt, tile->sriov.vf.ggtt_balloon[1]);
+	xe_ggtt_node_deballoon(ggtt, tile->sriov.vf.ggtt_balloon[0]);
 }
 
 /**
Signature · 1 line
2.46.0
author maintainer
#13 lore raw

PATCH 12/12 drm/xe: Fix missing runtime outer protection for ggtt_remove_node

In reply to Rodrigo Vivi

Defer the ggtt node removal to a thread if runtime_pm is not active.

The ggtt node removal can be called from multiple places, including places where we cannot protect with outer callers and places we are within other locks. So, try to grab the runtime reference if the device is already active, otherwise defer the removal to a separate thread from where we are sure we can wake the device up.

v2: - use xe wq instead of system wq (Matt and CI)
- Avoid GFP_KERNEL to be future proof since this removal can be called from outside our drivers and we don't want to block if atomic is needed. (Brost)
v3: amend forgot chunk declaring xe_device.
v4: Use a xe_ggtt_region to encapsulate the node and remova info,
wihtout the need for any memory allocation at runtime.
v5: Actually fill the delayed_removal.invalidate (Brost)
v6: - Ensure that ggtt_region is not freed before work finishes (Auld)
- Own wq to ensures that the queued works are flushed before ggtt_fini (Brost)
v7: also free ggtt_region on early !bound return (Auld)
v8: Address the null deref (CI)
v9: Based on the new xe_ggtt_node for the proper care of the lifetime
of the object.
v10: Redo the lost v5 change. (Brost)

Cc Matthew Auld <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Francois Dugast <[email protected]>
Cc Thomas Hellström <[email protected]>
Cc Matthew Brost <[email protected]>
---
 drivers/gpu/drm/xe/xe_ggtt.c       | 107 ++++++++++++++++++-----------
 drivers/gpu/drm/xe/xe_ggtt_types.h |  12 ++++
 2 files changed, 79 insertions(+), 40 deletions(-)
drivers/gpu/drm/xe/xe_ggtt.c +67 -40
index 5c04c1bc8417..110acf828974 100644
@@ -161,6 +161,7 @@ static void ggtt_fini_early(struct drm_device *drm, void *arg)
 {
 	struct xe_ggtt *ggtt = arg;
 
+	destroy_workqueue(ggtt->wq);
 	mutex_destroy(&ggtt->lock);
 	drm_mm_takedown(&ggtt->mm);
 }
@@ -242,6 +243,8 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
 	else
 		ggtt->pt_ops = &xelp_pt_ops;
 
+	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, 0);
+
 	drm_mm_init(&ggtt->mm, xe_wopcm_size(xe),
 		    ggtt->size - xe_wopcm_size(xe));
 	mutex_init(&ggtt->lock);
@@ -276,6 +279,68 @@ static void xe_ggtt_initial_clear(struct xe_ggtt *ggtt)
 	mutex_unlock(&ggtt->lock);
 }
 
+static void ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+			     bool invalidate)
+{
+	struct xe_device *xe = tile_to_xe(ggtt->tile);
+	bool bound;
+	int idx;
+
+	if (!node || !node->ggtt)
+		return;
+
+	bound = drm_dev_enter(&xe->drm, &idx);
+
+	mutex_lock(&ggtt->lock);
+	if (bound)
+		xe_ggtt_clear(ggtt, node->base.start, node->base.size);
+	drm_mm_remove_node(&node->base);
+	node->base.size = 0;
+	mutex_unlock(&ggtt->lock);
+
+	if (!bound)
+		goto free_node;
+
+	if (invalidate)
+		xe_ggtt_invalidate(ggtt);
+
+	drm_dev_exit(idx);
+
+free_node:
+	xe_ggtt_node_fini(node);
+}
+
+static void ggtt_node_remove_work_func(struct work_struct *work)
+{
+	struct xe_ggtt_node *node = container_of(work, typeof(*node),
+						 delayed_removal.work);
+	struct xe_device *xe = tile_to_xe(node->ggtt->tile);
+
+	xe_pm_runtime_get(xe);
+	ggtt_node_remove(node->ggtt, node, node->delayed_removal.invalidate);
+	xe_pm_runtime_put(xe);
+}
+
+/**
+ * xe_ggtt_node_remove - Remove a &xe_ggtt_node from the GGTT
+ * @ggtt: the &xe_ggtt where node will be removed
+ * @node: the &xe_ggtt_node to be removed
+ * @invalidate: if node needs invalidation upon removal
+ */
+void xe_ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+			 bool invalidate)
+{
+	struct xe_device *xe = tile_to_xe(ggtt->tile);
+
+	if (xe_pm_runtime_get_if_active(xe)) {
+		ggtt_node_remove(ggtt, node, invalidate);
+		xe_pm_runtime_put(xe);
+	} else {
+		node->delayed_removal.invalidate = invalidate;
+		queue_work(ggtt->wq, &node->delayed_removal.work);
+	}
+}
+
 /**
  * xe_ggtt_init - Regular non-early GGTT initialization
  * @ggtt: the &xe_ggtt to be initialized
@@ -482,7 +547,9 @@ struct xe_ggtt_node *xe_ggtt_node_init(struct xe_ggtt *ggtt)
 	if (!node)
 		return ERR_PTR(-ENOMEM);
 
+	INIT_WORK(&node->delayed_removal.work, ggtt_node_remove_work_func);
 	node->ggtt = ggtt;
+
 	return node;
 }
 
@@ -499,46 +566,6 @@ void xe_ggtt_node_fini(struct xe_ggtt_node *node)
 	kfree(node);
 }
 
-/**
- * xe_ggtt_node_remove - Remove a &xe_ggtt_node from the GGTT
- * @ggtt: the &xe_ggtt where node will be removed
- * @node: the &xe_ggtt_node to be removed
- * @invalidate: if node needs invalidation upon removal
- */
-void xe_ggtt_node_remove(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
-			 bool invalidate)
-{
-	struct xe_device *xe = tile_to_xe(ggtt->tile);
-	bool bound;
-	int idx;
-
-	if (!node || !node->ggtt)
-		return;
-
-	bound = drm_dev_enter(&xe->drm, &idx);
-	if (bound)
-		xe_pm_runtime_get_noresume(xe);
-
-	mutex_lock(&ggtt->lock);
-	if (bound)
-		xe_ggtt_clear(ggtt, node->base.start, node->base.size);
-	drm_mm_remove_node(&node->base);
-	node->base.size = 0;
-	mutex_unlock(&ggtt->lock);
-
-	if (!bound)
-		goto free_node;
-
-	if (invalidate)
-		xe_ggtt_invalidate(ggtt);
-
-	xe_pm_runtime_put(xe);
-	drm_dev_exit(idx);
-
-free_node:
-	xe_ggtt_node_fini(node);
-}
-
 /**
  * xe_ggtt_node_allocated - Check if node is allocated in GGTT
  * @node: the &xe_ggtt_node to be inspected
drivers/gpu/drm/xe/xe_ggtt_types.h +12 -0
index 0e8822ae13fc..8b83610c6ee6 100644
@@ -47,6 +47,8 @@ struct xe_ggtt {
 	struct drm_mm mm;
 	/** @access_count: counts GGTT writes */
 	unsigned int access_count;
+	/** @wq: Dedicated unordered work queue to process node removals */
+	struct workqueue_struct *wq;
 };
 
 /**
@@ -61,6 +63,16 @@ struct xe_ggtt_node {
 	struct xe_ggtt *ggtt;
 	/** @base: A drm_mm_node */
 	struct drm_mm_node base;
+	/**
+	 * @delayed_removal: Information for removal through work thread when
+	 * device runtime_pm is suspended
+	 */
+	struct {
+		/** @delayed_removal.work: The work struct for the delayed removal */
+		struct work_struct work;
+		/** @delayed_removal.invalidate: If it needs invalidation upon removal */
+		bool invalidate;
+	} delayed_removal;
 };
 
 /**
Signature · 1 line
2.46.0
#14 lore raw

✓ CI.Patch_applied: success for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk
URL : https://patchwork.freedesktop.org/series/137360/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 04b7aff6fa1b drm-tip: 2024y-08m-15d-20h-12m-22s UTC integration manifest === git am output follows ===
Applying: drm/xe: Removed unused xe_ggtt_printk
Applying: drm/xe: Introduce GGTT documentation
Applying: drm/xe: Remove unnecessary drm_mm.h includes
Applying: drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt
Applying: drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node
Applying: drm/xe: Rename xe_ggtt_node related functions
Applying: drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node
Applying: drm/xe: Introduce xe_ggtt_largest_hole
Applying: drm/xe: Introduce xe_ggtt_print_holes
Applying: drm/xe: Rename xe_ggtt balloon functions to make the node clear
Applying: drm/xe: Make xe_ggtt_node struct independent
Applying: drm/xe: Fix missing runtime outer protection for ggtt_remove_node

#15 lore raw

✓ CI.checkpatch: success for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk
URL : https://patchwork.freedesktop.org/series/137360/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 9fe5037901cabbcdf27a6fe0dfb047ca1474d363
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit feb37d5be43f59720c5722a934605d8564dfe112

Author: Rodrigo Vivi <[email protected]>
Date:   Thu Aug 15 18:07:32 2024 -0400

drm/xe: Fix missing runtime outer protection for ggtt_remove_node

Defer the ggtt node removal to a thread if runtime_pm is not active.

The ggtt node removal can be called from multiple places, including places where we cannot protect with outer callers and places we are within other locks. So, try to grab the runtime reference if the device is already active, otherwise defer the removal to a separate thread from where we are sure we can wake the device up.

v2: - use xe wq instead of system wq (Matt and CI)
- Avoid GFP_KERNEL to be future proof since this removal can be called from outside our drivers and we don't want to block if atomic is needed. (Brost)
v3: amend forgot chunk declaring xe_device.
v4: Use a xe_ggtt_region to encapsulate the node and remova info,
wihtout the need for any memory allocation at runtime.
v5: Actually fill the delayed_removal.invalidate (Brost)
v6: - Ensure that ggtt_region is not freed before work finishes (Auld)
- Own wq to ensures that the queued works are flushed before ggtt_fini (Brost)
v7: also free ggtt_region on early !bound return (Auld)
v8: Address the null deref (CI)
v9: Based on the new xe_ggtt_node for the proper care of the lifetime
of the object.
v10: Redo the lost v5 change. (Brost)

Cc Matthew Auld <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Francois Dugast <[email protected]>
Cc Thomas Hellström <[email protected]>
Cc Matthew Brost <[email protected]>

+ /mt/dim checkpatch 04b7aff6fa1bb7b6665e9e486aae4402cbc12e87 drm-intel 74800f73b109 drm/xe: Removed unused xe_ggtt_printk
4c47c4d2d1f4 drm/xe: Introduce GGTT documentation
7082a45acefc drm/xe: Remove unnecessary drm_mm.h includes dd3e3a996a16 drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt c6727bd3a367 drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node 80dcc304bcd2 drm/xe: Rename xe_ggtt_node related functions 11dbd157e9a7 drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node 002cfa30586f drm/xe: Introduce xe_ggtt_largest_hole
964a5e83ecac drm/xe: Introduce xe_ggtt_print_holes
b09110fd95a8 drm/xe: Rename xe_ggtt balloon functions to make the node clear 8ed6863954bb drm/xe: Make xe_ggtt_node struct independent feb37d5be43f drm/xe: Fix missing runtime outer protection for ggtt_remove_node

#16 lore raw

✓ CI.KUnit: success for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk
URL : https://patchwork.freedesktop.org/series/137360/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [22:21:47] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:21:51] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[22:22:17] Starting KUnit Kernel (1/1)...
[22:22:17] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:22:17] =================== guc_dbm (7 subtests) ===================
[22:22:17] [PASSED] test_empty
[22:22:17] [PASSED] test_default
[22:22:17] ======================== test_size  ========================
[22:22:17] [PASSED] 4
[22:22:17] [PASSED] 8
[22:22:17] [PASSED] 32
[22:22:17] [PASSED] 256
[22:22:17] ==================== [PASSED] test_size ====================
[22:22:17] ======================= test_reuse  ========================
[22:22:17] [PASSED] 4
[22:22:17] [PASSED] 8
[22:22:17] [PASSED] 32
[22:22:17] [PASSED] 256
[22:22:17] =================== [PASSED] test_reuse ====================
[22:22:17] =================== test_range_overlap  ====================
[22:22:17] [PASSED] 4
[22:22:17] [PASSED] 8
[22:22:17] [PASSED] 32
[22:22:17] [PASSED] 256
[22:22:17] =============== [PASSED] test_range_overlap ================
[22:22:17] =================== test_range_compact  ====================
[22:22:17] [PASSED] 4
[22:22:17] [PASSED] 8
[22:22:17] [PASSED] 32
[22:22:17] [PASSED] 256
[22:22:17] =============== [PASSED] test_range_compact ================
[22:22:17] ==================== test_range_spare  =====================
[22:22:17] [PASSED] 4
[22:22:17] [PASSED] 8
[22:22:17] [PASSED] 32
[22:22:17] [PASSED] 256
[22:22:17] ================ [PASSED] test_range_spare =================
[22:22:17] ===================== [PASSED] guc_dbm =====================
[22:22:17] =================== guc_idm (6 subtests) ===================
[22:22:17] [PASSED] bad_init
[22:22:17] [PASSED] no_init
[22:22:17] [PASSED] init_fini
[22:22:17] [PASSED] check_used
[22:22:17] [PASSED] check_quota
[22:22:17] [PASSED] check_all
[22:22:17] ===================== [PASSED] guc_idm =====================
[22:22:17] ================== no_relay (3 subtests) ===================
[22:22:17] [PASSED] xe_drops_guc2pf_if_not_ready
[22:22:17] [PASSED] xe_drops_guc2vf_if_not_ready
[22:22:17] [PASSED] xe_rejects_send_if_not_ready
[22:22:17] ==================== [PASSED] no_relay =====================
[22:22:17] ================== pf_relay (14 subtests) ==================
[22:22:17] [PASSED] pf_rejects_guc2pf_too_short
[22:22:17] [PASSED] pf_rejects_guc2pf_too_long
[22:22:17] [PASSED] pf_rejects_guc2pf_no_payload
[22:22:17] [PASSED] pf_fails_no_payload
[22:22:17] [PASSED] pf_fails_bad_origin
[22:22:17] [PASSED] pf_fails_bad_type
[22:22:17] [PASSED] pf_txn_reports_error
[22:22:17] [PASSED] pf_txn_sends_pf2guc
[22:22:17] [PASSED] pf_sends_pf2guc
[22:22:17] [SKIPPED] pf_loopback_nop
[22:22:17] [SKIPPED] pf_loopback_echo
[22:22:17] [SKIPPED] pf_loopback_fail
[22:22:17] [SKIPPED] pf_loopback_busy
[22:22:17] [SKIPPED] pf_loopback_retry
[22:22:17] ==================== [PASSED] pf_relay =====================
[22:22:17] ================== vf_relay (3 subtests) ===================
[22:22:17] [PASSED] vf_rejects_guc2vf_too_short
[22:22:17] [PASSED] vf_rejects_guc2vf_too_long
[22:22:17] [PASSED] vf_rejects_guc2vf_no_payload
[22:22:17] ==================== [PASSED] vf_relay =====================
[22:22:17] ================= pf_service (11 subtests) =================
[22:22:17] [PASSED] pf_negotiate_any
[22:22:17] [PASSED] pf_negotiate_base_match
[22:22:17] [PASSED] pf_negotiate_base_newer
[22:22:17] [PASSED] pf_negotiate_base_next
[22:22:17] [SKIPPED] pf_negotiate_base_older
[22:22:17] [PASSED] pf_negotiate_base_prev
[22:22:17] [PASSED] pf_negotiate_latest_match
[22:22:17] [PASSED] pf_negotiate_latest_newer
[22:22:17] [PASSED] pf_negotiate_latest_next
[22:22:17] [SKIPPED] pf_negotiate_latest_older
[22:22:17] [SKIPPED] pf_negotiate_latest_prev
[22:22:17] =================== [PASSED] pf_service ====================
[22:22:17] ===================== lmtt (1 subtest) =====================
[22:22:17] ======================== test_ops  =========================
[22:22:17] [PASSED] 2-level
[22:22:17] [PASSED] multi-level
[22:22:17] ==================== [PASSED] test_ops =====================
[22:22:17] ====================== [PASSED] lmtt =======================
[22:22:17] =================== xe_mocs (2 subtests) ===================
[22:22:17] ================ xe_live_mocs_kernel_kunit  ================
[22:22:17] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[22:22:17] ================ xe_live_mocs_reset_kunit  =================
[22:22:17] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[22:22:17] ==================== [SKIPPED] xe_mocs =====================
[22:22:17] ================= xe_migrate (2 subtests) ==================
[22:22:17] ================= xe_migrate_sanity_kunit  =================
[22:22:17] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[22:22:17] ================== xe_validate_ccs_kunit  ==================
[22:22:17] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[22:22:17] =================== [SKIPPED] xe_migrate ===================
[22:22:17] ================== xe_dma_buf (1 subtest) ==================
[22:22:17] ==================== xe_dma_buf_kunit  =====================
[22:22:17] ================ [SKIPPED] xe_dma_buf_kunit ================
[22:22:17] =================== [SKIPPED] xe_dma_buf ===================
[22:22:17] ==================== xe_bo (2 subtests) ====================
[22:22:17] ================== xe_ccs_migrate_kunit  ===================
[22:22:17] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[22:22:17] ==================== xe_bo_evict_kunit  ====================
[22:22:17] =============== [SKIPPED] xe_bo_evict_kunit ================
[22:22:17] ===================== [SKIPPED] xe_bo ======================
[22:22:17] ==================== args (11 subtests) ====================
[22:22:17] [PASSED] count_args_test
[22:22:17] [PASSED] call_args_example
[22:22:17] [PASSED] call_args_test
[22:22:17] [PASSED] drop_first_arg_example
[22:22:17] [PASSED] drop_first_arg_test
[22:22:17] [PASSED] first_arg_example
[22:22:17] [PASSED] first_arg_test
[22:22:17] [PASSED] last_arg_example
[22:22:17] [PASSED] last_arg_test
[22:22:17] [PASSED] pick_arg_example
[22:22:17] [PASSED] sep_comma_example
[22:22:17] ====================== [PASSED] args =======================
[22:22:17] =================== xe_pci (2 subtests) ====================
stty: 'standard input': Inappropriate ioctl for device
[22:22:17] [PASSED] xe_gmdid_graphics_ip
[22:22:17] [PASSED] xe_gmdid_media_ip
[22:22:17] ===================== [PASSED] xe_pci ======================
[22:22:17] =================== xe_rtp (2 subtests) ====================
[22:22:17] =============== xe_rtp_process_to_sr_tests  ================
[22:22:17] [PASSED] coalesce-same-reg
[22:22:17] [PASSED] no-match-no-add
[22:22:17] [PASSED] match-or
[22:22:17] [PASSED] match-or-xfail
[22:22:17] [PASSED] no-match-no-add-multiple-rules
[22:22:17] [PASSED] two-regs-two-entries
[22:22:17] [PASSED] clr-one-set-other
[22:22:17] [PASSED] set-field
[22:22:17] [PASSED] conflict-duplicate
[22:22:17] [PASSED] conflict-not-disjoint
[22:22:17] [PASSED] conflict-reg-type
[22:22:17] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[22:22:17] ================== xe_rtp_process_tests  ===================
[22:22:17] [PASSED] active1
[22:22:17] [PASSED] active2
[22:22:17] [PASSED] active-inactive
[22:22:17] [PASSED] inactive-active
[22:22:17] [PASSED] inactive-1st_or_active-inactive
[22:22:17] [PASSED] inactive-2nd_or_active-inactive
[22:22:17] [PASSED] inactive-last_or_active-inactive
[22:22:17] [PASSED] inactive-no_or_active-inactive
[22:22:17] ============== [PASSED] xe_rtp_process_tests ===============
[22:22:17] ===================== [PASSED] xe_rtp ======================
[22:22:17] ==================== xe_wa (1 subtest) =====================
[22:22:17] ======================== xe_wa_gt  =========================
[22:22:17] [PASSED] TIGERLAKE (B0)
[22:22:17] [PASSED] DG1 (A0)
[22:22:17] [PASSED] DG1 (B0)
[22:22:17] [PASSED] ALDERLAKE_S (A0)
[22:22:17] [PASSED] ALDERLAKE_S (B0)
[22:22:17] [PASSED] ALDERLAKE_S (C0)
[22:22:17] [PASSED] ALDERLAKE_S (D0)
[22:22:17] [PASSED] ALDERLAKE_P (A0)
[22:22:17] [PASSED] ALDERLAKE_P (B0)
[22:22:17] [PASSED] ALDERLAKE_P (C0)
[22:22:17] [PASSED] ALDERLAKE_S_RPLS (D0)
[22:22:17] [PASSED] ALDERLAKE_P_RPLU (E0)
[22:22:17] [PASSED] DG2_G10 (C0)
[22:22:17] [PASSED] DG2_G11 (B1)
[22:22:17] [PASSED] DG2_G12 (A1)
[22:22:17] [PASSED] METEORLAKE (g:A0, m:A0)
[22:22:17] [PASSED] METEORLAKE (g:A0, m:A0)
[22:22:17] [PASSED] METEORLAKE (g:A0, m:A0)
[22:22:17] [PASSED] LUNARLAKE (g:A0, m:A0)
[22:22:17] [PASSED] LUNARLAKE (g:B0, m:A0)
[22:22:17] [PASSED] BATTLEMAGE (g:A0, m:A1)
[22:22:17] ==================== [PASSED] xe_wa_gt =====================
[22:22:17] ====================== [PASSED] xe_wa ======================
[22:22:17] ============================================================
[22:22:17] Testing complete. Ran 121 tests: passed: 106, skipped: 15
[22:22:17] Elapsed time: 30.216s total, 4.145s configuring, 25.750s building, 0.305s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [22:22:18] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:22:19] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[22:22:41] Starting KUnit Kernel (1/1)...
[22:22:41] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:22:41] ============ drm_test_pick_cmdline (2 subtests) ============
[22:22:41] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[22:22:41] =============== drm_test_pick_cmdline_named  ===============
[22:22:41] [PASSED] NTSC
[22:22:41] [PASSED] NTSC-J
[22:22:41] [PASSED] PAL
[22:22:41] [PASSED] PAL-M
[22:22:41] =========== [PASSED] drm_test_pick_cmdline_named ===========
[22:22:41] ============== [PASSED] drm_test_pick_cmdline ==============
[22:22:41] ================== drm_buddy (7 subtests) ==================
[22:22:41] [PASSED] drm_test_buddy_alloc_limit
[22:22:41] [PASSED] drm_test_buddy_alloc_optimistic
[22:22:41] [PASSED] drm_test_buddy_alloc_pessimistic
[22:22:41] [PASSED] drm_test_buddy_alloc_pathological
[22:22:41] [PASSED] drm_test_buddy_alloc_contiguous
[22:22:41] [PASSED] drm_test_buddy_alloc_clear
[22:22:41] [PASSED] drm_test_buddy_alloc_range_bias
[22:22:41] ==================== [PASSED] drm_buddy ====================
[22:22:41] ============= drm_cmdline_parser (40 subtests) =============
[22:22:41] [PASSED] drm_test_cmdline_force_d_only
[22:22:41] [PASSED] drm_test_cmdline_force_D_only_dvi
[22:22:41] [PASSED] drm_test_cmdline_force_D_only_hdmi
[22:22:41] [PASSED] drm_test_cmdline_force_D_only_not_digital
[22:22:41] [PASSED] drm_test_cmdline_force_e_only
[22:22:41] [PASSED] drm_test_cmdline_res
[22:22:41] [PASSED] drm_test_cmdline_res_vesa
[22:22:41] [PASSED] drm_test_cmdline_res_vesa_rblank
[22:22:41] [PASSED] drm_test_cmdline_res_rblank
[22:22:41] [PASSED] drm_test_cmdline_res_bpp
[22:22:41] [PASSED] drm_test_cmdline_res_refresh
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[22:22:41] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[22:22:41] [PASSED] drm_test_cmdline_res_margins_force_on
[22:22:41] [PASSED] drm_test_cmdline_res_vesa_margins
[22:22:41] [PASSED] drm_test_cmdline_name
[22:22:41] [PASSED] drm_test_cmdline_name_bpp
[22:22:41] [PASSED] drm_test_cmdline_name_option
[22:22:41] [PASSED] drm_test_cmdline_name_bpp_option
[22:22:41] [PASSED] drm_test_cmdline_rotate_0
[22:22:41] [PASSED] drm_test_cmdline_rotate_90
[22:22:41] [PASSED] drm_test_cmdline_rotate_180
[22:22:41] [PASSED] drm_test_cmdline_rotate_270
[22:22:41] [PASSED] drm_test_cmdline_hmirror
[22:22:41] [PASSED] drm_test_cmdline_vmirror
[22:22:41] [PASSED] drm_test_cmdline_margin_options
[22:22:41] [PASSED] drm_test_cmdline_multiple_options
[22:22:41] [PASSED] drm_test_cmdline_bpp_extra_and_option
[22:22:41] [PASSED] drm_test_cmdline_extra_and_option
[22:22:41] [PASSED] drm_test_cmdline_freestanding_options
[22:22:41] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[22:22:41] [PASSED] drm_test_cmdline_panel_orientation
[22:22:41] ================ drm_test_cmdline_invalid  =================
[22:22:41] [PASSED] margin_only
[22:22:41] [PASSED] interlace_only
[22:22:41] [PASSED] res_missing_x
[22:22:41] [PASSED] res_missing_y
[22:22:41] [PASSED] res_bad_y
[22:22:41] [PASSED] res_missing_y_bpp
[22:22:41] [PASSED] res_bad_bpp
[22:22:41] [PASSED] res_bad_refresh
[22:22:41] [PASSED] res_bpp_refresh_force_on_off
[22:22:41] [PASSED] res_invalid_mode
[22:22:41] [PASSED] res_bpp_wrong_place_mode
[22:22:41] [PASSED] name_bpp_refresh
[22:22:41] [PASSED] name_refresh
[22:22:41] [PASSED] name_refresh_wrong_mode
[22:22:41] [PASSED] name_refresh_invalid_mode
[22:22:41] [PASSED] rotate_multiple
[22:22:41] [PASSED] rotate_invalid_val
[22:22:41] [PASSED] rotate_truncated
[22:22:41] [PASSED] invalid_option
[22:22:41] [PASSED] invalid_tv_option
[22:22:41] [PASSED] truncated_tv_option
[22:22:41] ============ [PASSED] drm_test_cmdline_invalid =============
[22:22:41] =============== drm_test_cmdline_tv_options  ===============
[22:22:41] [PASSED] NTSC
[22:22:41] [PASSED] NTSC_443
[22:22:41] [PASSED] NTSC_J
[22:22:41] [PASSED] PAL
[22:22:41] [PASSED] PAL_M
[22:22:41] [PASSED] PAL_N
[22:22:41] [PASSED] SECAM
[22:22:41] [PASSED] MONO_525
[22:22:41] [PASSED] MONO_625
[22:22:41] =========== [PASSED] drm_test_cmdline_tv_options ===========
[22:22:41] =============== [PASSED] drm_cmdline_parser ================
[22:22:41] ========== drmm_connector_hdmi_init (19 subtests) ==========
[22:22:41] [PASSED] drm_test_connector_hdmi_init_valid
[22:22:41] [PASSED] drm_test_connector_hdmi_init_bpc_8
[22:22:41] [PASSED] drm_test_connector_hdmi_init_bpc_10
[22:22:41] [PASSED] drm_test_connector_hdmi_init_bpc_12
[22:22:41] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[22:22:41] [PASSED] drm_test_connector_hdmi_init_bpc_null
[22:22:41] [PASSED] drm_test_connector_hdmi_init_formats_empty
[22:22:41] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[22:22:41] [PASSED] drm_test_connector_hdmi_init_null_ddc
[22:22:41] [PASSED] drm_test_connector_hdmi_init_null_product
[22:22:41] [PASSED] drm_test_connector_hdmi_init_null_vendor
[22:22:41] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[22:22:41] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[22:22:41] [PASSED] drm_test_connector_hdmi_init_product_valid
[22:22:41] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[22:22:41] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[22:22:41] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[22:22:41] ========= drm_test_connector_hdmi_init_type_valid  =========
[22:22:41] [PASSED] HDMI-A
[22:22:41] [PASSED] HDMI-B
[22:22:41] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[22:22:41] ======== drm_test_connector_hdmi_init_type_invalid  ========
[22:22:41] [PASSED] Unknown
[22:22:41] [PASSED] VGA
[22:22:41] [PASSED] DVI-I
[22:22:41] [PASSED] DVI-D
[22:22:41] [PASSED] DVI-A
[22:22:41] [PASSED] Composite
[22:22:41] [PASSED] SVIDEO
[22:22:41] [PASSED] LVDS
[22:22:41] [PASSED] Component
[22:22:41] [PASSED] DIN
[22:22:41] [PASSED] DP
[22:22:41] [PASSED] TV
[22:22:41] [PASSED] eDP
[22:22:41] [PASSED] Virtual
[22:22:41] [PASSED] DSI
[22:22:41] [PASSED] DPI
[22:22:41] [PASSED] Writeback
[22:22:41] [PASSED] SPI
[22:22:41] [PASSED] USB
[22:22:41] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[22:22:41] ============ [PASSED] drmm_connector_hdmi_init =============
[22:22:41] ============= drmm_connector_init (3 subtests) =============
[22:22:41] [PASSED] drm_test_drmm_connector_init
[22:22:41] [PASSED] drm_test_drmm_connector_init_null_ddc
[22:22:41] ========= drm_test_drmm_connector_init_type_valid  =========
[22:22:41] [PASSED] Unknown
[22:22:41] [PASSED] VGA
[22:22:41] [PASSED] DVI-I
[22:22:41] [PASSED] DVI-D
[22:22:41] [PASSED] DVI-A
[22:22:41] [PASSED] Composite
[22:22:41] [PASSED] SVIDEO
[22:22:41] [PASSED] LVDS
[22:22:41] [PASSED] Component
[22:22:41] [PASSED] DIN
[22:22:41] [PASSED] DP
[22:22:41] [PASSED] HDMI-A
[22:22:41] [PASSED] HDMI-B
[22:22:41] [PASSED] TV
[22:22:41] [PASSED] eDP
[22:22:41] [PASSED] Virtual
[22:22:41] [PASSED] DSI
[22:22:41] [PASSED] DPI
[22:22:41] [PASSED] Writeback
[22:22:41] [PASSED] SPI
[22:22:41] [PASSED] USB
[22:22:41] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[22:22:41] =============== [PASSED] drmm_connector_init ===============
[22:22:41] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[22:22:41] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[22:22:41] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[22:22:41] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[22:22:41] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[22:22:41] ========== drm_test_get_tv_mode_from_name_valid  ===========
[22:22:41] [PASSED] NTSC
[22:22:41] [PASSED] NTSC-443
[22:22:41] [PASSED] NTSC-J
[22:22:41] [PASSED] PAL
[22:22:41] [PASSED] PAL-M
[22:22:41] [PASSED] PAL-N
[22:22:41] [PASSED] SECAM
[22:22:41] [PASSED] Mono
[22:22:41] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[22:22:41] [PASSED] drm_test_get_tv_mode_from_name_truncated
[22:22:41] ============ [PASSED] drm_get_tv_mode_from_name ============
[22:22:41] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[22:22:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[22:22:41] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[22:22:41] [PASSED] VIC 96
[22:22:41] [PASSED] VIC 97
[22:22:41] [PASSED] VIC 101
[22:22:41] [PASSED] VIC 102
[22:22:41] [PASSED] VIC 106
[22:22:41] [PASSED] VIC 107
[22:22:41] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[22:22:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[22:22:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[22:22:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[22:22:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[22:22:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[22:22:41] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[22:22:41] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[22:22:41] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[22:22:41] [PASSED] Automatic
[22:22:41] [PASSED] Full
[22:22:41] [PASSED] Limited 16:235
[22:22:41] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[22:22:41] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[22:22:41] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[22:22:41] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[22:22:41] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[22:22:41] [PASSED] RGB
[22:22:41] [PASSED] YUV 4:2:0
[22:22:41] [PASSED] YUV 4:2:2
[22:22:41] [PASSED] YUV 4:4:4
[22:22:41] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[22:22:41] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[22:22:41] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[22:22:41] ============= drm_damage_helper (21 subtests) ==============
[22:22:41] [PASSED] drm_test_damage_iter_no_damage
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_src_moved
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_not_visible
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[22:22:41] [PASSED] drm_test_damage_iter_no_damage_no_fb
[22:22:41] [PASSED] drm_test_damage_iter_simple_damage
[22:22:41] [PASSED] drm_test_damage_iter_single_damage
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_outside_src
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_src_moved
[22:22:41] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[22:22:41] [PASSED] drm_test_damage_iter_damage
[22:22:41] [PASSED] drm_test_damage_iter_damage_one_intersect
[22:22:41] [PASSED] drm_test_damage_iter_damage_one_outside
[22:22:41] [PASSED] drm_test_damage_iter_damage_src_moved
[22:22:41] [PASSED] drm_test_damage_iter_damage_not_visible
[22:22:41] ================ [PASSED] drm_damage_helper ================
[22:22:41] ============== drm_dp_mst_helper (3 subtests) ==============
[22:22:41] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[22:22:41] [PASSED] Clock 154000 BPP 30 DSC disabled
[22:22:41] [PASSED] Clock 234000 BPP 30 DSC disabled
[22:22:41] [PASSED] Clock 297000 BPP 24 DSC disabled
[22:22:41] [PASSED] Clock 332880 BPP 24 DSC enabled
[22:22:41] [PASSED] Clock 324540 BPP 24 DSC enabled
[22:22:41] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[22:22:41] ============== drm_test_dp_mst_calc_pbn_div  ===============
[22:22:41] [PASSED] Link rate 2000000 lane count 4
[22:22:41] [PASSED] Link rate 2000000 lane count 2
[22:22:41] [PASSED] Link rate 2000000 lane count 1
[22:22:41] [PASSED] Link rate 1350000 lane count 4
[22:22:41] [PASSED] Link rate 1350000 lane count 2
[22:22:41] [PASSED] Link rate 1350000 lane count 1
[22:22:41] [PASSED] Link rate 1000000 lane count 4
[22:22:41] [PASSED] Link rate 1000000 lane count 2
[22:22:41] [PASSED] Link rate 1000000 lane count 1
[22:22:41] [PASSED] Link rate 810000 lane count 4
[22:22:41] [PASSED] Link rate 810000 lane count 2
[22:22:41] [PASSED] Link rate 810000 lane count 1
[22:22:41] [PASSED] Link rate 540000 lane count 4
[22:22:41] [PASSED] Link rate 540000 lane count 2
[22:22:41] [PASSED] Link rate 540000 lane count 1
[22:22:41] [PASSED] Link rate 270000 lane count 4
[22:22:41] [PASSED] Link rate 270000 lane count 2
[22:22:41] [PASSED] Link rate 270000 lane count 1
[22:22:41] [PASSED] Link rate 162000 lane count 4
[22:22:41] [PASSED] Link rate 162000 lane count 2
[22:22:41] [PASSED] Link rate 162000 lane count 1
[22:22:41] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[22:22:41] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[22:22:41] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[22:22:41] [PASSED] DP_POWER_UP_PHY with port number
[22:22:41] [PASSED] DP_POWER_DOWN_PHY with port number
[22:22:41] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[22:22:41] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[22:22:41] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[22:22:41] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[22:22:41] [PASSED] DP_QUERY_PAYLOAD with port number
[22:22:41] [PASSED] DP_QUERY_PAYLOAD with VCPI
[22:22:41] [PASSED] DP_REMOTE_DPCD_READ with port number
[22:22:41] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[22:22:41] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[22:22:41] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[22:22:41] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[22:22:41] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[22:22:41] [PASSED] DP_REMOTE_I2C_READ with port number
[22:22:41] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[22:22:41] [PASSED] DP_REMOTE_I2C_READ with transactions array
[22:22:41] [PASSED] DP_REMOTE_I2C_WRITE with port number
[22:22:41] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[22:22:41] [PASSED] DP_REMOTE_I2C_WRITE with data array
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[22:22:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[22:22:41] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[22:22:41] ================ [PASSED] drm_dp_mst_helper ================
[22:22:41] ================== drm_exec (7 subtests) ===================
[22:22:41] [PASSED] sanitycheck
[22:22:41] [PASSED] test_lock
[22:22:41] [PASSED] test_lock_unlock
[22:22:41] [PASSED] test_duplicates
[22:22:41] [PASSED] test_prepare
[22:22:41] [PASSED] test_prepare_array
[22:22:41] [PASSED] test_multiple_loops
[22:22:41] ==================== [PASSED] drm_exec =====================
[22:22:41] =========== drm_format_helper_test (17 subtests) ===========
[22:22:41] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[22:22:41] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[22:22:41] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[22:22:41] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[22:22:41] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[22:22:41] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[22:22:41] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[22:22:41] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[22:22:41] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[22:22:41] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[22:22:41] ============== drm_test_fb_xrgb8888_to_mono  ===============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[22:22:41] ==================== drm_test_fb_swab  =====================
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ================ [PASSED] drm_test_fb_swab =================
[22:22:41] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[22:22:41] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[22:22:41] [PASSED] single_pixel_source_buffer
[22:22:41] [PASSED] single_pixel_clip_rectangle
[22:22:41] [PASSED] well_known_colors
[22:22:41] [PASSED] destination_pitch
[22:22:41] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[22:22:41] ================= drm_test_fb_clip_offset  =================
[22:22:41] [PASSED] pass through
[22:22:41] [PASSED] horizontal offset
[22:22:41] [PASSED] vertical offset
[22:22:41] [PASSED] horizontal and vertical offset
[22:22:41] [PASSED] horizontal offset (custom pitch)
[22:22:41] [PASSED] vertical offset (custom pitch)
[22:22:41] [PASSED] horizontal and vertical offset (custom pitch)
[22:22:41] ============= [PASSED] drm_test_fb_clip_offset =============
[22:22:41] ============== drm_test_fb_build_fourcc_list  ==============
[22:22:41] [PASSED] no native formats
[22:22:41] [PASSED] XRGB8888 as native format
[22:22:41] [PASSED] remove duplicates
[22:22:41] [PASSED] convert alpha formats
[22:22:41] [PASSED] random formats
[22:22:41] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[22:22:41] =================== drm_test_fb_memcpy  ====================
[22:22:41] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[22:22:41] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[22:22:41] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[22:22:41] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[22:22:41] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[22:22:41] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[22:22:41] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[22:22:41] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[22:22:41] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[22:22:41] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[22:22:41] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[22:22:41] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[22:22:41] =============== [PASSED] drm_test_fb_memcpy ================
[22:22:41] ============= [PASSED] drm_format_helper_test ==============
[22:22:41] ================= drm_format (18 subtests) =================
[22:22:41] [PASSED] drm_test_format_block_width_invalid
[22:22:41] [PASSED] drm_test_format_block_width_one_plane
[22:22:41] [PASSED] drm_test_format_block_width_two_plane
[22:22:41] [PASSED] drm_test_format_block_width_three_plane
[22:22:41] [PASSED] drm_test_format_block_width_tiled
[22:22:41] [PASSED] drm_test_format_block_height_invalid
[22:22:41] [PASSED] drm_test_format_block_height_one_plane
[22:22:41] [PASSED] drm_test_format_block_height_two_plane
[22:22:41] [PASSED] drm_test_format_block_height_three_plane
[22:22:41] [PASSED] drm_test_format_block_height_tiled
[22:22:41] [PASSED] drm_test_format_min_pitch_invalid
[22:22:41] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[22:22:41] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[22:22:41] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[22:22:41] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[22:22:41] [PASSED] drm_test_format_min_pitch_two_plane
[22:22:41] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[22:22:41] [PASSED] drm_test_format_min_pitch_tiled
[22:22:41] =================== [PASSED] drm_format ====================
[22:22:41] =============== drm_framebuffer (1 subtest) ================
[22:22:41] =============== drm_test_framebuffer_create  ===============
[22:22:41] [PASSED] ABGR8888 normal sizes
[22:22:41] [PASSED] ABGR8888 max sizes
[22:22:41] [PASSED] ABGR8888 pitch greater than min required
[22:22:41] [PASSED] ABGR8888 pitch less than min required
[22:22:41] [PASSED] ABGR8888 Invalid width
[22:22:41] [PASSED] ABGR8888 Invalid buffer handle
[22:22:41] [PASSED] No pixel format
[22:22:41] [PASSED] ABGR8888 Width 0
[22:22:41] [PASSED] ABGR8888 Height 0
[22:22:41] [PASSED] ABGR8888 Out of bound height * pitch combination
[22:22:41] [PASSED] ABGR8888 Large buffer offset
[22:22:41] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[22:22:41] [PASSED] ABGR8888 Valid buffer modifier
[22:22:41] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[22:22:41] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] NV12 Normal sizes
[22:22:41] [PASSED] NV12 Max sizes
[22:22:41] [PASSED] NV12 Invalid pitch
[22:22:41] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[22:22:41] [PASSED] NV12 different  modifier per-plane
[22:22:41] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[22:22:41] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] NV12 Modifier for inexistent plane
[22:22:41] [PASSED] NV12 Handle for inexistent plane
[22:22:41] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[22:22:41] [PASSED] YVU420 Normal sizes
[22:22:41] [PASSED] YVU420 Max sizes
[22:22:41] [PASSED] YVU420 Invalid pitch
[22:22:41] [PASSED] YVU420 Different pitches
[22:22:41] [PASSED] YVU420 Different buffer offsets/pitches
[22:22:41] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[22:22:41] [PASSED] YVU420 Valid modifier
[22:22:41] [PASSED] YVU420 Different modifiers per plane
[22:22:41] [PASSED] YVU420 Modifier for inexistent plane
[22:22:41] [PASSED] X0L2 Normal sizes
[22:22:41] [PASSED] X0L2 Max sizes
[22:22:41] [PASSED] X0L2 Invalid pitch
[22:22:41] [PASSED] X0L2 Pitch greater than minimum required
[22:22:41] [PASSED] X0L2 Handle for inexistent plane
[22:22:41] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[22:22:41] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[22:22:41] [PASSED] X0L2 Valid modifier
[22:22:41] [PASSED] X0L2 Modifier for inexistent plane
[22:22:41] =========== [PASSED] drm_test_framebuffer_create ===========
[22:22:41] ================= [PASSED] drm_framebuffer =================
[22:22:41] ================ drm_gem_shmem (8 subtests) ================
[22:22:41] [PASSED] drm_gem_shmem_test_obj_create
[22:22:41] [PASSED] drm_gem_shmem_test_obj_create_private
[22:22:41] [PASSED] drm_gem_shmem_test_pin_pages
[22:22:41] [PASSED] drm_gem_shmem_test_vmap
[22:22:41] [PASSED] drm_gem_shmem_test_get_pages_sgt
[22:22:41] [PASSED] drm_gem_shmem_test_get_sg_table
[22:22:41] [PASSED] drm_gem_shmem_test_madvise
[22:22:41] [PASSED] drm_gem_shmem_test_purge
[22:22:41] ================== [PASSED] drm_gem_shmem ==================
[22:22:41] === drm_atomic_helper_connector_hdmi_check (22 subtests) ===
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[22:22:41] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[22:22:41] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback
[22:22:41] [PASSED] drm_test_check_max_tmds_rate_format_fallback
[22:22:41] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[22:22:41] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[22:22:41] [PASSED] drm_test_check_output_bpc_dvi
[22:22:41] [PASSED] drm_test_check_output_bpc_format_vic_1
[22:22:41] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[22:22:41] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[22:22:41] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[22:22:41] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[22:22:41] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[22:22:41] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[22:22:41] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[22:22:41] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[22:22:41] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[22:22:41] [PASSED] drm_test_check_broadcast_rgb_value
[22:22:41] [PASSED] drm_test_check_bpc_8_value
[22:22:41] [PASSED] drm_test_check_bpc_10_value
[22:22:41] [PASSED] drm_test_check_bpc_12_value
[22:22:41] [PASSED] drm_test_check_format_value
[22:22:41] [PASSED] drm_test_check_tmds_char_value
[22:22:41] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[22:22:41] ================= drm_managed (2 subtests) =================
[22:22:41] [PASSED] drm_test_managed_release_action
[22:22:41] [PASSED] drm_test_managed_run_action
[22:22:41] =================== [PASSED] drm_managed ===================
[22:22:41] =================== drm_mm (6 subtests) ====================
[22:22:41] [PASSED] drm_test_mm_init
[22:22:41] [PASSED] drm_test_mm_debug
[22:22:41] [PASSED] drm_test_mm_align32
[22:22:41] [PASSED] drm_test_mm_align64
[22:22:41] [PASSED] drm_test_mm_lowest
[22:22:41] [PASSED] drm_test_mm_highest
[22:22:41] ===================== [PASSED] drm_mm ======================
[22:22:41] ============= drm_modes_analog_tv (5 subtests) =============
[22:22:41] [PASSED] drm_test_modes_analog_tv_mono_576i
[22:22:41] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[22:22:41] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[22:22:41] [PASSED] drm_test_modes_analog_tv_pal_576i
[22:22:41] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[22:22:41] =============== [PASSED] drm_modes_analog_tv ===============
[22:22:41] ============== drm_plane_helper (2 subtests) ===============
[22:22:41] =============== drm_test_check_plane_state  ================
[22:22:41] [PASSED] clipping_simple
[22:22:41] [PASSED] clipping_rotate_reflect
[22:22:41] [PASSED] positioning_simple
[22:22:41] [PASSED] upscaling
[22:22:41] [PASSED] downscaling
[22:22:41] [PASSED] rounding1
[22:22:41] [PASSED] rounding2
[22:22:41] [PASSED] rounding3
[22:22:41] [PASSED] rounding4
[22:22:41] =========== [PASSED] drm_test_check_plane_state ============
[22:22:41] =========== drm_test_check_invalid_plane_state  ============
[22:22:41] [PASSED] positioning_invalid
[22:22:41] [PASSED] upscaling_invalid
stty: 'standard input': Inappropriate ioctl for device
[22:22:41] [PASSED] downscaling_invalid
[22:22:41] ======= [PASSED] drm_test_check_invalid_plane_state ========
[22:22:41] ================ [PASSED] drm_plane_helper =================
[22:22:41] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[22:22:41] ====== drm_test_connector_helper_tv_get_modes_check  =======
[22:22:41] [PASSED] None
[22:22:41] [PASSED] PAL
[22:22:41] [PASSED] NTSC
[22:22:41] [PASSED] Both, NTSC Default
[22:22:41] [PASSED] Both, PAL Default
[22:22:41] [PASSED] Both, NTSC Default, with PAL on command-line
[22:22:41] [PASSED] Both, PAL Default, with NTSC on command-line
[22:22:41] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[22:22:41] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[22:22:41] ================== drm_rect (9 subtests) ===================
[22:22:41] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[22:22:41] [PASSED] drm_test_rect_clip_scaled_not_clipped
[22:22:41] [PASSED] drm_test_rect_clip_scaled_clipped
[22:22:41] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[22:22:41] ================= drm_test_rect_intersect  =================
[22:22:41] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[22:22:41] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[22:22:41] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[22:22:41] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[22:22:41] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[22:22:41] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[22:22:41] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[22:22:41] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[22:22:41] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[22:22:41] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[22:22:41] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[22:22:41] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[22:22:41] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[22:22:41] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[22:22:41] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[22:22:41] ============= [PASSED] drm_test_rect_intersect =============
[22:22:41] ================ drm_test_rect_calc_hscale  ================
[22:22:41] [PASSED] normal use
[22:22:41] [PASSED] out of max range
[22:22:41] [PASSED] out of min range
[22:22:41] [PASSED] zero dst
[22:22:41] [PASSED] negative src
[22:22:41] [PASSED] negative dst
[22:22:41] ============ [PASSED] drm_test_rect_calc_hscale ============
[22:22:41] ================ drm_test_rect_calc_vscale  ================
[22:22:41] [PASSED] normal use
[22:22:41] [PASSED] out of max range
[22:22:41] [PASSED] out of min range
[22:22:41] [PASSED] zero dst
[22:22:41] [PASSED] negative src
[22:22:41] [PASSED] negative dst
[22:22:41] ============ [PASSED] drm_test_rect_calc_vscale ============
[22:22:41] ================== drm_test_rect_rotate  ===================
[22:22:41] [PASSED] reflect-x
[22:22:41] [PASSED] reflect-y
[22:22:41] [PASSED] rotate-0
[22:22:41] [PASSED] rotate-90
[22:22:41] [PASSED] rotate-180
[22:22:41] [PASSED] rotate-270
[22:22:41] ============== [PASSED] drm_test_rect_rotate ===============
[22:22:41] ================ drm_test_rect_rotate_inv  =================
[22:22:41] [PASSED] reflect-x
[22:22:41] [PASSED] reflect-y
[22:22:41] [PASSED] rotate-0
[22:22:41] [PASSED] rotate-90
[22:22:41] [PASSED] rotate-180
[22:22:41] [PASSED] rotate-270
[22:22:41] ============ [PASSED] drm_test_rect_rotate_inv =============
[22:22:41] ==================== [PASSED] drm_rect =====================
[22:22:41] ============================================================
[22:22:41] Testing complete. Ran 515 tests: passed: 515
[22:22:41] Elapsed time: 23.504s total, 1.746s configuring, 21.587s building, 0.149s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [22:22:41] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:22:43] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[22:22:52] Starting KUnit Kernel (1/1)...
[22:22:52] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:22:52] ================= ttm_device (5 subtests) ==================
[22:22:52] [PASSED] ttm_device_init_basic
[22:22:52] [PASSED] ttm_device_init_multiple
[22:22:52] [PASSED] ttm_device_fini_basic
[22:22:52] [PASSED] ttm_device_init_no_vma_man
[22:22:52] ================== ttm_device_init_pools  ==================
[22:22:52] [PASSED] No DMA allocations, no DMA32 required
[22:22:52] [PASSED] DMA allocations, DMA32 required
[22:22:52] [PASSED] No DMA allocations, DMA32 required
[22:22:52] [PASSED] DMA allocations, no DMA32 required
[22:22:52] ============== [PASSED] ttm_device_init_pools ==============
[22:22:52] =================== [PASSED] ttm_device ====================
[22:22:52] ================== ttm_pool (8 subtests) ===================
[22:22:52] ================== ttm_pool_alloc_basic  ===================
[22:22:52] [PASSED] One page
[22:22:52] [PASSED] More than one page
[22:22:52] [PASSED] Above the allocation limit
[22:22:52] [PASSED] One page, with coherent DMA mappings enabled
[22:22:52] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:22:52] ============== [PASSED] ttm_pool_alloc_basic ===============
[22:22:52] ============== ttm_pool_alloc_basic_dma_addr  ==============
[22:22:52] [PASSED] One page
[22:22:52] [PASSED] More than one page
[22:22:52] [PASSED] Above the allocation limit
[22:22:52] [PASSED] One page, with coherent DMA mappings enabled
[22:22:52] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:22:52] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[22:22:52] [PASSED] ttm_pool_alloc_order_caching_match
[22:22:52] [PASSED] ttm_pool_alloc_caching_mismatch
[22:22:52] [PASSED] ttm_pool_alloc_order_mismatch
[22:22:52] [PASSED] ttm_pool_free_dma_alloc
[22:22:52] [PASSED] ttm_pool_free_no_dma_alloc
[22:22:52] [PASSED] ttm_pool_fini_basic
[22:22:52] ==================== [PASSED] ttm_pool =====================
[22:22:52] ================ ttm_resource (8 subtests) =================
[22:22:52] ================= ttm_resource_init_basic  =================
[22:22:52] [PASSED] Init resource in TTM_PL_SYSTEM
[22:22:52] [PASSED] Init resource in TTM_PL_VRAM
[22:22:52] [PASSED] Init resource in a private placement
[22:22:52] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[22:22:52] ============= [PASSED] ttm_resource_init_basic =============
[22:22:52] [PASSED] ttm_resource_init_pinned
[22:22:52] [PASSED] ttm_resource_fini_basic
[22:22:52] [PASSED] ttm_resource_manager_init_basic
[22:22:52] [PASSED] ttm_resource_manager_usage_basic
[22:22:52] [PASSED] ttm_resource_manager_set_used_basic
[22:22:52] [PASSED] ttm_sys_man_alloc_basic
[22:22:52] [PASSED] ttm_sys_man_free_basic
[22:22:52] ================== [PASSED] ttm_resource ===================
[22:22:52] =================== ttm_tt (15 subtests) ===================
[22:22:52] ==================== ttm_tt_init_basic  ====================
[22:22:52] [PASSED] Page-aligned size
[22:22:52] [PASSED] Extra pages requested
[22:22:52] ================ [PASSED] ttm_tt_init_basic ================
[22:22:52] [PASSED] ttm_tt_init_misaligned
[22:22:52] [PASSED] ttm_tt_fini_basic
[22:22:52] [PASSED] ttm_tt_fini_sg
[22:22:52] [PASSED] ttm_tt_fini_shmem
[22:22:52] [PASSED] ttm_tt_create_basic
[22:22:52] [PASSED] ttm_tt_create_invalid_bo_type
[22:22:52] [PASSED] ttm_tt_create_ttm_exists
[22:22:52] [PASSED] ttm_tt_create_failed
[22:22:52] [PASSED] ttm_tt_destroy_basic
[22:22:52] [PASSED] ttm_tt_populate_null_ttm
[22:22:52] [PASSED] ttm_tt_populate_populated_ttm
[22:22:52] [PASSED] ttm_tt_unpopulate_basic
[22:22:52] [PASSED] ttm_tt_unpopulate_empty_ttm
[22:22:52] [PASSED] ttm_tt_swapin_basic
[22:22:52] ===================== [PASSED] ttm_tt ======================
[22:22:52] =================== ttm_bo (14 subtests) ===================
[22:22:52] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[22:22:52] [PASSED] Cannot be interrupted and sleeps
[22:22:52] [PASSED] Cannot be interrupted, locks straight away
[22:22:52] [PASSED] Can be interrupted, sleeps
[22:22:52] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[22:22:52] [PASSED] ttm_bo_reserve_locked_no_sleep
[22:22:52] [PASSED] ttm_bo_reserve_no_wait_ticket
[22:22:52] [PASSED] ttm_bo_reserve_double_resv
[22:22:52] [PASSED] ttm_bo_reserve_interrupted
[22:22:52] [PASSED] ttm_bo_reserve_deadlock
[22:22:52] [PASSED] ttm_bo_unreserve_basic
[22:22:52] [PASSED] ttm_bo_unreserve_pinned
[22:22:52] [PASSED] ttm_bo_unreserve_bulk
[22:22:52] [PASSED] ttm_bo_put_basic
[22:22:52] [PASSED] ttm_bo_put_shared_resv
[22:22:52] [PASSED] ttm_bo_pin_basic
[22:22:52] [PASSED] ttm_bo_pin_unpin_resource
[22:22:52] [PASSED] ttm_bo_multiple_pin_one_unpin
[22:22:52] ===================== [PASSED] ttm_bo ======================
[22:22:52] ============== ttm_bo_validate (22 subtests) ===============
[22:22:52] ============== ttm_bo_init_reserved_sys_man  ===============
[22:22:52] [PASSED] Buffer object for userspace
[22:22:52] [PASSED] Kernel buffer object
[22:22:52] [PASSED] Shared buffer object
[22:22:52] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[22:22:52] ============== ttm_bo_init_reserved_mock_man  ==============
[22:22:52] [PASSED] Buffer object for userspace
[22:22:52] [PASSED] Kernel buffer object
[22:22:52] [PASSED] Shared buffer object
[22:22:52] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[22:22:52] [PASSED] ttm_bo_init_reserved_resv
[22:22:52] ================== ttm_bo_validate_basic  ==================
[22:22:52] [PASSED] Buffer object for userspace
[22:22:52] [PASSED] Kernel buffer object
[22:22:52] [PASSED] Shared buffer object
[22:22:52] ============== [PASSED] ttm_bo_validate_basic ==============
[22:22:52] [PASSED] ttm_bo_validate_invalid_placement
[22:22:52] ============= ttm_bo_validate_same_placement  ==============
[22:22:52] [PASSED] System manager
[22:22:52] [PASSED] VRAM manager
[22:22:52] ========= [PASSED] ttm_bo_validate_same_placement ==========
[22:22:52] [PASSED] ttm_bo_validate_failed_alloc
[22:22:52] [PASSED] ttm_bo_validate_pinned
[22:22:52] [PASSED] ttm_bo_validate_busy_placement
[22:22:52] ================ ttm_bo_validate_multihop  =================
[22:22:52] [PASSED] Buffer object for userspace
[22:22:52] [PASSED] Kernel buffer object
[22:22:52] [PASSED] Shared buffer object
[22:22:52] ============ [PASSED] ttm_bo_validate_multihop =============
[22:22:52] ========== ttm_bo_validate_no_placement_signaled  ==========
[22:22:52] [PASSED] Buffer object in system domain, no page vector
[22:22:52] [PASSED] Buffer object in system domain with an existing page vector
[22:22:52] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[22:22:52] ======== ttm_bo_validate_no_placement_not_signaled  ========
[22:22:52] [PASSED] Buffer object for userspace
[22:22:52] [PASSED] Kernel buffer object
[22:22:52] [PASSED] Shared buffer object
[22:22:52] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[22:22:52] [PASSED] ttm_bo_validate_move_fence_signaled
[22:22:52] ========= ttm_bo_validate_move_fence_not_signaled  =========
[22:22:52] [PASSED] Waits for GPU
[22:22:52] [PASSED] Tries to lock straight away
[22:22:52] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[22:22:52] [PASSED] ttm_bo_validate_swapout
[22:22:52] [PASSED] ttm_bo_validate_happy_evict
[22:22:52] [PASSED] ttm_bo_validate_all_pinned_evict
[22:22:52] [PASSED] ttm_bo_validate_allowed_only_evict
[22:22:52] [PASSED] ttm_bo_validate_deleted_evict
[22:22:52] [PASSED] ttm_bo_validate_busy_domain_evict
[22:22:52] [PASSED] ttm_bo_validate_evict_gutting
[22:22:52] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[22:22:52] ================= [PASSED] ttm_bo_validate =================
[22:22:52] ============================================================
[22:22:52] Testing complete. Ran 102 tests: passed: 102
[22:22:52] Elapsed time: 11.239s total, 1.719s configuring, 8.849s building, 0.571s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#17 lore raw

✗ CI.Build: failure for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk
URL : https://patchwork.freedesktop.org/series/137360/
State : failure

== Summary ==

CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_policy.o

  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_translation_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_dc_resource_mgmt.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_mall_phantom.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml_display_rq_dlg_calc.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top_mcache.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml2_top_optimization.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/inc/dml2_debug.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_translation_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_wrapper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_utils.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_compressor.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_regamma_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_csc_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_mem_input_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_transform_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_hw_sequencer.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/hdcp/hdcp_msg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_scl_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_isharp_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_hw_sequencer.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_sink.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_exports.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_vm_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_edid_parser.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_spl_translate.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_table.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/info_packet/info_packet.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv_stat.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_reg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn20.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn21.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn30.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn301.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn302.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn303.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn31.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn314.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn315.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn316.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn32.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn35.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn351.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn401.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_ddc.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_log.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_transition.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_transition.o
  LD [M]  drivers/gpu/drm/amd/amdgpu/amdgpu.o

make[5]: *** [../scripts/Makefile.build:485: drivers/gpu/drm] Error 2 make[4]: *** [../scripts/Makefile.build:485: drivers/gpu] Error 2 make[3]: *** [../scripts/Makefile.build:485: drivers] Error 2 make[2]: *** [/kernel/Makefile:1925: .] Error 2
make[1]: *** [/kernel/Makefile:224: __sub-make] Error 2 make[1]: Leaving directory '/kernel/build64-default'
make: *** [Makefile:224: __sub-make] Error 2
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel