From: Som Qin Date: Wed, 2 Aug 2023 03:38:51 +0000 (+0800) Subject: Media:Wave5: Add contiguous planes format support (YUV420/NV12/NV21) X-Git-Tag: accepted/tizen/unified/riscv/20231013.094029~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F299598%2F2;p=platform%2Fkernel%2Flinux-starfive.git Media:Wave5: Add contiguous planes format support (YUV420/NV12/NV21) Signed-off-by: Som Qin [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 Change-Id: I4203a253b3c7577a5849ca2582099a2cf07985ea --- diff --git a/drivers/media/platform/chips-media/wave5/wave5-helper.h b/drivers/media/platform/chips-media/wave5/wave5-helper.h index 8a8dda8..d586d62 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-helper.h +++ b/drivers/media/platform/chips-media/wave5/wave5-helper.h @@ -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, diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index f3e8124..5d10f3c 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -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,