summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/Makefile
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-02-26 15:46:36 +0300
committerLucas De Marchi <lucas.demarchi@intel.com>2024-03-04 17:41:11 +0300
commitd1d95985ab66b6605286bc00d757054ce22f7d1d (patch)
tree6e41cc92c4e0c2fd845142181867644f6800341f /drivers/gpu/drm/xe/Makefile
parentc6d6a82d8a9f8f9326b760accaa532b839b80140 (diff)
downloadlinux-d1d95985ab66b6605286bc00d757054ce22f7d1d.tar.xz
drm/xe/kunit: fix link failure with built-in xe
When the driver is built-in but the tests are in loadable modules, the helpers don't actually get put into the driver: ERROR: modpost: "xe_kunit_helper_alloc_xe_device" [drivers/gpu/drm/xe/tests/xe_test.ko] undefined! Change the Makefile to ensure they are always part of the driver even when the rest of the kunit tests are in loadable modules. Fixes: 5095d13d758b ("drm/xe/kunit: Define helper functions to allocate fake xe device") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240226124736.1272949-1-arnd@kernel.org Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 0e6fec6da25167a568fbaeb8401d8172069124ad) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/Makefile')
-rw-r--r--drivers/gpu/drm/xe/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index c531210695db..1a59c15f4d66 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -158,8 +158,10 @@ xe-$(CONFIG_PCI_IOV) += \
xe_lmtt_2l.o \
xe_lmtt_ml.o
-xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \
- tests/xe_kunit_helpers.o
+# include helpers for tests even when XE is built-in
+ifdef CONFIG_DRM_XE_KUNIT_TEST
+xe-y += tests/xe_kunit_helpers.o
+endif
# i915 Display compat #defines and #includes
subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \