bcm27xx: 6.1: add kernel patches
[openwrt/staging/jow.git] / target / linux / bcm27xx / patches-6.1 / 950-0488-drm-tests-Introduce-a-config-option-for-the-KUnit-he.patch
1 From 1ddfbb0af0c23a845e941f4e49c6a65358b1c58e Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 1 Dec 2022 13:37:20 +0100
4 Subject: [PATCH] drm/tests: Introduce a config option for the KUnit
5 helpers
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Driver-specific tests will need access to the helpers without pulling
11 every DRM framework test. Let's create an intermediate Kconfig options
12 for the helpers.
13
14 Suggested-by: MaĆ­ra Canal <mcanal@igalia.com>
15 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
16 ---
17 drivers/gpu/drm/Kconfig | 7 +++++++
18 drivers/gpu/drm/Makefile | 2 +-
19 drivers/gpu/drm/tests/Makefile | 4 +++-
20 3 files changed, 11 insertions(+), 2 deletions(-)
21
22 --- a/drivers/gpu/drm/Kconfig
23 +++ b/drivers/gpu/drm/Kconfig
24 @@ -64,6 +64,12 @@ config DRM_USE_DYNAMIC_DEBUG
25 bytes per callsite, the .data costs can be substantial, and
26 are therefore configurable.
27
28 +config DRM_KUNIT_TEST_HELPERS
29 + tristate
30 + depends on DRM && KUNIT
31 + help
32 + KUnit Helpers for KMS drivers.
33 +
34 config DRM_KUNIT_TEST
35 tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
36 depends on DRM && KUNIT
37 @@ -74,6 +80,7 @@ config DRM_KUNIT_TEST
38 select DRM_KMS_HELPER
39 select DRM_BUDDY
40 select DRM_EXPORT_FOR_TESTS if m
41 + select DRM_KUNIT_TEST_HELPERS
42 default KUNIT_ALL_TESTS
43 help
44 This builds unit tests for DRM. This option is not useful for
45 --- a/drivers/gpu/drm/Makefile
46 +++ b/drivers/gpu/drm/Makefile
47 @@ -77,7 +77,7 @@ obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_
48 # Drivers and the rest
49 #
50
51 -obj-$(CONFIG_DRM_KUNIT_TEST) += tests/
52 +obj-y += tests/
53
54 obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
55 obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
56 --- a/drivers/gpu/drm/tests/Makefile
57 +++ b/drivers/gpu/drm/tests/Makefile
58 @@ -1,5 +1,8 @@
59 # SPDX-License-Identifier: GPL-2.0
60
61 +obj-$(CONFIG_DRM_KUNIT_TEST_HELPERS) += \
62 + drm_kunit_helpers.o
63 +
64 obj-$(CONFIG_DRM_KUNIT_TEST) += \
65 drm_buddy_test.o \
66 drm_cmdline_parser_test.o \
67 @@ -8,7 +11,6 @@ obj-$(CONFIG_DRM_KUNIT_TEST) += \
68 drm_format_helper_test.o \
69 drm_format_test.o \
70 drm_framebuffer_test.o \
71 - drm_kunit_helpers.o \
72 drm_mm_test.o \
73 drm_plane_helper_test.o \
74 drm_rect_test.o