summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSom Qin <som.qin@starfivetech.com>2023-08-02 06:38:51 +0300
committerSom Qin <som.qin@starfivetech.com>2023-08-03 11:18:45 +0300
commit415a7259816f9ed1904827bc4e6649566b948915 (patch)
tree689502de03ef159ccd2054dc167020bbeb1edbde
parent53b1279c6f22c365e69b46f2da4353e2f9d76493 (diff)
downloadlinux-415a7259816f9ed1904827bc4e6649566b948915.tar.xz
Media:Wave5: Add contiguous planes format support (YUV420/NV12/NV21)
Signed-off-by: Som Qin <som.qin@starfivetech.com>
-rw-r--r--drivers/media/platform/chips-media/wave5/wave5-helper.h2
-rw-r--r--drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/platform/chips-media/wave5/wave5-helper.h b/drivers/media/platform/chips-media/wave5/wave5-helper.h
index 8a8dda8242f6..d586d624275e 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 f3e81243d866..5d10f3c7365a 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,