aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/allegro-dvt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-27media: allegro: use new v4l2_m2m_ioctl_try_encoder_cmd funcsMichael Tretter1-20/+2
As the try_encoder_cmd is identical for many drivers, there are now helpers for this function in the mem2mem core. Use the helper in allegro. This fixes the v4l2-compliance test regarding V4L2_ENC_CMD_STOP, because the allegro-specific function rejected invalid flags. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29media: staging: allegro: cleanup two warningsMauro Carvalho Chehab1-2/+2
Sparse complains about two issues when building with i386 and COMPILE_TEST: drivers/staging/media/allegro-dvt/allegro-core.c:1849:36: warning: constant 0xffffffff00000000UL is so big it is unsigned long long drivers/staging/media/allegro-dvt/allegro-core.c:865:24: error: incompatible types in comparison expression (different type sizes) Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29media: allegro-dvt: fix build failureHans Verkuil1-1/+1
nal-h264.h is a local header, not a global one. Use "" instead of <>. Fixed this compile error: CC drivers/staging/media/allegro-dvt/nal-h264.o drivers/staging/media/allegro-dvt/nal-h264.c:24:10: fatal error: nal-h264.h: No such file or directory #include <nal-h264.h> ^~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29media: allegro: add SPS/PPS nal unit writerMichael Tretter4-1/+1392
The allegro hardware encoder does not write SPS/PPS nal units into the encoded video stream. Therefore, we need to write the units in software. The implementation follows Rec. ITU-T H.264 (04/2017) to allow to convert between a C struct and the RBSP representation of the SPS and PPS nal units. The allegro driver writes the nal units into the v4l2 capture buffer in front of the actual video data which is written at an offset by the IP core. The remaining gap is filled with a filler nal unit. [hverkuil-cisco@xs4all.nl: added missing @dev description for nal_h264_read_sps()] [mchehab+samsung@kernel.org: removed uneeded "-ccflags-y $(src)" from Makefile] Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29media: allegro: add Allegro DVT video IP core driverMichael Tretter4-0/+2875
Add a V4L2 mem-to-mem driver for Allegro DVT video IP cores as found in the EV family of the Xilinx ZynqMP SoC. The Zynq UltraScale+ Device Technical Reference Manual uses the term VCU (Video Codec Unit) for the encoder, decoder and system integration block. This driver takes care of interacting with the MicroBlaze MCU that controls the actual IP cores. The IP cores and MCU are integrated in the FPGA. The xlnx_vcu driver is responsible for configuring the clocks and providing information about the codec configuration. The driver currently only supports the H.264 video encoder. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>