From 87b7cce6fb8a0afde96227423b3385d36e6fe0a1 Mon Sep 17 00:00:00 2001 From: Vasyl Vavrychuk Date: Mon, 22 Nov 2021 12:38:06 +0100 Subject: virtualization: Add virtio-video driver as external module. This driver should conform WIP spec v3 [1] with some updates for spec v4 [2], and, some unspecified features such as VIRTIO_VIDEO_DEVICE_CAMERA. Imported from internal OpenSynergy's revision: bcc33b6b9e0156b381a70c54d2df02c57b63d270 Kernel was configured with necessary features for this driver: enable MEDIA_SUPPORT disable MEDIA_SUBDRV_AUTOSELECT enable MEDIA_PLATFORM_SUPPORT enable VIDEO_VIRTIO Keep driver as an external module to simplify future updates. [1]: https://lists.oasis-open.org/archives/virtio-dev/202002/msg00002.html [2]: https://lists.oasis-open.org/archives/virtio-dev/202006/msg00072.html Bug-AGL: SPEC-4148 Change-Id: Iea339194b22443f67b3e2ffddca84118357a2f15 Signed-off-by: Vasyl Vavrychuk --- ...-media-Add-config-option-for-virtio-video.patch | 33 +++++ .../linux/linux-yocto/virtio_video.cfg | 160 +++++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 meta-egvirt/recipes-kernel/linux/linux-yocto/0001-drivers-media-Add-config-option-for-virtio-video.patch create mode 100644 meta-egvirt/recipes-kernel/linux/linux-yocto/virtio_video.cfg (limited to 'meta-egvirt/recipes-kernel/linux/linux-yocto') diff --git a/meta-egvirt/recipes-kernel/linux/linux-yocto/0001-drivers-media-Add-config-option-for-virtio-video.patch b/meta-egvirt/recipes-kernel/linux/linux-yocto/0001-drivers-media-Add-config-option-for-virtio-video.patch new file mode 100644 index 00000000..ede061e6 --- /dev/null +++ b/meta-egvirt/recipes-kernel/linux/linux-yocto/0001-drivers-media-Add-config-option-for-virtio-video.patch @@ -0,0 +1,33 @@ +From 162f03095b94fe1580653c96094e50ba827f4c0f Mon Sep 17 00:00:00 2001 +From: Vasyl Vavrychuk +Date: Thu, 3 Jun 2021 07:44:30 +0200 +Subject: [PATCH] drivers/media: Add config option for virtio video. + +virtio video driver is implemented as out of tree kernel module, but it +depends on some of kernel functionality which can not be enabled +explicitly via config (e.g. VIDEOBUF2_DMA_CONTIG). +--- + drivers/media/Kconfig | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig +index a6d073f2e036..a6146edb0ea3 100644 +--- a/drivers/media/Kconfig ++++ b/drivers/media/Kconfig +@@ -235,6 +235,16 @@ endif + + source "drivers/media/firewire/Kconfig" + ++config VIDEO_VIRTIO ++ tristate "Virtio video driver" ++ depends on VIDEO_V4L2 ++ select MEDIA_CONTROLLER ++ select VIDEOBUF2_DMA_CONTIG ++ select VIDEOBUF2_DMA_SG ++ select V4L2_MEM2MEM_DEV ++ help ++ This is the virtual video driver for virtio. Say Y or M. ++ + endmenu + + # diff --git a/meta-egvirt/recipes-kernel/linux/linux-yocto/virtio_video.cfg b/meta-egvirt/recipes-kernel/linux/linux-yocto/virtio_video.cfg new file mode 100644 index 00000000..252bcfeb --- /dev/null +++ b/meta-egvirt/recipes-kernel/linux/linux-yocto/virtio_video.cfg @@ -0,0 +1,160 @@ +CONFIG_FRAME_VECTOR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_SUPPORT_FILTER=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set + +# +# Media device types +# +# CONFIG_MEDIA_CAMERA_SUPPORT is not set +# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set +# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set +# CONFIG_MEDIA_RADIO_SUPPORT is not set +# CONFIG_MEDIA_SDR_SUPPORT is not set +CONFIG_MEDIA_PLATFORM_SUPPORT=y +# CONFIG_MEDIA_TEST_SUPPORT is not set +# end of Media device types + +CONFIG_VIDEO_DEV=y +CONFIG_MEDIA_CONTROLLER=y + +# +# Video4Linux options +# +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2_I2C=y +# CONFIG_VIDEO_V4L2_SUBDEV_API is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_V4L2_MEM2MEM_DEV=y +# end of Video4Linux options + +# +# Media controller options +# +# end of Media controller options + +# +# Media drivers +# + +# +# Drivers filtered as selected at 'Filter media drivers' +# +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_V4L2=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEOBUF2_DMA_SG=y +# CONFIG_V4L_PLATFORM_DRIVERS is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +CONFIG_VIDEO_VIRTIO=y +# end of Media drivers + +# +# Media ancillary drivers +# + +# +# Audio decoders, processors and mixers +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +# CONFIG_VIDEO_MSP3400 is not set +# CONFIG_VIDEO_CS3308 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set +# CONFIG_VIDEO_SONY_BTF_MPX is not set +# end of Audio decoders, processors and mixers + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set +# end of RDS decoders + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7183 is not set +# CONFIG_VIDEO_ADV748X is not set +# CONFIG_VIDEO_ADV7842 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_ML86V7667 is not set +# CONFIG_VIDEO_SAA7110 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_TC358743 is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_TW2804 is not set +# CONFIG_VIDEO_TW9903 is not set +# CONFIG_VIDEO_TW9906 is not set +# CONFIG_VIDEO_TW9910 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_CX25840 is not set +# end of Video decoders + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_ADV7393 is not set +# CONFIG_VIDEO_ADV7511 is not set +# CONFIG_VIDEO_AD9389B is not set +# CONFIG_VIDEO_AK881X is not set +# CONFIG_VIDEO_THS8200 is not set +# end of Video encoders + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +# end of Video improvement chips + +# +# Audio/Video compression chips +# +# CONFIG_VIDEO_SAA6752HS is not set +# end of Audio/Video compression chips + +# +# SDR tuner chips +# +# end of SDR tuner chips + +# +# Miscellaneous helper chips +# +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_I2C is not set +# CONFIG_VIDEO_ST_MIPID02 is not set +# end of Miscellaneous helper chips + +# +# SPI helper chips +# +# end of SPI helper chips +# end of Media ancillary drivers -- cgit 1.2.3-korg