drm/tests: helpers: Move the helper header to include/drm
authorMaxime Ripard <maxime@cerno.tech>
Thu, 1 Dec 2022 15:11:32 +0000 (16:11 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 8 Dec 2022 08:41:26 +0000 (09:41 +0100)
We'll need to use those helpers from drivers too, so let's move it to a
more visible location.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-1-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/tests/drm_client_modeset_test.c
drivers/gpu/drm/tests/drm_kunit_helpers.c
drivers/gpu/drm/tests/drm_kunit_helpers.h [deleted file]
drivers/gpu/drm/tests/drm_modes_test.c
drivers/gpu/drm/tests/drm_probe_helper_test.c
include/drm/drm_kunit_helpers.h [new file with mode: 0644]

index 52929536a158265c8eb5f97283facc411ac8ea3c..ed2f62e92fea41a721e086ab933470f3f2431eee 100644 (file)
@@ -8,12 +8,11 @@
 #include <drm/drm_connector.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_kunit_helpers.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_modeset_helper_vtables.h>
 #include <drm/drm_probe_helper.h>
 
-#include "drm_kunit_helpers.h"
-
 struct drm_client_modeset_test_priv {
        struct drm_device *drm;
        struct drm_connector connector;
index 8c738384a99261b225469cac9792644ee01939c0..6600a4db315888fec8dee51489c68a53122f858c 100644 (file)
@@ -1,14 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0
 
 #include <drm/drm_drv.h>
+#include <drm/drm_kunit_helpers.h>
 #include <drm/drm_managed.h>
 
 #include <kunit/resource.h>
 
 #include <linux/device.h>
 
-#include "drm_kunit_helpers.h"
-
 struct kunit_dev {
        struct drm_device base;
 };
diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.h b/drivers/gpu/drm/tests/drm_kunit_helpers.h
deleted file mode 100644 (file)
index 20ab6ee..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#ifndef DRM_KUNIT_HELPERS_H_
-#define DRM_KUNIT_HELPERS_H_
-
-struct drm_device;
-struct kunit;
-
-struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char *name);
-
-#endif // DRM_KUNIT_HELPERS_H_
index 9358a885c58b9923c648c5cc1a4fbb804b5e00b8..3953e478c4d01c1a60fe5a2f2f7387943796bc7c 100644 (file)
@@ -4,14 +4,13 @@
  */
 
 #include <drm/drm_drv.h>
+#include <drm/drm_kunit_helpers.h>
 #include <drm/drm_modes.h>
 
 #include <kunit/test.h>
 
 #include <linux/units.h>
 
-#include "drm_kunit_helpers.h"
-
 struct drm_test_modes_priv {
        struct drm_device *drm;
 };
index 211131405500bf23ed6ca4ce34d4710ff535a05b..6b3b7d0f948efd262b633a1dfbb51e1cde5b083f 100644 (file)
@@ -7,6 +7,7 @@
 #include <drm/drm_connector.h>
 #include <drm/drm_device.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_kunit_helpers.h>
 #include <drm/drm_mode.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_modeset_helper_vtables.h>
@@ -14,8 +15,6 @@
 
 #include <kunit/test.h>
 
-#include "drm_kunit_helpers.h"
-
 struct drm_probe_helper_test_priv {
        struct drm_device *drm;
        struct drm_connector connector;
diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h
new file mode 100644 (file)
index 0000000..20ab6ee
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#ifndef DRM_KUNIT_HELPERS_H_
+#define DRM_KUNIT_HELPERS_H_
+
+struct drm_device;
+struct kunit;
+
+struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char *name);
+
+#endif // DRM_KUNIT_HELPERS_H_