media: hantro: Add support for RK356x encoder
authorNicolas Frattaroli <frattaroli.nicolas@gmail.com>
Sun, 12 Jun 2022 15:53:45 +0000 (16:53 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 13:54:46 +0000 (14:54 +0100)
commit6f1ae821a6c4aa9d5b8f437b27ec86fb569219fd
tree88d497156baa324629686b01c2e77ebaf03e432c
parent5484ea9229a1decd6662dce2d8ab2920289d69d4
media: hantro: Add support for RK356x encoder

The RK3566 and RK3568 SoCs come with a small Hantro instance which is
solely dedicated to encoding. This patch adds the necessary structs to
the Hantro driver to allow the JPEG encoder of it to function.

Through some sleuthing through the vendor's MPP source code and after
closer inspection of the TRM, it was determined that the hardware likely
supports VP8 and H.264 as well.

Tested with the following GStreamer command:

gst-launch-1.0 videotestsrc ! v4l2jpegenc ! matroskamux ! \
               filesink location=foo.mkv

Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_drv.c
drivers/staging/media/hantro/hantro_hw.h
drivers/staging/media/hantro/rockchip_vpu_hw.c