media: split test drivers from platform directory

When the first test device was added (vivi.c), there were just
one file. I was too lazy on that time to create a separate
directory just for it, so I kept it together with platform.

Now, we have vivid, vicodec, vim2m and vimc. Also, a new
virtual driver has been prepared to support DVB API.

So, it is time to solve this mess, by placing test stuff
on a separate directory.

It should be noticed that we also have some skeleton drivers
(for V4L and for DVB). For now, we'll keep them separate,
as they're not really test drivers, but instead, just
examples. The DVB frontend ones will likely be part of a new DVB
test driver. By that time, it should make sense to move them
here as well.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab 2020-03-24 10:39:43 +01:00
parent dee1877d91
commit 4b32216adb
68 changed files with 51 additions and 28 deletions

View File

@ -101,6 +101,19 @@ config MEDIA_PLATFORM_SUPPORT
Say Y when you want to be able so see such devices.
config MEDIA_TEST_SUPPORT
bool "Test drivers support"
help
Those drivers should not be used on production Kernels, but
can be useful on debug ones. It enables several dummy drivers
that simulate a real hardware. Very useful to test userspace
applications and to validate if the subsystem core is doesn't
have regressions.
Say Y if you want to use some virtual test driver.
In case of doubts, say N.
source "drivers/media/cec/Kconfig"
source "drivers/media/mc/Kconfig"
@ -180,6 +193,7 @@ source "drivers/media/radio/Kconfig"
if MEDIA_PLATFORM_SUPPORT
source "drivers/media/platform/Kconfig"
source "drivers/media/test_drivers/Kconfig"
source "drivers/media/mmc/Kconfig"
endif

View File

@ -529,29 +529,6 @@ config VIDEO_TI_SC
config VIDEO_TI_CSC
tristate
menuconfig V4L_TEST_DRIVERS
bool "Media test drivers"
depends on MEDIA_CAMERA_SUPPORT
if V4L_TEST_DRIVERS
source "drivers/media/platform/vimc/Kconfig"
source "drivers/media/platform/vivid/Kconfig"
config VIDEO_VIM2M
tristate "Virtual Memory-to-Memory Driver"
depends on VIDEO_DEV && VIDEO_V4L2
select VIDEOBUF2_VMALLOC
select V4L2_MEM2MEM_DEV
help
This is a virtual test device for the memory-to-memory driver
framework.
source "drivers/media/platform/vicodec/Kconfig"
endif #V4L_TEST_DRIVERS
menuconfig DVB_PLATFORM_DRIVERS
bool "DVB platform devices"
depends on MEDIA_DIGITAL_TV_SUPPORT

View File

@ -14,11 +14,6 @@ obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
obj-$(CONFIG_VIDEO_VIMC) += vimc/
obj-$(CONFIG_VIDEO_VIVID) += vivid/
obj-$(CONFIG_VIDEO_VIM2M) += vim2m.o
obj-$(CONFIG_VIDEO_VICODEC) += vicodec/
obj-y += ti-vpe/
obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o

View File

@ -0,0 +1,28 @@
# SPDX-License-Identifier: GPL-2.0-only
if MEDIA_TEST_SUPPORT
menuconfig V4L_TEST_DRIVERS
bool "V4L test drivers"
depends on MEDIA_CAMERA_SUPPORT
if V4L_TEST_DRIVERS
source "drivers/media/test_drivers/vimc/Kconfig"
source "drivers/media/test_drivers/vivid/Kconfig"
config VIDEO_VIM2M
tristate "Virtual Memory-to-Memory Driver"
depends on VIDEO_DEV && VIDEO_V4L2
select VIDEOBUF2_VMALLOC
select V4L2_MEM2MEM_DEV
help
This is a virtual test device for the memory-to-memory driver
framework.
source "drivers/media/test_drivers/vicodec/Kconfig"
endif #V4L_TEST_DRIVERS
endif #MEDIA_TEST_SUPPORT

View File

@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the test drivers.
#
obj-$(CONFIG_VIDEO_VIMC) += vimc/
obj-$(CONFIG_VIDEO_VIVID) += vivid/
obj-$(CONFIG_VIDEO_VIM2M) += vim2m.o
obj-$(CONFIG_VIDEO_VICODEC) += vicodec/