[PATCH 07/12] drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node
Lucas De Marchi
lucas.demarchi at intel.com
Fri Aug 16 15:26:47 UTC 2024
On Fri, Aug 16, 2024 at 11:02:38AM GMT, Rodrigo Vivi wrote:
>diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
>index e0da24bb5774..7c8bbaa30fca 100644
>--- a/drivers/gpu/drm/xe/xe_ggtt.c
>+++ b/drivers/gpu/drm/xe/xe_ggtt.c
>@@ -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);
>+}
since you could fwd declare the drm_mm_node, maybe this wrapper would be
better as a static inline. Not blocking this series though.
Lucas De Marchi
More information about the Intel-xe
mailing list