352683ea52
In configurations with CONFIG_KUNIT=m, builting the unit test
into the kernel causes a link failure:
arm-linux-gnueabi-ld: drivers/gpu/drm/vc4/tests/vc4_mock.o: in function `__build_mock':
vc4_mock.c:(.text+0x6e): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x9c): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x100): undefined reference to `kunit_ptr_not_err_assert_format'
...
Allow this to be a loadable module as well to have Kconfig
sort out the dependencies correctly.
Fixes: f759f5b53f
("drm/vc4: tests: Introduce a mocking infrastructure")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230202102346.868771-1-arnd@kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config DRM_VC4
|
|
tristate "Broadcom VC4 Graphics"
|
|
depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST
|
|
# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
|
|
# happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
|
|
depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
|
|
depends on DRM
|
|
depends on SND && SND_SOC
|
|
depends on COMMON_CLK
|
|
depends on PM
|
|
select DRM_DISPLAY_HDMI_HELPER
|
|
select DRM_DISPLAY_HELPER
|
|
select DRM_KMS_HELPER
|
|
select DRM_GEM_DMA_HELPER
|
|
select DRM_PANEL_BRIDGE
|
|
select SND_PCM
|
|
select SND_PCM_ELD
|
|
select SND_SOC_GENERIC_DMAENGINE_PCM
|
|
select SND_SOC_HDMI_CODEC
|
|
select DRM_MIPI_DSI
|
|
help
|
|
Choose this option if you have a system that has a Broadcom
|
|
VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.
|
|
|
|
This driver requires that "avoid_warnings=2" be present in
|
|
the config.txt for the firmware, to keep it from smashing
|
|
our display setup.
|
|
|
|
config DRM_VC4_HDMI_CEC
|
|
bool "Broadcom VC4 HDMI CEC Support"
|
|
depends on DRM_VC4
|
|
select CEC_CORE
|
|
help
|
|
Choose this option if you have a Broadcom VC4 GPU
|
|
and want to use CEC.
|
|
|
|
config DRM_VC4_KUNIT_TEST
|
|
tristate "KUnit tests for VC4" if !KUNIT_ALL_TESTS
|
|
depends on DRM_VC4 && KUNIT
|
|
select DRM_KUNIT_TEST_HELPERS
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
This builds unit tests for the VC4 DRM/KMS driver. This option is
|
|
not useful for distributions or general kernels, but only for kernel
|
|
developers working on the VC4 driver.
|
|
|
|
For more information on KUnit and unit tests in general,
|
|
please refer to the KUnit documentation in
|
|
Documentation/dev-tools/kunit/.
|
|
|
|
If in doubt, say "N".
|