From 987167b1199c428765b0f76b9b6587dd4ccde3e6 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 8 Jan 2026 11:10:22 +0100 Subject: [PATCH] drm/xe: Privatize xe_ggtt_node Nothing requires it any more, make the member private. Reviewed-by: Matthew Brost Signed-off-by: Maarten Lankhorst Link: https://patch.msgid.link/20260108101014.579906-16-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 1d748d1aeb3c..cb23d97845a8 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -67,6 +67,24 @@ * give us the correct placement for free. */ +/** + * 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; +}; + static u64 xelp_ggtt_pte_flags(struct xe_bo *bo, u16 pat_index) { u64 pte = XE_PAGE_PRESENT; diff --git a/drivers/gpu/drm/xe/xe_ggtt_types.h b/drivers/gpu/drm/xe/xe_ggtt_types.h index 5fd723ce8108..d82b71a198bc 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.47.3