staging: vc04_services: Add a V4L2 M2M codec driver

This adds a V4L2 memory to memory device that wraps the MMAL
video decode and video_encode components for H264 and MJPEG encode
and decode, MPEG4, H263, and VP8 decode (and MPEG2 decode
if the appropriate licence has been purchased).

This patch squashes all the work done in developing the driver
on the Raspberry Pi rpi-5.4.y kernel branch.
Thanks to Kieran Bingham, Aman Gupta, Chen-Yu Tsai, and
Marek Behún for their contributions. Please refer to the
rpi-5.4.y branch for the full history.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2020-10-08 20:24:12 +01:00
committed by popcornmix
parent ed643a05e5
commit a8b51b6cd2
6 changed files with 3006 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ source "drivers/staging/vc04_services/bcm2835-audio/Kconfig"
source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
source "drivers/staging/vc04_services/vc-sm-cma/Kconfig"
source "drivers/staging/vc04_services/bcm2835-codec/Kconfig"
source "drivers/staging/vc04_services/vchiq-mmal/Kconfig"

View File

@@ -12,6 +12,7 @@ obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/
obj-$(CONFIG_BCM_VC_SM_CMA) += vc-sm-cma/
obj-$(CONFIG_VIDEO_CODEC_BCM2835) += bcm2835-codec/
ccflags-y += -I $(srctree)/$(src)/include -D__VCCOREVER__=0x04000000

View File

@@ -0,0 +1,11 @@
config VIDEO_CODEC_BCM2835
tristate "BCM2835 Video codec support"
depends on MEDIA_SUPPORT && MEDIA_CONTROLLER
depends on VIDEO_V4L2 && (ARCH_BCM2835 || COMPILE_TEST)
select BCM2835_VCHIQ_MMAL
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
help
Say Y here to enable the V4L2 video codecs for
Broadcom BCM2835 SoC. This operates over the VCHIQ interface
to a service running on VideoCore.

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
bcm2835-codec-objs := bcm2835-v4l2-codec.o
obj-$(CONFIG_VIDEO_CODEC_BCM2835) += bcm2835-codec.o
ccflags-y += \
-I$(srctree)/drivers/staging/vc04_services \
-D__VCCOREVER__=0x04000000

View File

@@ -0,0 +1 @@
No issues. Depends on VCHIQ which is in staging.

File diff suppressed because it is too large Load Diff