[PATCH 101/108] drm/i915/kunit: Add DP link test stub

Imre Deak
2026-04-28T12:56:10Z

Add a Kunit stub test module for DP link test cases.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/Makefile | 2 +
drivers/gpu/drm/i915/display/tests/Makefile | 7 +++
.../i915/display/tests/intel_dp_link_test.c | 46 +++++++++++++++++++
3 files changed, 55 insertions(+)
create mode 100644 drivers/gpu/drm/i915/display/tests/Makefile
create mode 100644 drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 0c04c6d9bb13e..ff2b22271454b 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -385,6 +385,8 @@ i915-y += \
i915-$(CONFIG_DRM_I915_DP_TUNNEL) += \
display/intel_dp_tunnel.o

+obj-$(CONFIG_DRM_I915_KUNIT_TEST) += display/tests/
+
i915-$(CONFIG_DRM_I915_GVT) += \
display/intel_gvt_api.o

diff --git a/drivers/gpu/drm/i915/display/tests/Makefile b/drivers/gpu/drm/i915/display/tests/Makefile
new file mode 100644
index 0000000000000..ad250974160f6
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/tests/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+
+subdir-ccflags-y += -I$(srctree)/drivers/gpu/drm/i915/display/
+
+obj-$(CONFIG_DRM_I915_KUNIT_TEST) += i915_display_test.o
+i915_display_test-y = \
+ intel_dp_link_test.o
diff --git a/drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c b/drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c
new file mode 100644
index 0000000000000..1efcfdc53c936
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#include <kunit/test.h>
+
+struct test_ctx {
+};
+
+static struct kunit_case intel_dp_link_test_cases[] = {
+ {}
+};
+
+static struct test_ctx test_ctx;
+
+static int intel_dp_link_test_init(struct kunit *test)
+{
+ test->priv = &test_ctx;
+
+ return 0;
+}
+
+static void intel_dp_link_test_exit(struct kunit *test)
+{
+}
+
+static int intel_dp_link_test_suite_init(struct kunit_suite *test_suite)
+{
+ return 0;
+}
+
+static struct kunit_suite intel_dp_link_test_suite = {
+ .name = "intel_dp_link",
+ .suite_init = intel_dp_link_test_suite_init,
+ .init = intel_dp_link_test_init,
+ .exit = intel_dp_link_test_exit,
+ .test_cases = intel_dp_link_test_cases,
+};
+
+kunit_test_suites(&intel_dp_link_test_suite);
+
+MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
+
+MODULE_AUTHOR("Intel Corporation");
+MODULE_DESCRIPTION("Intel DP link KUnit tests");
--
2.49.1