From: Alexandre Courbot <[email protected]>

Add Kconfig and Makefile entries for the new virtio-media driver.

Signed-off-by: Alexandre Courbot <[email protected]>
Co-developed-by: Brian Daniels <[email protected]>
Signed-off-by: Brian Daniels <[email protected]>
---
 drivers/media/Kconfig         | 13 +++++++++++++
 drivers/media/Makefile        |  2 ++
 drivers/media/virtio/Makefile |  8 ++++++++
 3 files changed, 23 insertions(+)
 create mode 100644 drivers/media/virtio/Makefile

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 6abc9302c..7bc7306fa 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -136,6 +136,19 @@ config MEDIA_PLATFORM_SUPPORT
 
          Say Y when you want to be able to see such devices.
 
+config MEDIA_VIRTIO
+       tristate "Virtio-media Driver"
+       depends on VIRTIO && VIDEO_DEV && 64BIT && (X86 || (ARM && 
CPU_LITTLE_ENDIAN))
+       select VIDEOBUF2_CORE
+       select VIDEOBUF2_MEMOPS
+       help
+         Enables the virtio-media driver.
+
+         This driver is used to virtualize media devices such as cameras or
+         decoders from a host into a guest using the V4L2 protocol.
+
+         If unsure, say N.
+
 config MEDIA_TEST_SUPPORT
        bool
        prompt "Test drivers" if MEDIA_SUPPORT_FILTER
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 20fac24e4..357e786cc 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -23,6 +23,8 @@ obj-$(CONFIG_DVB_CORE) += dvb-core/
 # There are both core and drivers at RC subtree - merge before drivers
 obj-y += rc/
 
+obj-$(CONFIG_MEDIA_VIRTIO) += virtio/
+
 obj-$(CONFIG_CEC_CORE) += cec/
 
 #
diff --git a/drivers/media/virtio/Makefile b/drivers/media/virtio/Makefile
new file mode 100644
index 000000000..1d69d5fd4
--- /dev/null
+++ b/drivers/media/virtio/Makefile
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the virtio-media device driver.
+
+virtio-media-objs := scatterlist_builder.o virtio_media_ioctls.o \
+                       virtio_media_driver.o
+
+obj-$(CONFIG_MEDIA_VIRTIO) += virtio-media.o
-- 
2.55.0.rc0.799.gd6f94ed593-goog


Reply via email to