* [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node.
@ 2025-10-21 12:18 Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 1/7] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
` (8 more replies)
0 siblings, 9 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst
First part of privatizing struct xe_ggtt is privatizing xe_ggtt_node.
These patches have been mostly reviewed, so send it in for CI and
to get the remaining patches reviewed.
Maarten Lankhorst (7):
drm/xe: Start using ggtt->start in preparation of balloon removal
drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT
drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
drm/xe/display: Avoid dereferencing xe_ggtt_node
drm/xe: Do not dereference ggtt_node in xe_bo.c
drm/xe: Improve xe_gt_sriov_pf_config GGTT handling
drm/xe: Privatize xe_ggtt_node
.../gpu/drm/xe/compat-i915-headers/i915_vma.h | 4 +-
drivers/gpu/drm/xe/display/xe_fb_pin.c | 113 +++++-----
drivers/gpu/drm/xe/display/xe_stolen.c | 2 +-
drivers/gpu/drm/xe/xe_bo.c | 6 +-
drivers/gpu/drm/xe/xe_bo.h | 8 +-
drivers/gpu/drm/xe/xe_ggtt.c | 212 +++++++++++++-----
drivers/gpu/drm/xe/xe_ggtt.h | 14 +-
drivers/gpu/drm/xe/xe_ggtt_types.h | 31 +--
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 19 +-
9 files changed, 253 insertions(+), 156 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/7] drm/xe: Start using ggtt->start in preparation of balloon removal
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 2/7] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
` (7 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst, Stuart Summers
Instead of having ggtt->size point to the end of ggtt, have ggtt->size
be the actual size of the GGTT, and introduce ggtt->start to point to
the beginning of GGTT.
This will allow a massive cleanup of GGTT in case of SRIOV-VF.
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/xe_ggtt.c | 82 ++++++++++++++--------
drivers/gpu/drm/xe/xe_ggtt.h | 2 +
drivers/gpu/drm/xe/xe_ggtt_types.h | 4 +-
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 4 +-
4 files changed, 59 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 40680f0c49a17..59334aa06a020 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -137,10 +137,32 @@ static void ggtt_update_access_counter(struct xe_ggtt *ggtt)
}
}
+/**
+ * xe_ggtt_start - Get starting offset of GGTT.
+ * @ggtt: &xe_ggtt
+ *
+ * Returns: Starting offset for this &xe_ggtt.
+ */
+u64 xe_ggtt_start(struct xe_ggtt *ggtt)
+{
+ return ggtt->start;
+}
+
+/**
+ * xe_ggtt_size - Get size of GGTT.
+ * @ggtt: &xe_ggtt
+ *
+ * Returns: Total usable size of this &xe_ggtt.
+ */
+u64 xe_ggtt_size(struct xe_ggtt *ggtt)
+{
+ return ggtt->size;
+}
+
static void xe_ggtt_set_pte(struct xe_ggtt *ggtt, u64 addr, u64 pte)
{
xe_tile_assert(ggtt->tile, !(addr & XE_PTE_MASK));
- xe_tile_assert(ggtt->tile, addr < ggtt->size);
+ xe_tile_assert(ggtt->tile, addr < ggtt->start + ggtt->size);
writeq(pte, &ggtt->gsm[addr >> XE_PTE_SHIFT]);
}
@@ -245,16 +267,16 @@ static const struct xe_ggtt_pt_ops xelpg_pt_wa_ops = {
.ggtt_set_pte = xe_ggtt_set_pte_and_flush,
};
-static void __xe_ggtt_init_early(struct xe_ggtt *ggtt, u32 reserved)
+static void __xe_ggtt_init_early(struct xe_ggtt *ggtt, u64 start, u64 size)
{
- drm_mm_init(&ggtt->mm, reserved,
- ggtt->size - reserved);
+ ggtt->start = start;
+ ggtt->size = size;
+ drm_mm_init(&ggtt->mm, start, size);
}
-int xe_ggtt_init_kunit(struct xe_ggtt *ggtt, u32 reserved, u32 size)
+int xe_ggtt_init_kunit(struct xe_ggtt *ggtt, u32 start, u32 size)
{
- ggtt->size = size;
- __xe_ggtt_init_early(ggtt, reserved);
+ __xe_ggtt_init_early(ggtt, start, size);
return 0;
}
EXPORT_SYMBOL_IF_KUNIT(xe_ggtt_init_kunit);
@@ -282,26 +304,32 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
struct xe_device *xe = tile_to_xe(ggtt->tile);
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
unsigned int gsm_size;
+ u64 ggtt_start, wopcm = xe_wopcm_size(xe), ggtt_size;
int err;
- if (IS_SRIOV_VF(xe) || GRAPHICS_VERx100(xe) >= 1250)
- gsm_size = SZ_8M; /* GGTT is expected to be 4GiB */
- else
- gsm_size = probe_gsm_size(pdev);
-
- if (gsm_size == 0) {
- xe_tile_err(ggtt->tile, "Hardware reported no preallocated GSM\n");
- return -ENOMEM;
+ if (!IS_SRIOV_VF(xe)) {
+ if (GRAPHICS_VERx100(xe) >= 1250)
+ gsm_size = SZ_8M; /* GGTT is expected to be 4GiB */
+ else
+ gsm_size = probe_gsm_size(pdev);
+ if (gsm_size == 0) {
+ xe_tile_err(ggtt->tile, "Hardware reported no preallocated GSM\n");
+ return -ENOMEM;
+ }
+ ggtt_start = wopcm;
+ ggtt_size = (gsm_size / 8) * (u64) XE_PAGE_SIZE - ggtt_start;
+ } else {
+ /* GGTT is expected to be 4GiB */
+ ggtt_start = wopcm;
+ ggtt_size = SZ_4G - ggtt_start;
}
ggtt->gsm = ggtt->tile->mmio.regs + SZ_8M;
- ggtt->size = (gsm_size / 8) * (u64) XE_PAGE_SIZE;
-
if (IS_DGFX(xe) && xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K)
ggtt->flags |= XE_GGTT_FLAGS_64K;
- if (ggtt->size > GUC_GGTT_TOP)
- ggtt->size = GUC_GGTT_TOP;
+ if (ggtt_size + ggtt_start > GUC_GGTT_TOP)
+ ggtt_size = GUC_GGTT_TOP - ggtt_start;
if (GRAPHICS_VERx100(xe) >= 1270)
ggtt->pt_ops =
@@ -312,7 +340,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
ggtt->pt_ops = &xelp_pt_ops;
ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);
- __xe_ggtt_init_early(ggtt, xe_wopcm_size(xe));
+ __xe_ggtt_init_early(ggtt, ggtt_start, ggtt_size);
err = drmm_add_action_or_reset(&xe->drm, ggtt_fini_early, ggtt);
if (err)
@@ -550,11 +578,9 @@ void xe_ggtt_node_remove_balloon_locked(struct xe_ggtt_node *node)
static void xe_ggtt_assert_fit(struct xe_ggtt *ggtt, u64 start, u64 size)
{
struct xe_tile *tile = ggtt->tile;
- struct xe_device *xe = tile_to_xe(tile);
- u64 __maybe_unused wopcm = xe_wopcm_size(xe);
- xe_tile_assert(tile, start >= wopcm);
- xe_tile_assert(tile, start + size < ggtt->size - wopcm);
+ xe_tile_assert(tile, start >= ggtt->start);
+ xe_tile_assert(tile, start + size <= ggtt->start + ggtt->size);
}
/**
@@ -863,14 +889,12 @@ 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 = max(hole_start, ggtt->start);
hole_start = ALIGN(hole_start, alignment);
hole_end = ALIGN_DOWN(hole_end, alignment);
if (hole_start >= hole_end)
@@ -963,15 +987,13 @@ u64 xe_ggtt_print_holes(struct xe_ggtt *ggtt, u64 alignment, struct drm_printer
{
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 = 0;
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 = max(hole_start, ggtt->start);
hole_start = ALIGN(hole_start, alignment);
hole_end = ALIGN_DOWN(hole_end, alignment);
if (hole_start >= hole_end)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
index 75fc7a1efea76..6482bddb2ef36 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.h
+++ b/drivers/gpu/drm/xe/xe_ggtt.h
@@ -23,6 +23,8 @@ int xe_ggtt_node_insert_balloon_locked(struct xe_ggtt_node *node,
u64 start, u64 size);
void xe_ggtt_node_remove_balloon_locked(struct xe_ggtt_node *node);
void xe_ggtt_shift_nodes_locked(struct xe_ggtt *ggtt, s64 shift);
+u64 xe_ggtt_start(struct xe_ggtt *ggtt);
+u64 xe_ggtt_size(struct xe_ggtt *ggtt);
int xe_ggtt_node_insert(struct xe_ggtt_node *node, u32 size, u32 align);
int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node,
diff --git a/drivers/gpu/drm/xe/xe_ggtt_types.h b/drivers/gpu/drm/xe/xe_ggtt_types.h
index c5e999d58ff2a..a27919302d6b2 100644
--- a/drivers/gpu/drm/xe/xe_ggtt_types.h
+++ b/drivers/gpu/drm/xe/xe_ggtt_types.h
@@ -22,7 +22,9 @@ struct xe_gt;
struct xe_ggtt {
/** @tile: Back pointer to tile where this GGTT belongs */
struct xe_tile *tile;
- /** @size: Total size of this GGTT */
+ /** @start: Start offset of GGTT */
+ u64 start;
+ /** @size: Total usable size of this GGTT */
u64 size;
#define XE_GGTT_FLAGS_64K BIT(0)
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index c0c0215c07036..f96f96425c2ec 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -343,8 +343,8 @@ static int pf_push_full_vf_config(struct xe_gt *gt, unsigned int vfid)
xe_gt_assert(gt, num_dwords <= max_cfg_dwords);
if (vfid == PFID) {
- u64 ggtt_start = xe_wopcm_size(gt_to_xe(gt));
- u64 ggtt_size = gt_to_tile(gt)->mem.ggtt->size - ggtt_start;
+ u64 ggtt_start = xe_ggtt_start(gt_to_tile(gt)->mem.ggtt);
+ u64 ggtt_size = xe_ggtt_size(gt_to_tile(gt)->mem.ggtt);
/* plain PF config data will never include a real GGTT region */
xe_gt_assert(gt, !encode_config_ggtt(cfg + num_dwords, config, true));
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/7] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 1/7] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node Maarten Lankhorst
` (6 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe
Cc: Maarten Lankhorst, Maarten Lankhorst, Matthew Brost,
Juha-Pekka Heikkila
The rotation details belong in xe_fb_pin.c, while the operations involving
GGTT belong to xe_ggtt.c. As directly locking xe_ggtt etc results in
exposing all of xe_ggtt details anyway, create a special function that
allocates a ggtt_node, and allow display to populate it using a callback
as a compromise.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/display/xe_fb_pin.c | 111 ++++++++++++-------------
drivers/gpu/drm/xe/xe_ggtt.c | 90 ++++++++++++++------
drivers/gpu/drm/xe/xe_ggtt.h | 9 +-
drivers/gpu/drm/xe/xe_ggtt_types.h | 8 +-
4 files changed, 130 insertions(+), 88 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index 1fd4a815e784b..d2e4903de0977 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -171,12 +171,13 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb,
}
static void
-write_ggtt_rotated(struct xe_bo *bo, struct xe_ggtt *ggtt, u32 *ggtt_ofs, u32 bo_ofs,
+write_ggtt_rotated(struct xe_ggtt *ggtt, u32 *ggtt_ofs,
+ u64 pte_flags,
+ xe_ggtt_set_pte_fn write_pte,
+ struct xe_bo *bo, u32 bo_ofs,
u32 width, u32 height, u32 src_stride, u32 dst_stride)
{
- struct xe_device *xe = xe_bo_device(bo);
u32 column, row;
- u64 pte = ggtt->pt_ops->pte_encode_flags(bo, xe->pat.idx[XE_CACHE_NONE]);
for (column = 0; column < width; column++) {
u32 src_idx = src_stride * (height - 1) + column + bo_ofs;
@@ -184,7 +185,7 @@ write_ggtt_rotated(struct xe_bo *bo, struct xe_ggtt *ggtt, u32 *ggtt_ofs, u32 bo
for (row = 0; row < height; row++) {
u64 addr = xe_bo_addr(bo, src_idx * XE_PAGE_SIZE, XE_PAGE_SIZE);
- ggtt->pt_ops->ggtt_set_pte(ggtt, *ggtt_ofs, pte | addr);
+ write_pte(ggtt, *ggtt_ofs, pte_flags | addr);
*ggtt_ofs += XE_PAGE_SIZE;
src_idx -= src_stride;
}
@@ -194,6 +195,28 @@ write_ggtt_rotated(struct xe_bo *bo, struct xe_ggtt *ggtt, u32 *ggtt_ofs, u32 bo
}
}
+struct fb_rotate_args {
+ const struct i915_gtt_view *view;
+ struct xe_bo *bo;
+};
+
+static void write_ggtt_rotated_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+ u64 pte_flags, xe_ggtt_set_pte_fn write_pte, void *data)
+{
+ struct fb_rotate_args *args = data;
+ struct xe_bo *bo = args->bo;
+ const struct intel_rotation_info *rot_info = &args->view->rotated;
+ u32 ggtt_ofs = node->base.start;
+
+ for (u32 i = 0; i < ARRAY_SIZE(rot_info->plane); i++)
+ write_ggtt_rotated(ggtt, &ggtt_ofs, pte_flags, write_pte,
+ bo, rot_info->plane[i].offset,
+ rot_info->plane[i].width,
+ rot_info->plane[i].height,
+ rot_info->plane[i].src_stride,
+ rot_info->plane[i].dst_stride);
+}
+
static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
const struct i915_gtt_view *view,
struct i915_vma *vma,
@@ -204,70 +227,40 @@ static int __xe_pin_fb_vma_ggtt(const struct intel_framebuffer *fb,
struct xe_device *xe = to_xe_device(fb->base.dev);
struct xe_tile *tile0 = xe_device_get_root_tile(xe);
struct xe_ggtt *ggtt = tile0->mem.ggtt;
+ u64 pte, size;
u32 align;
- int ret;
-
- /* TODO: Consider sharing framebuffer mapping?
- * embed i915_vma inside intel_framebuffer
- */
- xe_pm_runtime_get_noresume(xe);
- ret = mutex_lock_interruptible(&ggtt->lock);
- if (ret)
- goto out;
+ int ret = 0;
align = XE_PAGE_SIZE;
- if (xe_bo_is_vram(bo) && ggtt->flags & XE_GGTT_FLAGS_64K)
- align = max_t(u32, align, SZ_64K);
+ if (xe_bo_is_vram(bo) && xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K)
+ align = max(align, SZ_64K);
+ /* Fast case, preallocated GGTT view? */
if (bo->ggtt_node[tile0->id] && view->type == I915_GTT_VIEW_NORMAL) {
vma->node = bo->ggtt_node[tile0->id];
- } else if (view->type == I915_GTT_VIEW_NORMAL) {
- 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(vma->node, xe_bo_size(bo), align, 0);
- if (ret) {
- xe_ggtt_node_fini(vma->node);
- goto out_unlock;
- }
-
- xe_ggtt_map_bo(ggtt, vma->node, bo, xe->pat.idx[XE_CACHE_NONE]);
- } else {
- u32 i, ggtt_ofs;
- const struct intel_rotation_info *rot_info = &view->rotated;
-
- /* display seems to use tiles instead of bytes here, so convert it back.. */
- u32 size = intel_rotation_info_size(rot_info) * XE_PAGE_SIZE;
-
- 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(vma->node, size, align, 0);
- if (ret) {
- xe_ggtt_node_fini(vma->node);
- goto out_unlock;
- }
+ return 0;
+ }
- ggtt_ofs = vma->node->base.start;
+ /* TODO: Consider sharing framebuffer mapping?
+ * embed i915_vma inside intel_framebuffer
+ */
+ xe_pm_runtime_get_noresume(xe);
- for (i = 0; i < ARRAY_SIZE(rot_info->plane); i++)
- write_ggtt_rotated(bo, ggtt, &ggtt_ofs,
- rot_info->plane[i].offset,
- rot_info->plane[i].width,
- rot_info->plane[i].height,
- rot_info->plane[i].src_stride,
- rot_info->plane[i].dst_stride);
- }
+ if (view->type == I915_GTT_VIEW_NORMAL)
+ size = xe_bo_size(bo);
+ else
+ /* display uses tiles instead of bytes here, so convert it back.. */
+ size = intel_rotation_info_size(&view->rotated) * XE_PAGE_SIZE;
+
+ pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe->pat.idx[XE_CACHE_NONE]);
+ vma->node = xe_ggtt_node_insert_transform(ggtt, bo, pte,
+ ALIGN(size, align), align,
+ view->type == I915_GTT_VIEW_NORMAL ?
+ NULL : write_ggtt_rotated_node,
+ &(struct fb_rotate_args){view, bo});
+ if (IS_ERR(vma->node))
+ ret = PTR_ERR(vma->node);
-out_unlock:
- mutex_unlock(&ggtt->lock);
-out:
xe_pm_runtime_put(xe);
return ret;
}
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 59334aa06a020..42e3caa3a6d9c 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -623,19 +623,7 @@ void xe_ggtt_shift_nodes_locked(struct xe_ggtt *ggtt, s64 shift)
}
}
-/**
- * xe_ggtt_node_insert_locked - Locked version to insert a &xe_ggtt_node into the GGTT
- * @node: the &xe_ggtt_node to be inserted
- * @size: size of the node
- * @align: alignment constrain of the node
- * @mm_flags: flags to control the node behavior
- *
- * It cannot be called without first having called xe_ggtt_init() once.
- * To be used in cases where ggtt->lock is already taken.
- *
- * Return: 0 on success or a negative error code on failure.
- */
-int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node,
+static int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node,
u32 size, u32 align, u32 mm_flags)
{
return drm_mm_insert_node_generic(&node->ggtt->mm, &node->base, size, align, 0,
@@ -674,9 +662,11 @@ int xe_ggtt_node_insert(struct xe_ggtt_node *node, u32 size, u32 align)
* This function will allocate the struct %xe_ggtt_node and return its pointer.
* This struct will then be freed after the node removal upon xe_ggtt_node_remove()
* or xe_ggtt_node_remove_balloon_locked().
- * Having %xe_ggtt_node struct allocated doesn't mean that the node is already allocated
- * in GGTT. Only the xe_ggtt_node_insert(), xe_ggtt_node_insert_locked(),
- * xe_ggtt_node_insert_balloon_locked() will ensure the node is inserted or reserved in GGTT.
+ *
+ * Having %xe_ggtt_node struct allocated doesn't mean that the node is already
+ * allocated in GGTT. Only xe_ggtt_node_insert(), allocation through
+ * xe_ggtt_node_insert_transform(), or xe_ggtt_node_insert_balloon_locked() will ensure the node is inserted or reserved
+ * in GGTT.
*
* Return: A pointer to %xe_ggtt_node struct on success. An ERR_PTR otherwise.
**/
@@ -725,13 +715,12 @@ bool xe_ggtt_node_allocated(const struct xe_ggtt_node *node)
* @ggtt: the &xe_ggtt where node will be mapped
* @node: the &xe_ggtt_node where this BO is mapped
* @bo: the &xe_bo to be mapped
- * @pat_index: Which pat_index to use.
+ * @pte: The pte flags to append.
*/
-void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
- struct xe_bo *bo, u16 pat_index)
+static void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
+ struct xe_bo *bo, u64 pte)
{
-
- u64 start, pte, end;
+ u64 start, end;
struct xe_res_cursor cur;
if (XE_WARN_ON(!node))
@@ -740,7 +729,6 @@ void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
start = node->base.start;
end = start + xe_bo_size(bo);
- pte = ggtt->pt_ops->pte_encode_flags(bo, pat_index);
if (!xe_bo_is_vram(bo) && !xe_bo_is_stolen(bo)) {
xe_assert(xe_bo_device(bo), bo->ttm.ttm);
@@ -770,10 +758,63 @@ void xe_ggtt_map_bo_unlocked(struct xe_ggtt *ggtt, struct xe_bo *bo)
{
u16 cache_mode = bo->flags & XE_BO_FLAG_NEEDS_UC ? XE_CACHE_NONE : XE_CACHE_WB;
u16 pat_index = tile_to_xe(ggtt->tile)->pat.idx[cache_mode];
+ u64 pte;
mutex_lock(&ggtt->lock);
- xe_ggtt_map_bo(ggtt, bo->ggtt_node[ggtt->tile->id], bo, pat_index);
+ pte = ggtt->pt_ops->pte_encode_flags(bo, pat_index);
+ xe_ggtt_map_bo(ggtt, bo->ggtt_node[ggtt->tile->id], bo, pte);
+ mutex_unlock(&ggtt->lock);
+}
+
+/**
+ * xe_ggtt_node_insert_transform - Insert a newly allocated &xe_ggtt_node into the GGTT
+ * @ggtt: the &xe_ggtt where the node will inserted/reserved.
+ * @bo: The bo to be transformed
+ * @pte_flags: The extra GGTT flags to add to mapping.
+ * @size: size of the node
+ * @align: required alignment for node
+ * @transform: transformation function that will populate the GGTT node, or NULL for linear mapping.
+ * @arg: Extra argument to pass to the transformation function.
+ *
+ * This function allows inserting a GGTT node with a custom transformation function.
+ * This is useful for display to allow inserting rotated framebuffers to GGTT.
+ *
+ * Return: A pointer to %xe_ggtt_node struct on success. An ERR_PTR otherwise.
+ */
+struct xe_ggtt_node *xe_ggtt_node_insert_transform(struct xe_ggtt *ggtt,
+ struct xe_bo *bo, u64 pte_flags,
+ u64 size, u32 align,
+ xe_ggtt_transform_cb transform, void *arg)
+{
+ struct xe_ggtt_node *node;
+ int ret;
+
+ node = xe_ggtt_node_init(ggtt);
+ if (IS_ERR(node))
+ return ERR_CAST(node);
+
+ if (mutex_lock_interruptible(&ggtt->lock) < 0) {
+ ret = -ERESTARTSYS;
+ goto err;
+ }
+
+ ret = xe_ggtt_node_insert_locked(node, size, align, 0);
+ if (ret)
+ goto err_unlock;
+
+ if (transform)
+ transform(ggtt, node, pte_flags, ggtt->pt_ops->ggtt_set_pte, arg);
+ else
+ xe_ggtt_map_bo(ggtt, node, bo, pte_flags);
+
mutex_unlock(&ggtt->lock);
+ return node;
+
+err_unlock:
+ mutex_unlock(&ggtt->lock);
+err:
+ xe_ggtt_node_fini(node);
+ return ERR_PTR(ret);
}
static int __xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
@@ -814,8 +855,9 @@ static int __xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
} else {
u16 cache_mode = bo->flags & XE_BO_FLAG_NEEDS_UC ? XE_CACHE_NONE : XE_CACHE_WB;
u16 pat_index = tile_to_xe(ggtt->tile)->pat.idx[cache_mode];
+ u64 pte = ggtt->pt_ops->pte_encode_flags(bo, pat_index);
- xe_ggtt_map_bo(ggtt, bo->ggtt_node[tile_id], bo, pat_index);
+ xe_ggtt_map_bo(ggtt, bo->ggtt_node[tile_id], bo, pte);
}
mutex_unlock(&ggtt->lock);
diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
index 6482bddb2ef36..d54a2ae2b4aa8 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.h
+++ b/drivers/gpu/drm/xe/xe_ggtt.h
@@ -27,12 +27,13 @@ u64 xe_ggtt_start(struct xe_ggtt *ggtt);
u64 xe_ggtt_size(struct xe_ggtt *ggtt);
int xe_ggtt_node_insert(struct xe_ggtt_node *node, u32 size, u32 align);
-int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node,
- u32 size, u32 align, u32 mm_flags);
+struct xe_ggtt_node *
+xe_ggtt_node_insert_transform(struct xe_ggtt *ggtt,
+ struct xe_bo *bo, u64 pte,
+ u64 size, u32 align,
+ xe_ggtt_transform_cb transform, void *arg);
void xe_ggtt_node_remove(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_ggtt_node *node,
- struct xe_bo *bo, u16 pat_index);
void xe_ggtt_map_bo_unlocked(struct xe_ggtt *ggtt, struct xe_bo *bo);
int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo, struct drm_exec *exec);
int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
diff --git a/drivers/gpu/drm/xe/xe_ggtt_types.h b/drivers/gpu/drm/xe/xe_ggtt_types.h
index a27919302d6b2..f4aa5671cb3e3 100644
--- a/drivers/gpu/drm/xe/xe_ggtt_types.h
+++ b/drivers/gpu/drm/xe/xe_ggtt_types.h
@@ -71,6 +71,11 @@ struct xe_ggtt_node {
bool invalidate_on_remove;
};
+typedef void (*xe_ggtt_set_pte_fn)(struct xe_ggtt *ggtt, u64 addr, u64 pte);
+typedef void (*xe_ggtt_transform_cb)(struct xe_ggtt *ggtt,
+ struct xe_ggtt_node *node,
+ u64 pte_flags,
+ xe_ggtt_set_pte_fn set_pte, void *arg);
/**
* struct xe_ggtt_pt_ops - GGTT Page table operations
* Which can vary from platform to platform.
@@ -78,8 +83,9 @@ struct xe_ggtt_node {
struct xe_ggtt_pt_ops {
/** @pte_encode_flags: Encode PTE flags for a given BO */
u64 (*pte_encode_flags)(struct xe_bo *bo, u16 pat_index);
+
/** @ggtt_set_pte: Directly write into GGTT's PTE */
- void (*ggtt_set_pte)(struct xe_ggtt *ggtt, u64 addr, u64 pte);
+ xe_ggtt_set_pte_fn ggtt_set_pte;
};
#endif
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 1/7] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 2/7] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 13:15 ` Michal Wajdeczko
2025-10-21 12:18 ` [PATCH 4/7] drm/xe/display: Avoid " Maarten Lankhorst
` (5 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst
This function makes it possible to add an offset that is applied to
all xe_ggtt_node's, and hides the internals from all its users.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/xe_bo.h | 8 +++++---
drivers/gpu/drm/xe/xe_ggtt.c | 11 +++++++++++
drivers/gpu/drm/xe/xe_ggtt.h | 2 ++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 911d5b90461a2..9c3f0ebaa1554 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -9,6 +9,7 @@
#include <drm/ttm/ttm_tt.h>
#include "xe_bo_types.h"
+#include "xe_ggtt.h"
#include "xe_macros.h"
#include "xe_validation.h"
#include "xe_vm_types.h"
@@ -251,13 +252,14 @@ static inline u32
__xe_bo_ggtt_addr(struct xe_bo *bo, u8 tile_id)
{
struct xe_ggtt_node *ggtt_node = bo->ggtt_node[tile_id];
+ u64 offset;
if (XE_WARN_ON(!ggtt_node))
return 0;
- XE_WARN_ON(ggtt_node->base.size > xe_bo_size(bo));
- XE_WARN_ON(ggtt_node->base.start + ggtt_node->base.size > (1ull << 32));
- return ggtt_node->base.start;
+ offset = xe_ggtt_node_addr(ggtt_node);
+ XE_WARN_ON(offset + xe_bo_size(bo) > (1ull << 32));
+ return offset;
}
static inline u32
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 42e3caa3a6d9c..05515037e2d6a 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -1079,3 +1079,14 @@ u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset)
{
return ioread64(ggtt->gsm + (offset / XE_PAGE_SIZE));
}
+
+/**
+ * xe_ggtt_node_addr - Get @node offset in GGTT.
+ * @node: &xe_ggtt_node
+ *
+ * Get the GGTT offset for allocated node.
+ */
+u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node)
+{
+ return node->base.start;
+}
diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
index d54a2ae2b4aa8..4a8ef1b824156 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.h
+++ b/drivers/gpu/drm/xe/xe_ggtt.h
@@ -58,4 +58,6 @@ void xe_ggtt_might_lock(struct xe_ggtt *ggtt);
u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_index);
u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset);
+u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node);
+
#endif
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/7] drm/xe/display: Avoid dereferencing xe_ggtt_node
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (2 preceding siblings ...)
2025-10-21 12:18 ` [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 5/7] drm/xe: Do not dereference ggtt_node in xe_bo.c Maarten Lankhorst
` (4 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst, Matthew Brost
Start using xe_ggtt_node_addr, and avoid comparing the base offset
as vma->node is dynamically allocated.
Also sneak in a xe_bo_size() for stolen, too small to put as separate commit.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
| 4 ++--
drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 ++--
drivers/gpu/drm/xe/display/xe_stolen.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--git a/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h
index 4465c40f81341..1c599963169a0 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h
@@ -8,7 +8,7 @@
#include <uapi/drm/i915_drm.h>
-#include "xe_ggtt_types.h"
+#include "xe_ggtt.h"
#include <linux/refcount.h>
@@ -32,7 +32,7 @@ struct i915_vma {
static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
{
- return vma->node->base.start;
+ return xe_ggtt_node_addr(vma->node);
}
#endif
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index d2e4903de0977..784d2db5fd0db 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -206,7 +206,7 @@ static void write_ggtt_rotated_node(struct xe_ggtt *ggtt, struct xe_ggtt_node *n
struct fb_rotate_args *args = data;
struct xe_bo *bo = args->bo;
const struct intel_rotation_info *rot_info = &args->view->rotated;
- u32 ggtt_ofs = node->base.start;
+ u32 ggtt_ofs = xe_ggtt_node_addr(node);
for (u32 i = 0; i < ARRAY_SIZE(rot_info->plane); i++)
write_ggtt_rotated(ggtt, &ggtt_ofs, pte_flags, write_pte,
@@ -351,7 +351,7 @@ 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[tile_id]) ||
- vma->bo->ggtt_node[tile_id]->base.start != vma->node->base.start)
+ vma->bo->ggtt_node[tile_id] != vma->node)
xe_ggtt_node_remove(vma->node, false);
ttm_bo_reserve(&vma->bo->ttm, false, false, NULL);
diff --git a/drivers/gpu/drm/xe/display/xe_stolen.c b/drivers/gpu/drm/xe/display/xe_stolen.c
index 9f04ba36e930b..ef5ef5aa8d847 100644
--- a/drivers/gpu/drm/xe/display/xe_stolen.c
+++ b/drivers/gpu/drm/xe/display/xe_stolen.c
@@ -100,7 +100,7 @@ u64 i915_gem_stolen_node_address(struct intel_stolen_node *node)
u64 i915_gem_stolen_node_size(const struct intel_stolen_node *node)
{
- return node->bo->ttm.base.size;
+ return xe_bo_size(node->bo);
}
struct intel_stolen_node *i915_gem_stolen_node_alloc(struct drm_device *drm)
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/7] drm/xe: Do not dereference ggtt_node in xe_bo.c
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (3 preceding siblings ...)
2025-10-21 12:18 ` [PATCH 4/7] drm/xe/display: Avoid " Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling Maarten Lankhorst
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst
A careful inspection of __xe_ggtt_insert_bo_at() shows that
the ggtt_node can always be seen as inserted from xe_bo.c
due to the way error handling is performed.
The checks are also a little bit too paranoid, since we
never create a bo with ggtt_node[id] initialised but not
inserted into the GGTT, which can be seen by looking at
__xe_ggtt_insert_bo_at()
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/xe_bo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index cbc3ee1572188..451a772f68648 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1717,7 +1717,7 @@ static void xe_ttm_bo_destroy(struct ttm_buffer_object *ttm_bo)
xe_assert(xe, list_empty(&ttm_bo->base.gpuva.list));
for_each_tile(tile, xe, id)
- if (bo->ggtt_node[id] && bo->ggtt_node[id]->base.size)
+ if (bo->ggtt_node[id])
xe_ggtt_remove_bo(tile->mem.ggtt, bo);
#ifdef CONFIG_PROC_FS
@@ -3598,8 +3598,8 @@ void xe_bo_put(struct xe_bo *bo)
might_lock(&bo->client->bos_lock);
#endif
for_each_tile(tile, xe_bo_device(bo), id)
- if (bo->ggtt_node[id] && bo->ggtt_node[id]->ggtt)
- xe_ggtt_might_lock(bo->ggtt_node[id]->ggtt);
+ if (bo->ggtt_node[id])
+ xe_ggtt_might_lock(tile->mem.ggtt);
drm_gem_object_put(&bo->ttm.base);
}
}
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (4 preceding siblings ...)
2025-10-21 12:18 ` [PATCH 5/7] drm/xe: Do not dereference ggtt_node in xe_bo.c Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 12:46 ` Michal Wajdeczko
2025-10-21 12:18 ` [PATCH 7/7] drm/xe: Privatize xe_ggtt_node Maarten Lankhorst
` (2 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst, Matthew.brost
Do not directly dereference xe_ggtt_node, and add
a function to retrieve the allocated GGTT size.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: <Matthew.brost@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
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 | 15 ++++++++-------
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 05515037e2d6a..81038d94b497d 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -1090,3 +1090,14 @@ u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node)
{
return node->base.start;
}
+
+/**
+ * xe_ggtt_node_size - Get @node allocation size.
+ * @node: &xe_ggtt_node
+ *
+ * Get the allocated node's size.
+ */
+u64 xe_ggtt_node_size(const struct xe_ggtt_node *node)
+{
+ return node->base.size;
+}
diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
index 4a8ef1b824156..b69f05a6adbf8 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.h
+++ b/drivers/gpu/drm/xe/xe_ggtt.h
@@ -59,5 +59,6 @@ u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_ind
u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset);
u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node);
+u64 xe_ggtt_node_size(const struct xe_ggtt_node *node);
#endif
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index f96f96425c2ec..19d1013d0c4c8 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -264,7 +264,7 @@ static u32 encode_config_ggtt(u32 *cfg, const struct xe_gt_sriov_config *config,
if (!xe_ggtt_node_allocated(node))
return 0;
- return encode_ggtt(cfg, node->base.start, node->base.size, details);
+ return encode_ggtt(cfg, xe_ggtt_node_addr(node), xe_ggtt_node_size(node), details);
}
/* Return: number of configuration dwords written */
@@ -495,9 +495,9 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
xe_ggtt_assign(node, vfid);
xe_gt_sriov_dbg_verbose(gt, "VF%u assigned GGTT %llx-%llx\n",
- vfid, node->base.start, node->base.start + node->base.size - 1);
+ vfid, xe_ggtt_node_addr(node), xe_ggtt_node_addr(node) + size - 1);
- err = pf_distribute_config_ggtt(gt->tile, vfid, node->base.start, node->base.size);
+ err = pf_distribute_config_ggtt(gt->tile, vfid, xe_ggtt_node_addr(node), size);
if (unlikely(err))
goto err;
@@ -514,7 +514,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_main_type(gt));
- return xe_ggtt_node_allocated(node) ? node->base.size : 0;
+ return xe_ggtt_node_allocated(node) ? xe_ggtt_node_size(node) : 0;
}
/**
@@ -2517,11 +2517,12 @@ int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p)
if (!xe_ggtt_node_allocated(config->ggtt_region))
continue;
- string_get_size(config->ggtt_region->base.size, 1, STRING_UNITS_2,
+ string_get_size(xe_ggtt_node_size(config->ggtt_region), 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,
+ n, xe_ggtt_node_addr(config->ggtt_region),
+ xe_ggtt_node_addr(config->ggtt_region) +
+ xe_ggtt_node_size(config->ggtt_region) - 1,
buf);
}
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/7] drm/xe: Privatize xe_ggtt_node
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (5 preceding siblings ...)
2025-10-21 12:18 ` [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling Maarten Lankhorst
@ 2025-10-21 12:18 ` Maarten Lankhorst
2025-10-21 13:49 ` ✗ CI.checkpatch: warning for drm/xe: Privatize struct xe_ggtt_node Patchwork
2025-10-21 13:50 ` ✗ CI.KUnit: failure " Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 12:18 UTC (permalink / raw)
To: intel-xe; +Cc: Maarten Lankhorst, Matthew Brost
Nothing requires it any more, make the member private.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/xe_ggtt.c | 18 ++++++++++++++++++
drivers/gpu/drm/xe/xe_ggtt_types.h | 19 +------------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 81038d94b497d..5c1880da3ffa4 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -34,6 +34,24 @@
#include "xe_wa.h"
#include "xe_wopcm.h"
+/**
+ * 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;
+ /** @delayed_removal_work: The work struct for the delayed removal */
+ struct work_struct delayed_removal_work;
+ /** @invalidate_on_remove: If it needs invalidation upon removal */
+ bool invalidate_on_remove;
+};
+
/**
* DOC: Global Graphics Translation Table (GGTT)
*
diff --git a/drivers/gpu/drm/xe/xe_ggtt_types.h b/drivers/gpu/drm/xe/xe_ggtt_types.h
index f4aa5671cb3e3..31054e00daa6b 100644
--- a/drivers/gpu/drm/xe/xe_ggtt_types.h
+++ b/drivers/gpu/drm/xe/xe_ggtt_types.h
@@ -11,6 +11,7 @@
#include "xe_pt_types.h"
struct xe_bo;
+struct xe_ggtt_node;
struct xe_gt;
/**
@@ -53,24 +54,6 @@ struct xe_ggtt {
struct workqueue_struct *wq;
};
-/**
- * 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;
- /** @delayed_removal_work: The work struct for the delayed removal */
- struct work_struct delayed_removal_work;
- /** @invalidate_on_remove: If it needs invalidation upon removal */
- bool invalidate_on_remove;
-};
-
typedef void (*xe_ggtt_set_pte_fn)(struct xe_ggtt *ggtt, u64 addr, u64 pte);
typedef void (*xe_ggtt_transform_cb)(struct xe_ggtt *ggtt,
struct xe_ggtt_node *node,
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling
2025-10-21 12:18 ` [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling Maarten Lankhorst
@ 2025-10-21 12:46 ` Michal Wajdeczko
0 siblings, 0 replies; 13+ messages in thread
From: Michal Wajdeczko @ 2025-10-21 12:46 UTC (permalink / raw)
To: Maarten Lankhorst, intel-xe; +Cc: Matthew.brost
On 10/21/2025 2:18 PM, Maarten Lankhorst wrote:
> Do not directly dereference xe_ggtt_node, and add
> a function to retrieve the allocated GGTT size.
>
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
> Reviewed-by: <Matthew.brost@intel.com>
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
double s-o-b
> ---
> 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 | 15 ++++++++-------
> 3 files changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 05515037e2d6a..81038d94b497d 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -1090,3 +1090,14 @@ u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node)
> {
> return node->base.start;
> }
> +
> +/**
> + * xe_ggtt_node_size - Get @node allocation size.
> + * @node: &xe_ggtt_node
> + *
> + * Get the allocated node's size.
* Return: ...
> + */
> +u64 xe_ggtt_node_size(const struct xe_ggtt_node *node)
> +{
> + return node->base.size;
> +}
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
> index 4a8ef1b824156..b69f05a6adbf8 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.h
> +++ b/drivers/gpu/drm/xe/xe_ggtt.h
> @@ -59,5 +59,6 @@ u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_ind
> u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset);
>
> u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node);
> +u64 xe_ggtt_node_size(const struct xe_ggtt_node *node);
>
> #endif
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> index f96f96425c2ec..19d1013d0c4c8 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> @@ -264,7 +264,7 @@ static u32 encode_config_ggtt(u32 *cfg, const struct xe_gt_sriov_config *config,
> if (!xe_ggtt_node_allocated(node))
> return 0;
>
> - return encode_ggtt(cfg, node->base.start, node->base.size, details);
> + return encode_ggtt(cfg, xe_ggtt_node_addr(node), xe_ggtt_node_size(node), details);
> }
>
> /* Return: number of configuration dwords written */
> @@ -495,9 +495,9 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
>
> xe_ggtt_assign(node, vfid);
> xe_gt_sriov_dbg_verbose(gt, "VF%u assigned GGTT %llx-%llx\n",
> - vfid, node->base.start, node->base.start + node->base.size - 1);
> + vfid, xe_ggtt_node_addr(node), xe_ggtt_node_addr(node) + size - 1);
>
> - err = pf_distribute_config_ggtt(gt->tile, vfid, node->base.start, node->base.size);
> + err = pf_distribute_config_ggtt(gt->tile, vfid, xe_ggtt_node_addr(node), size);
> if (unlikely(err))
> goto err;
>
> @@ -514,7 +514,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_main_type(gt));
> - return xe_ggtt_node_allocated(node) ? node->base.size : 0;
> + return xe_ggtt_node_allocated(node) ? xe_ggtt_node_size(node) : 0;
> }
>
> /**
> @@ -2517,11 +2517,12 @@ int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p)
> if (!xe_ggtt_node_allocated(config->ggtt_region))
> continue;
>
> - string_get_size(config->ggtt_region->base.size, 1, STRING_UNITS_2,
> + string_get_size(xe_ggtt_node_size(config->ggtt_region), 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,
> + n, xe_ggtt_node_addr(config->ggtt_region),
> + xe_ggtt_node_addr(config->ggtt_region) +
> + xe_ggtt_node_size(config->ggtt_region) - 1,
> buf);
> }
>
just nits, so
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
2025-10-21 12:18 ` [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node Maarten Lankhorst
@ 2025-10-21 13:15 ` Michal Wajdeczko
2025-10-21 13:48 ` Maarten Lankhorst
0 siblings, 1 reply; 13+ messages in thread
From: Michal Wajdeczko @ 2025-10-21 13:15 UTC (permalink / raw)
To: Maarten Lankhorst, intel-xe
On 10/21/2025 2:18 PM, Maarten Lankhorst wrote:
> This function makes it possible to add an offset that is applied to
> all xe_ggtt_node's, and hides the internals from all its users.
>
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
> ---
> drivers/gpu/drm/xe/xe_bo.h | 8 +++++---
> drivers/gpu/drm/xe/xe_ggtt.c | 11 +++++++++++
> drivers/gpu/drm/xe/xe_ggtt.h | 2 ++
> 3 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
> index 911d5b90461a2..9c3f0ebaa1554 100644
> --- a/drivers/gpu/drm/xe/xe_bo.h
> +++ b/drivers/gpu/drm/xe/xe_bo.h
> @@ -9,6 +9,7 @@
> #include <drm/ttm/ttm_tt.h>
>
> #include "xe_bo_types.h"
> +#include "xe_ggtt.h"
> #include "xe_macros.h"
> #include "xe_validation.h"
> #include "xe_vm_types.h"
> @@ -251,13 +252,14 @@ static inline u32
> __xe_bo_ggtt_addr(struct xe_bo *bo, u8 tile_id)
> {
> struct xe_ggtt_node *ggtt_node = bo->ggtt_node[tile_id];
> + u64 offset;
>
> if (XE_WARN_ON(!ggtt_node))
> return 0;
>
> - XE_WARN_ON(ggtt_node->base.size > xe_bo_size(bo));
> - XE_WARN_ON(ggtt_node->base.start + ggtt_node->base.size > (1ull << 32));
> - return ggtt_node->base.start;
> + offset = xe_ggtt_node_addr(ggtt_node);
> + XE_WARN_ON(offset + xe_bo_size(bo) > (1ull << 32));
maybe better to use U32_MAX and convert to:
xe_assert(xe_bo_device(bo), offset + xe_bo_size(bo) <= U32_MAX);
or at least to xe-oriented:
xe_WARN_ON(xe_bo_device(bo), offset + xe_bo_size(bo) > U32_MAX);
and what about checking bo_size vs node_size ?
> + return offset;
> }
>
> static inline u32
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 42e3caa3a6d9c..05515037e2d6a 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -1079,3 +1079,14 @@ u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset)
> {
> return ioread64(ggtt->gsm + (offset / XE_PAGE_SIZE));
> }
> +
> +/**
> + * xe_ggtt_node_addr - Get @node offset in GGTT.
> + * @node: &xe_ggtt_node
> + *
> + * Get the GGTT offset for allocated node.
> + */
> +u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node)
> +{
we can also have here:
xe_ggtt_assert_fit(node->ggtt, node->base.start, node->base.size);
> + return node->base.start;
> +}
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
> index d54a2ae2b4aa8..4a8ef1b824156 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.h
> +++ b/drivers/gpu/drm/xe/xe_ggtt.h
> @@ -58,4 +58,6 @@ void xe_ggtt_might_lock(struct xe_ggtt *ggtt);
> u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_index);
> u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset);
>
> +u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node);
nit: shouldn't we keep "node" related functions together ?
> +
> #endif
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
2025-10-21 13:15 ` Michal Wajdeczko
@ 2025-10-21 13:48 ` Maarten Lankhorst
0 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2025-10-21 13:48 UTC (permalink / raw)
To: Michal Wajdeczko, intel-xe
Den 2025-10-21 kl. 15:15, skrev Michal Wajdeczko:
>
>
> On 10/21/2025 2:18 PM, Maarten Lankhorst wrote:
>> This function makes it possible to add an offset that is applied to
>> all xe_ggtt_node's, and hides the internals from all its users.
>>
>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>> ---
>> drivers/gpu/drm/xe/xe_bo.h | 8 +++++---
>> drivers/gpu/drm/xe/xe_ggtt.c | 11 +++++++++++
>> drivers/gpu/drm/xe/xe_ggtt.h | 2 ++
>> 3 files changed, 18 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
>> index 911d5b90461a2..9c3f0ebaa1554 100644
>> --- a/drivers/gpu/drm/xe/xe_bo.h
>> +++ b/drivers/gpu/drm/xe/xe_bo.h
>> @@ -9,6 +9,7 @@
>> #include <drm/ttm/ttm_tt.h>
>>
>> #include "xe_bo_types.h"
>> +#include "xe_ggtt.h"
>> #include "xe_macros.h"
>> #include "xe_validation.h"
>> #include "xe_vm_types.h"
>> @@ -251,13 +252,14 @@ static inline u32
>> __xe_bo_ggtt_addr(struct xe_bo *bo, u8 tile_id)
>> {
>> struct xe_ggtt_node *ggtt_node = bo->ggtt_node[tile_id];
>> + u64 offset;
>>
>> if (XE_WARN_ON(!ggtt_node))
>> return 0;
>>
>> - XE_WARN_ON(ggtt_node->base.size > xe_bo_size(bo));
>> - XE_WARN_ON(ggtt_node->base.start + ggtt_node->base.size > (1ull << 32));
>> - return ggtt_node->base.start;
>> + offset = xe_ggtt_node_addr(ggtt_node);
>> + XE_WARN_ON(offset + xe_bo_size(bo) > (1ull << 32));
>
> maybe better to use U32_MAX and convert to:
SZ_4G sounds good.
> xe_assert(xe_bo_device(bo), offset + xe_bo_size(bo) <= U32_MAX);
>
> or at least to xe-oriented:
>
> xe_WARN_ON(xe_bo_device(bo), offset + xe_bo_size(bo) > U32_MAX);
>
> and what about checking bo_size vs node_size ?
>
>> + return offset;
>> }
>>
>> static inline u32
>> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
>> index 42e3caa3a6d9c..05515037e2d6a 100644
>> --- a/drivers/gpu/drm/xe/xe_ggtt.c
>> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
>> @@ -1079,3 +1079,14 @@ u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset)
>> {
>> return ioread64(ggtt->gsm + (offset / XE_PAGE_SIZE));
>> }
>> +
>> +/**
>> + * xe_ggtt_node_addr - Get @node offset in GGTT.
>> + * @node: &xe_ggtt_node
>> + *
>> + * Get the GGTT offset for allocated node.
>> + */
>> +u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node)
>> +{
>
> we can also have here:
>
> xe_ggtt_assert_fit(node->ggtt, node->base.start, node->base.size);
>
>> + return node->base.start;
>> +}
As much as I love error checking, error checking here is too late. We never allocate more than a 4G sized GGTT, so all we need to ensure is to have a single warning in xe_ggtt_shift_nodes that shifted start + size <= SZ_4G after the full series.
I think this is the wrong place to put any error checking at all, any assertions should be triggered in xe_ggtt_init_early() or xe_ggtt_shift_nodes(). In the former we can bomb out in case of invalid parameters.
Kind regards,
~Maarten Lankhorst
>> diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
>> index d54a2ae2b4aa8..4a8ef1b824156 100644
>> --- a/drivers/gpu/drm/xe/xe_ggtt.h
>> +++ b/drivers/gpu/drm/xe/xe_ggtt.h
>> @@ -58,4 +58,6 @@ void xe_ggtt_might_lock(struct xe_ggtt *ggtt);
>> u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_index);
>> u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset);
>>
>> +u64 xe_ggtt_node_addr(const struct xe_ggtt_node *node);
>
> nit: shouldn't we keep "node" related functions together ?
>
>> +
>> #endif
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ CI.checkpatch: warning for drm/xe: Privatize struct xe_ggtt_node.
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (6 preceding siblings ...)
2025-10-21 12:18 ` [PATCH 7/7] drm/xe: Privatize xe_ggtt_node Maarten Lankhorst
@ 2025-10-21 13:49 ` Patchwork
2025-10-21 13:50 ` ✗ CI.KUnit: failure " Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2025-10-21 13:49 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-xe
== Series Details ==
Series: drm/xe: Privatize struct xe_ggtt_node.
URL : https://patchwork.freedesktop.org/series/156258/
State : warning
== 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
8677d3b99d5fd579c143b22605d99121e2482e8a
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 637e845a6d4be33d9246678a8816b4e3a388e865
Author: Maarten Lankhorst <dev@lankhorst.se>
Date: Tue Oct 21 14:18:21 2025 +0200
drm/xe: Privatize xe_ggtt_node
Nothing requires it any more, make the member private.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
+ /mt/dim checkpatch 5b93624944844e355037231c08ee088d33b4cf3b drm-intel
aa6499207b84 drm/xe: Start using ggtt->start in preparation of balloon removal
-:102: CHECK:SPACING: No space is necessary after a cast
#102: FILE: drivers/gpu/drm/xe/xe_ggtt.c:320:
+ ggtt_size = (gsm_size / 8) * (u64) XE_PAGE_SIZE - ggtt_start;
total: 0 errors, 0 warnings, 1 checks, 179 lines checked
e6012d21f21a drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT
-:195: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#195: FILE: drivers/gpu/drm/xe/xe_ggtt.c:627:
+static int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node,
u32 size, u32 align, u32 mm_flags)
-:208: WARNING:LONG_LINE_COMMENT: line length of 120 exceeds 100 columns
#208: FILE: drivers/gpu/drm/xe/xe_ggtt.c:668:
+ * xe_ggtt_node_insert_transform(), or xe_ggtt_node_insert_balloon_locked() will ensure the node is inserted or reserved
total: 0 errors, 1 warnings, 1 checks, 317 lines checked
3ed7ecc2f11f drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
44cfb77b36a0 drm/xe/display: Avoid dereferencing xe_ggtt_node
-:9: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#9:
Also sneak in a xe_bo_size() for stolen, too small to put as separate commit.
-:13: WARNING:BAD_SIGN_OFF: Duplicate signature
#13:
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
total: 0 errors, 2 warnings, 0 checks, 40 lines checked
068765adeabd drm/xe: Do not dereference ggtt_node in xe_bo.c
b507fa1c66ee drm/xe: Improve xe_gt_sriov_pf_config GGTT handling
-:11: WARNING:BAD_SIGN_OFF: Duplicate signature
#11:
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
total: 0 errors, 1 warnings, 0 checks, 62 lines checked
637e845a6d4b drm/xe: Privatize xe_ggtt_node
-:10: WARNING:BAD_SIGN_OFF: Duplicate signature
#10:
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
total: 0 errors, 1 warnings, 0 checks, 55 lines checked
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ CI.KUnit: failure for drm/xe: Privatize struct xe_ggtt_node.
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
` (7 preceding siblings ...)
2025-10-21 13:49 ` ✗ CI.checkpatch: warning for drm/xe: Privatize struct xe_ggtt_node Patchwork
@ 2025-10-21 13:50 ` Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2025-10-21 13:50 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-xe
== Series Details ==
Series: drm/xe: Privatize struct xe_ggtt_node.
URL : https://patchwork.freedesktop.org/series/156258/
State : failure
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[13:49:16] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[13:49:20] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[13:49:57] Starting KUnit Kernel (1/1)...
[13:49:57] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[13:49:58] ================== guc_buf (11 subtests) ===================
[13:49:58] stackdepot: allocating hash table of 65536 entries via kvcalloc
[13:49:58] stackdepot: allocating space for 8192 stack pools via kvcalloc
[13:49:58] # test_smallest: EXPECTATION FAILED at drivers/gpu/drm/xe/tests/xe_guc_buf_kunit.c:91
[13:49:58] Expected 0x00100000 + 0x00200000 > xe_guc_buf_gpu_addr(buf), but
[13:49:58] 0x00100000 + 0x00200000 == 3145728 (0x300000)
[13:49:58] xe_guc_buf_gpu_addr(buf) == 4186112 (0x3fe000)
[13:49:58] [FAILED] test_smallest
[13:49:58] # test_largest: EXPECTATION FAILED at drivers/gpu/drm/xe/tests/xe_guc_buf_kunit.c:105
[13:49:58] Expected 0x00100000 + 0x00200000 > xe_guc_buf_gpu_addr(buf), but
[13:49:58] 0x00100000 + 0x00200000 == 3145728 (0x300000)
[13:49:58] xe_guc_buf_gpu_addr(buf) == 4186112 (0x3fe000)
[13:49:58] [FAILED] test_largest
[13:49:58] [PASSED] test_granular
[13:49:58] [PASSED] test_unique
[13:49:58] [PASSED] test_overlap
[13:49:58] [PASSED] test_reusable
[13:49:58] [PASSED] test_too_big
[13:49:58] [PASSED] test_flush
[13:49:58] [PASSED] test_lookup
[13:49:58] [PASSED] test_data
[13:49:58] # test_class: EXPECTATION FAILED at drivers/gpu/drm/xe/tests/xe_guc_buf_kunit.c:299
[13:49:58] Expected 0x00100000 + 0x00200000 > xe_guc_buf_gpu_addr(buf), but
[13:49:58] 0x00100000 + 0x00200000 == 3145728 (0x300000)
[13:49:58] xe_guc_buf_gpu_addr(buf) == 4186112 (0x3fe000)
[13:49:58] # test_class: EXPECTATION FAILED at drivers/gpu/drm/xe/tests/xe_guc_buf_kunit.c:308
[13:49:58] Expected 0x00100000 + 0x00200000 > xe_guc_buf_gpu_addr(buf), but
[13:49:58] 0x00100000 + 0x00200000 == 3145728 (0x300000)
[13:49:58] xe_guc_buf_gpu_addr(buf) == 4186112 (0x3fe000)
[13:49:58] [FAILED] test_class
[13:49:58] # module: xe
[13:49:58] # guc_buf: pass:8 fail:3 skip:0 total:11
[13:49:58] # Totals: pass:8 fail:3 skip:0 total:11
[13:49:58] ===================== [FAILED] guc_buf =====================
[13:49:58] =================== guc_dbm (7 subtests) ===================
[13:49:58] [PASSED] test_empty
[13:49:58] [PASSED] test_default
[13:49:58] ======================== test_size ========================
[13:49:58] [PASSED] 4
[13:49:58] [PASSED] 8
[13:49:58] [PASSED] 32
[13:49:58] [PASSED] 256
[13:49:58] ==================== [PASSED] test_size ====================
[13:49:58] ======================= test_reuse ========================
[13:49:58] [PASSED] 4
[13:49:58] [PASSED] 8
[13:49:58] [PASSED] 32
[13:49:58] [PASSED] 256
[13:49:58] =================== [PASSED] test_reuse ====================
[13:49:58] =================== test_range_overlap ====================
[13:49:58] [PASSED] 4
[13:49:58] [PASSED] 8
[13:49:58] [PASSED] 32
[13:49:58] [PASSED] 256
[13:49:58] =============== [PASSED] test_range_overlap ================
[13:49:58] =================== test_range_compact ====================
[13:49:58] [PASSED] 4
[13:49:58] [PASSED] 8
[13:49:58] [PASSED] 32
[13:49:58] [PASSED] 256
[13:49:58] =============== [PASSED] test_range_compact ================
[13:49:58] ==================== test_range_spare =====================
[13:49:58] [PASSED] 4
[13:49:58] [PASSED] 8
[13:49:58] [PASSED] 32
[13:49:58] [PASSED] 256
[13:49:58] ================ [PASSED] test_range_spare =================
[13:49:58] ===================== [PASSED] guc_dbm =====================
[13:49:58] =================== guc_idm (6 subtests) ===================
[13:49:58] [PASSED] bad_init
[13:49:58] [PASSED] no_init
[13:49:58] [PASSED] init_fini
[13:49:58] [PASSED] check_used
[13:49:58] [PASSED] check_quota
[13:49:58] [PASSED] check_all
[13:49:58] ===================== [PASSED] guc_idm =====================
[13:49:58] ================== no_relay (3 subtests) ===================
[13:49:58] [PASSED] xe_drops_guc2pf_if_not_ready
[13:49:58] [PASSED] xe_drops_guc2vf_if_not_ready
[13:49:58] [PASSED] xe_rejects_send_if_not_ready
[13:49:58] ==================== [PASSED] no_relay =====================
[13:49:58] ================== pf_relay (14 subtests) ==================
[13:49:58] [PASSED] pf_rejects_guc2pf_too_short
[13:49:58] [PASSED] pf_rejects_guc2pf_too_long
[13:49:58] [PASSED] pf_rejects_guc2pf_no_payload
[13:49:58] [PASSED] pf_fails_no_payload
[13:49:58] [PASSED] pf_fails_bad_origin
[13:49:58] [PASSED] pf_fails_bad_type
[13:49:58] [PASSED] pf_txn_reports_error
[13:49:58] [PASSED] pf_txn_sends_pf2guc
[13:49:58] [PASSED] pf_sends_pf2guc
[13:49:58] [SKIPPED] pf_loopback_nop
[13:49:58] [SKIPPED] pf_loopback_echo
[13:49:58] [SKIPPED] pf_loopback_fail
[13:49:58] [SKIPPED] pf_loopback_busy
[13:49:58] [SKIPPED] pf_loopback_retry
[13:49:58] ==================== [PASSED] pf_relay =====================
[13:49:58] ================== vf_relay (3 subtests) ===================
[13:49:58] [PASSED] vf_rejects_guc2vf_too_short
[13:49:58] [PASSED] vf_rejects_guc2vf_too_long
[13:49:58] [PASSED] vf_rejects_guc2vf_no_payload
[13:49:58] ==================== [PASSED] vf_relay =====================
[13:49:58] ===================== lmtt (1 subtest) =====================
[13:49:58] ======================== test_ops =========================
[13:49:58] [PASSED] 2-level
[13:49:58] [PASSED] multi-level
[13:49:58] ==================== [PASSED] test_ops =====================
[13:49:58] ====================== [PASSED] lmtt =======================
[13:49:58] ================= pf_service (11 subtests) =================
[13:49:58] [PASSED] pf_negotiate_any
[13:49:58] [PASSED] pf_negotiate_base_match
[13:49:58] [PASSED] pf_negotiate_base_newer
[13:49:58] [PASSED] pf_negotiate_base_next
[13:49:58] [SKIPPED] pf_negotiate_base_older
[13:49:58] [PASSED] pf_negotiate_base_prev
[13:49:58] [PASSED] pf_negotiate_latest_match
[13:49:58] [PASSED] pf_negotiate_latest_newer
[13:49:58] [PASSED] pf_negotiate_latest_next
[13:49:58] [SKIPPED] pf_negotiate_latest_older
[13:49:58] [SKIPPED] pf_negotiate_latest_prev
[13:49:58] =================== [PASSED] pf_service ====================
[13:49:58] ================= xe_guc_g2g (2 subtests) ==================
[13:49:58] ============== xe_live_guc_g2g_kunit_default ==============
[13:49:58] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[13:49:58] ============== xe_live_guc_g2g_kunit_allmem ===============
[13:49:58] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[13:49:58] =================== [SKIPPED] xe_guc_g2g ===================
[13:49:58] =================== xe_mocs (2 subtests) ===================
[13:49:58] ================ xe_live_mocs_kernel_kunit ================
[13:49:58] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[13:49:58] ================ xe_live_mocs_reset_kunit =================
[13:49:58] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[13:49:58] ==================== [SKIPPED] xe_mocs =====================
[13:49:58] ================= xe_migrate (2 subtests) ==================
[13:49:58] ================= xe_migrate_sanity_kunit =================
[13:49:58] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[13:49:58] ================== xe_validate_ccs_kunit ==================
[13:49:58] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[13:49:58] =================== [SKIPPED] xe_migrate ===================
[13:49:58] ================== xe_dma_buf (1 subtest) ==================
[13:49:58] ==================== xe_dma_buf_kunit =====================
[13:49:58] ================ [SKIPPED] xe_dma_buf_kunit ================
[13:49:58] =================== [SKIPPED] xe_dma_buf ===================
[13:49:58] ================= xe_bo_shrink (1 subtest) =================
[13:49:58] =================== xe_bo_shrink_kunit ====================
[13:49:58] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[13:49:58] ================== [SKIPPED] xe_bo_shrink ==================
[13:49:58] ==================== xe_bo (2 subtests) ====================
[13:49:58] ================== xe_ccs_migrate_kunit ===================
[13:49:58] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[13:49:58] ==================== xe_bo_evict_kunit ====================
[13:49:58] =============== [SKIPPED] xe_bo_evict_kunit ================
[13:49:58] ===================== [SKIPPED] xe_bo ======================
[13:49:58] ==================== args (11 subtests) ====================
[13:49:58] [PASSED] count_args_test
[13:49:58] [PASSED] call_args_example
[13:49:58] [PASSED] call_args_test
[13:49:58] [PASSED] drop_first_arg_example
[13:49:58] [PASSED] drop_first_arg_test
[13:49:58] [PASSED] first_arg_example
[13:49:58] [PASSED] first_arg_test
[13:49:58] [PASSED] last_arg_example
[13:49:58] [PASSED] last_arg_test
[13:49:58] [PASSED] pick_arg_example
[13:49:58] [PASSED] sep_comma_example
[13:49:58] ====================== [PASSED] args =======================
[13:49:58] =================== xe_pci (3 subtests) ====================
[13:49:58] ==================== check_graphics_ip ====================
[13:49:58] [PASSED] 12.00 Xe_LP
[13:49:58] [PASSED] 12.10 Xe_LP+
[13:49:58] [PASSED] 12.55 Xe_HPG
[13:49:58] [PASSED] 12.60 Xe_HPC
[13:49:58] [PASSED] 12.70 Xe_LPG
[13:49:58] [PASSED] 12.71 Xe_LPG
[13:49:58] [PASSED] 12.74 Xe_LPG+
[13:49:58] [PASSED] 20.01 Xe2_HPG
[13:49:58] [PASSED] 20.02 Xe2_HPG
[13:49:58] [PASSED] 20.04 Xe2_LPG
[13:49:58] [PASSED] 30.00 Xe3_LPG
[13:49:58] [PASSED] 30.01 Xe3_LPG
[13:49:58] [PASSED] 30.03 Xe3_LPG
[13:49:58] [PASSED] 30.04 Xe3_LPG
[13:49:58] [PASSED] 30.05 Xe3_LPG
[13:49:58] [PASSED] 35.11 Xe3p_XPC
[13:49:58] ================ [PASSED] check_graphics_ip ================
[13:49:58] ===================== check_media_ip ======================
[13:49:58] [PASSED] 12.00 Xe_M
[13:49:58] [PASSED] 12.55 Xe_HPM
[13:49:58] [PASSED] 13.00 Xe_LPM+
[13:49:58] [PASSED] 13.01 Xe2_HPM
[13:49:58] [PASSED] 20.00 Xe2_LPM
[13:49:58] [PASSED] 30.00 Xe3_LPM
[13:49:58] [PASSED] 30.02 Xe3_LPM
[13:49:58] [PASSED] 35.00 Xe3p_LPM
[13:49:58] [PASSED] 35.03 Xe3p_HPM
[13:49:58] ================= [PASSED] check_media_ip ==================
[13:49:58] ================= check_platform_gt_count =================
[13:49:58] [PASSED] 0x9A60 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A68 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A70 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A40 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A49 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A59 (TIGERLAKE)
[13:49:58] [PASSED] 0x9A78 (TIGERLAKE)
[13:49:58] [PASSED] 0x9AC0 (TIGERLAKE)
[13:49:58] [PASSED] 0x9AC9 (TIGERLAKE)
[13:49:58] [PASSED] 0x9AD9 (TIGERLAKE)
[13:49:58] [PASSED] 0x9AF8 (TIGERLAKE)
[13:49:58] [PASSED] 0x4C80 (ROCKETLAKE)
[13:49:58] [PASSED] 0x4C8A (ROCKETLAKE)
[13:49:58] [PASSED] 0x4C8B (ROCKETLAKE)
[13:49:58] [PASSED] 0x4C8C (ROCKETLAKE)
[13:49:58] [PASSED] 0x4C90 (ROCKETLAKE)
[13:49:58] [PASSED] 0x4C9A (ROCKETLAKE)
[13:49:58] [PASSED] 0x4680 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4682 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4688 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x468A (ALDERLAKE_S)
[13:49:58] [PASSED] 0x468B (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4690 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4692 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4693 (ALDERLAKE_S)
[13:49:58] [PASSED] 0x46A0 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46A1 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46A2 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46A3 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46A6 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46A8 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46AA (ALDERLAKE_P)
[13:49:58] [PASSED] 0x462A (ALDERLAKE_P)
[13:49:58] [PASSED] 0x4626 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x4628 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46B0 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46B1 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46B2 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46B3 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46C0 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46C1 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46C2 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46C3 (ALDERLAKE_P)
[13:49:58] [PASSED] 0x46D0 (ALDERLAKE_N)
[13:49:58] [PASSED] 0x46D1 (ALDERLAKE_N)
[13:49:58] [PASSED] 0x46D2 (ALDERLAKE_N)
[13:49:58] [PASSED] 0x46D3 (ALDERLAKE_N)
[13:49:58] [PASSED] 0x46D4 (ALDERLAKE_N)
[13:49:58] [PASSED] 0xA721 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7A1 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7A9 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7AC (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7AD (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA720 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7A0 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7A8 (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7AA (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA7AB (ALDERLAKE_P)
[13:49:58] [PASSED] 0xA780 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA781 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA782 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA783 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA788 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA789 (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA78A (ALDERLAKE_S)
[13:49:58] [PASSED] 0xA78B (ALDERLAKE_S)
[13:49:58] [PASSED] 0x4905 (DG1)
[13:49:58] [PASSED] 0x4906 (DG1)
[13:49:58] [PASSED] 0x4907 (DG1)
[13:49:58] [PASSED] 0x4908 (DG1)
[13:49:58] [PASSED] 0x4909 (DG1)
[13:49:58] [PASSED] 0x56C0 (DG2)
[13:49:58] [PASSED] 0x56C2 (DG2)
[13:49:58] [PASSED] 0x56C1 (DG2)
[13:49:58] [PASSED] 0x7D51 (METEORLAKE)
[13:49:58] [PASSED] 0x7DD1 (METEORLAKE)
[13:49:58] [PASSED] 0x7D41 (METEORLAKE)
[13:49:58] [PASSED] 0x7D67 (METEORLAKE)
[13:49:58] [PASSED] 0xB640 (METEORLAKE)
[13:49:58] [PASSED] 0x56A0 (DG2)
[13:49:58] [PASSED] 0x56A1 (DG2)
[13:49:58] [PASSED] 0x56A2 (DG2)
[13:49:58] [PASSED] 0x56BE (DG2)
[13:49:58] [PASSED] 0x56BF (DG2)
[13:49:58] [PASSED] 0x5690 (DG2)
[13:49:58] [PASSED] 0x5691 (DG2)
[13:49:58] [PASSED] 0x5692 (DG2)
[13:49:58] [PASSED] 0x56A5 (DG2)
[13:49:58] [PASSED] 0x56A6 (DG2)
[13:49:58] [PASSED] 0x56B0 (DG2)
[13:49:58] [PASSED] 0x56B1 (DG2)
[13:49:58] [PASSED] 0x56BA (DG2)
[13:49:58] [PASSED] 0x56BB (DG2)
[13:49:58] [PASSED] 0x56BC (DG2)
[13:49:58] [PASSED] 0x56BD (DG2)
[13:49:58] [PASSED] 0x5693 (DG2)
[13:49:58] [PASSED] 0x5694 (DG2)
[13:49:58] [PASSED] 0x5695 (DG2)
[13:49:58] [PASSED] 0x56A3 (DG2)
[13:49:58] [PASSED] 0x56A4 (DG2)
[13:49:58] [PASSED] 0x56B2 (DG2)
[13:49:58] [PASSED] 0x56B3 (DG2)
[13:49:58] [PASSED] 0x5696 (DG2)
[13:49:58] [PASSED] 0x5697 (DG2)
[13:49:58] [PASSED] 0xB69 (PVC)
[13:49:58] [PASSED] 0xB6E (PVC)
[13:49:58] [PASSED] 0xBD4 (PVC)
[13:49:58] [PASSED] 0xBD5 (PVC)
[13:49:58] [PASSED] 0xBD6 (PVC)
[13:49:58] [PASSED] 0xBD7 (PVC)
[13:49:58] [PASSED] 0xBD8 (PVC)
[13:49:58] [PASSED] 0xBD9 (PVC)
[13:49:58] [PASSED] 0xBDA (PVC)
[13:49:58] [PASSED] 0xBDB (PVC)
[13:49:58] [PASSED] 0xBE0 (PVC)
[13:49:58] [PASSED] 0xBE1 (PVC)
[13:49:58] [PASSED] 0xBE5 (PVC)
[13:49:58] [PASSED] 0x7D40 (METEORLAKE)
[13:49:58] [PASSED] 0x7D45 (METEORLAKE)
[13:49:58] [PASSED] 0x7D55 (METEORLAKE)
[13:49:58] [PASSED] 0x7D60 (METEORLAKE)
[13:49:58] [PASSED] 0x7DD5 (METEORLAKE)
[13:49:58] [PASSED] 0x6420 (LUNARLAKE)
[13:49:58] [PASSED] 0x64A0 (LUNARLAKE)
[13:49:58] [PASSED] 0x64B0 (LUNARLAKE)
[13:49:58] [PASSED] 0xE202 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE209 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE20B (BATTLEMAGE)
[13:49:58] [PASSED] 0xE20C (BATTLEMAGE)
[13:49:58] [PASSED] 0xE20D (BATTLEMAGE)
[13:49:58] [PASSED] 0xE210 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE211 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE212 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE216 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE220 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE221 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE222 (BATTLEMAGE)
[13:49:58] [PASSED] 0xE223 (BATTLEMAGE)
[13:49:58] [PASSED] 0xB080 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB081 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB082 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB083 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB084 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB085 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB086 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB087 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB08F (PANTHERLAKE)
[13:49:58] [PASSED] 0xB090 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB0A0 (PANTHERLAKE)
[13:49:58] [PASSED] 0xB0B0 (PANTHERLAKE)
stty: 'standard input': Inappropriate ioctl for device
[13:49:58] [PASSED] 0xFD80 (PANTHERLAKE)
[13:49:58] [PASSED] 0xFD81 (PANTHERLAKE)
[13:49:58] [PASSED] 0xD740 (NOVALAKE_S)
[13:49:58] [PASSED] 0xD741 (NOVALAKE_S)
[13:49:58] [PASSED] 0xD742 (NOVALAKE_S)
[13:49:58] [PASSED] 0xD743 (NOVALAKE_S)
[13:49:58] [PASSED] 0xD744 (NOVALAKE_S)
[13:49:58] [PASSED] 0xD745 (NOVALAKE_S)
[13:49:58] ============= [PASSED] check_platform_gt_count =============
[13:49:58] ===================== [PASSED] xe_pci ======================
[13:49:58] =================== xe_rtp (2 subtests) ====================
[13:49:58] =============== xe_rtp_process_to_sr_tests ================
[13:49:58] [PASSED] coalesce-same-reg
[13:49:58] [PASSED] no-match-no-add
[13:49:58] [PASSED] match-or
[13:49:58] [PASSED] match-or-xfail
[13:49:58] [PASSED] no-match-no-add-multiple-rules
[13:49:58] [PASSED] two-regs-two-entries
[13:49:58] [PASSED] clr-one-set-other
[13:49:58] [PASSED] set-field
[13:49:58] [PASSED] conflict-duplicate
[13:49:58] [PASSED] conflict-not-disjoint
[13:49:58] [PASSED] conflict-reg-type
[13:49:58] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[13:49:58] ================== xe_rtp_process_tests ===================
[13:49:58] [PASSED] active1
[13:49:58] [PASSED] active2
[13:49:58] [PASSED] active-inactive
[13:49:58] [PASSED] inactive-active
[13:49:58] [PASSED] inactive-1st_or_active-inactive
[13:49:58] [PASSED] inactive-2nd_or_active-inactive
[13:49:58] [PASSED] inactive-last_or_active-inactive
[13:49:58] [PASSED] inactive-no_or_active-inactive
[13:49:58] ============== [PASSED] xe_rtp_process_tests ===============
[13:49:58] ===================== [PASSED] xe_rtp ======================
[13:49:58] ==================== xe_wa (1 subtest) =====================
[13:49:58] ======================== xe_wa_gt =========================
[13:49:58] [PASSED] TIGERLAKE B0
[13:49:58] [PASSED] DG1 A0
[13:49:58] [PASSED] DG1 B0
[13:49:58] [PASSED] ALDERLAKE_S A0
[13:49:58] [PASSED] ALDERLAKE_S B0
[13:49:58] [PASSED] ALDERLAKE_S C0
[13:49:58] [PASSED] ALDERLAKE_S D0
[13:49:58] [PASSED] ALDERLAKE_P A0
[13:49:58] [PASSED] ALDERLAKE_P B0
[13:49:58] [PASSED] ALDERLAKE_P C0
[13:49:58] [PASSED] ALDERLAKE_S RPLS D0
[13:49:58] [PASSED] ALDERLAKE_P RPLU E0
[13:49:58] [PASSED] DG2 G10 C0
[13:49:58] [PASSED] DG2 G11 B1
[13:49:58] [PASSED] DG2 G12 A1
[13:49:58] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[13:49:58] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[13:49:58] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[13:49:58] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[13:49:58] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[13:49:58] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[13:49:58] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[13:49:58] ==================== [PASSED] xe_wa_gt =====================
[13:49:58] ====================== [PASSED] xe_wa ======================
[13:49:58] ============================================================
[13:49:58] Testing complete. Ran 317 tests: passed: 296, failed: 3, skipped: 18
[13:49:58] Failures: guc_buf.test_smallest, guc_buf.test_largest, guc_buf.test_class
[13:49:58] Elapsed time: 41.961s total, 4.334s configuring, 37.210s building, 0.400s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-10-21 13:50 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 12:18 [PATCH 0/7] drm/xe: Privatize struct xe_ggtt_node Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 1/7] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 2/7] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 3/7] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node Maarten Lankhorst
2025-10-21 13:15 ` Michal Wajdeczko
2025-10-21 13:48 ` Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 4/7] drm/xe/display: Avoid " Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 5/7] drm/xe: Do not dereference ggtt_node in xe_bo.c Maarten Lankhorst
2025-10-21 12:18 ` [PATCH 6/7] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling Maarten Lankhorst
2025-10-21 12:46 ` Michal Wajdeczko
2025-10-21 12:18 ` [PATCH 7/7] drm/xe: Privatize xe_ggtt_node Maarten Lankhorst
2025-10-21 13:49 ` ✗ CI.checkpatch: warning for drm/xe: Privatize struct xe_ggtt_node Patchwork
2025-10-21 13:50 ` ✗ CI.KUnit: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox