Media:Wave5: Add contiguous planes format support (YUV420/NV12/NV21) 98/299598/2
authorSom Qin <som.qin@starfivetech.com>
Wed, 2 Aug 2023 03:38:51 +0000 (11:38 +0800)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 5 Oct 2023 09:26:30 +0000 (18:26 +0900)
Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 80c6e7df80bd from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4203a253b3c7577a5849ca2582099a2cf07985ea

drivers/media/platform/chips-media/wave5/wave5-helper.h
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c

index 8a8dda8..d586d62 100644 (file)
@@ -11,7 +11,7 @@
 #include "wave5-vpu.h"
 
 #define FMT_TYPES      2
-#define MAX_FMTS       3
+#define MAX_FMTS       6
 
 void wave5_cleanup_instance(struct vpu_instance *inst);
 int wave5_vpu_release_device(struct file *filp,
index f3e8124..5d10f3c 100644 (file)
@@ -29,43 +29,43 @@ static const struct vpu_format dec_fmt_list[FMT_TYPES][MAX_FMTS] = {
                },
        },
        [VPU_FMT_TYPE_RAW] = {
-               /*{
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_YUV420,
+               {
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_YUV420M,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,
                        .min_height = 8,
                },
                {
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV12,
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV12M,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,
                        .min_height = 8,
                },
                {
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV21,
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV21M,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,
                        .min_height = 8,
-               },*/
+               },
                {
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_YUV420M,
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_YUV420,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,
                        .min_height = 8,
                },
                {
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV12M,
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV12,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,
                        .min_height = 8,
                },
                {
-                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV21M,
+                       .v4l2_pix_fmt = V4L2_PIX_FMT_NV21,
                        .max_width = 8192,
                        .min_width = 8,
                        .max_height = 4320,