Skip to content

Commit

Permalink
BACKPORT: FROMLIST: virtio_video: Add the Virtio Video V4L2 driver
Browse files Browse the repository at this point in the history
This adds a Virtio based video driver for video streaming device that
operates input and output data buffers to share video devices with
several guests. The current implementation consist of V4L2 based video
driver supporting video functions of decoder and encoder. The device
uses command structures to advertise and negotiate stream formats and
controls. This allows the driver to modify the processing logic of the
device on a per stream basis.

Signed-off-by: Dmitry Sepp <dmitry.sepp@opensynergy.com>
Signed-off-by: Kiran Pawar <Kiran.Pawar@opensynergy.com>
Signed-off-by: Nikolay Martyanov <Nikolay.Martyanov@opensynergy.com>
Signed-off-by: Samiullah Khawaja <samiullah.khawaja@opensynergy.com>

(am from https://patchwork.linuxtv.org/patch/61717/)

BUG=b:120456557
TEST=compile with VIRTIO_VIDEO enabled

Fixes:
* Fixed a typo in the commit message: "video_video" -> "virtio_video"
* Fixed SPDX-License-Identifier in /include/uapi/linux/virtio_video.h
* Removed vidioc_enum_fmt_vid_{cap, out}_mplane callbacks that were removed by
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e98b7b542a456582ea3029be857cc99a3b19bd5

Change-Id: I037b20a9faa1b31bb260cc2a0d57932e1979395e
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2066459
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
  • Loading branch information
Dmitry Sepp authored and Commit Bot committed Mar 18, 2020
1 parent 1057eb6 commit bbca485
Show file tree
Hide file tree
Showing 16 changed files with 5,106 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ source "drivers/media/pci/Kconfig"
source "drivers/media/platform/Kconfig"
source "drivers/media/mmc/Kconfig"
source "drivers/media/radio/Kconfig"
source "drivers/media/virtio/Kconfig"

comment "Supported FireWire (IEEE 1394) Adapters"
depends on DVB_CORE && FIREWIRE
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ obj-y += rc/

obj-$(CONFIG_CEC_CORE) += cec/

obj-$(CONFIG_VIRTIO_VIDEO) += virtio/

#
# Finally, merge the drivers that require the core
#
Expand Down
12 changes: 12 additions & 0 deletions drivers/media/virtio/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0+
# Video driver for virtio

config VIRTIO_VIDEO
tristate "Virtio video V4L2 driver"
depends on VIRTIO && VIDEO_DEV && VIDEO_V4L2
select VIDEOBUF2_DMA_SG
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
help
This is the virtual video driver for virtio.
Say Y or M.
12 changes: 12 additions & 0 deletions drivers/media/virtio/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0+

obj-$(CONFIG_VIRTIO_VIDEO) += virtio-video.o

virtio-video-objs := \
virtio_video_driver.o \
virtio_video_device.o \
virtio_video_vq.o \
virtio_video_dec.o \
virtio_video_enc.o \
virtio_video_caps.o \
virtio_video_helpers.o
Loading

0 comments on commit bbca485

Please sign in to comment.