drm/xe: Do not rely on GGTT internals in xe_guc_buf kunit tests
authorMaarten Lankhorst <dev@lankhorst.se>
Mon, 5 May 2025 12:19:23 +0000 (14:19 +0200)
committerMaarten Lankhorst <dev@lankhorst.se>
Mon, 9 Jun 2025 08:24:23 +0000 (10:24 +0200)
commitb2d6fd7ac598880f29989ebd763957dcedd66d40
treefe138b82f7fb0c8e0f9e0d2a0572f290d779f134
parente0096fdcf88ce5e64a4c2e62d3198f05a70052d8
drm/xe: Do not rely on GGTT internals in xe_guc_buf kunit tests

Add a function to init ggtt for kunit, and use the GGTT function for
initialising the GGTT node without populating it. This
prevents the test from ever knowing about struct xe_ggtt.

Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250505121924.921544-11-dev@lankhorst.se
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
drivers/gpu/drm/xe/tests/xe_guc_buf_kunit.c
drivers/gpu/drm/xe/xe_ggtt.c
drivers/gpu/drm/xe/xe_ggtt.h