media: rockchip: rga: add NV12M support
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:34 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:14 +0000 (08:56 +0100)
Add support for the multi-planar variants of NV12. The RGA is now able
to exchange DMABUFs with other devices that only support multi-planar
NV12, for example the Hantro JPEG encoder.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/rockchip/rga/rga.c

index 57d845c57d7d4e925478bbc3972f7833c9bd564a..00fdfa9e10bc1f46cc2b46be1fc7500ee40dc06a 100644 (file)
@@ -280,6 +280,15 @@ static struct rga_fmt formats[] = {
                .y_div = 2,
                .x_div = 1,
        },
+       {
+               .fourcc = V4L2_PIX_FMT_NV12M,
+               .color_swap = RGA_COLOR_NONE_SWAP,
+               .hw_format = RGA_COLOR_FMT_YUV420SP,
+               .depth = 12,
+               .uv_factor = 4,
+               .y_div = 2,
+               .x_div = 1,
+       },
        {
                .fourcc = V4L2_PIX_FMT_NV16,
                .color_swap = RGA_COLOR_NONE_SWAP,