media: meson: vdec: add GXLX SoC platform
authorChristian Hewitt <christianshewitt@gmail.com>
Tue, 4 Jun 2024 05:15:33 +0000 (05:15 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 9 Aug 2024 05:56:37 +0000 (07:56 +0200)
Add the GXLX SoC platform which is based on GXL but omits the VP9 codec.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/meson/vdec/vdec.c
drivers/staging/media/meson/vdec/vdec_platform.c
drivers/staging/media/meson/vdec/vdec_platform.h

index de3e034..5e5b296 100644 (file)
@@ -982,6 +982,8 @@ static const struct of_device_id vdec_dt_match[] = {
          .data = &vdec_platform_gxm },
        { .compatible = "amlogic,gxl-vdec",
          .data = &vdec_platform_gxl },
+       { .compatible = "amlogic,gxlx-vdec",
+         .data = &vdec_platform_gxlx },
        { .compatible = "amlogic,g12a-vdec",
          .data = &vdec_platform_g12a },
        { .compatible = "amlogic,sm1-vdec",
index 70c9fd7..66bb307 100644 (file)
@@ -101,6 +101,44 @@ static const struct amvdec_format vdec_formats_gxl[] = {
        },
 };
 
+static const struct amvdec_format vdec_formats_gxlx[] = {
+       {
+               .pixfmt = V4L2_PIX_FMT_H264,
+               .min_buffers = 2,
+               .max_buffers = 24,
+               .max_width = 3840,
+               .max_height = 2160,
+               .vdec_ops = &vdec_1_ops,
+               .codec_ops = &codec_h264_ops,
+               .firmware_path = "meson/vdec/gxl_h264.bin",
+               .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
+               .flags = V4L2_FMT_FLAG_COMPRESSED |
+                        V4L2_FMT_FLAG_DYN_RESOLUTION,
+       }, {
+               .pixfmt = V4L2_PIX_FMT_MPEG1,
+               .min_buffers = 8,
+               .max_buffers = 8,
+               .max_width = 1920,
+               .max_height = 1080,
+               .vdec_ops = &vdec_1_ops,
+               .codec_ops = &codec_mpeg12_ops,
+               .firmware_path = "meson/vdec/gxl_mpeg12.bin",
+               .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
+               .flags = V4L2_FMT_FLAG_COMPRESSED,
+       }, {
+               .pixfmt = V4L2_PIX_FMT_MPEG2,
+               .min_buffers = 8,
+               .max_buffers = 8,
+               .max_width = 1920,
+               .max_height = 1080,
+               .vdec_ops = &vdec_1_ops,
+               .codec_ops = &codec_mpeg12_ops,
+               .firmware_path = "meson/vdec/gxl_mpeg12.bin",
+               .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
+               .flags = V4L2_FMT_FLAG_COMPRESSED,
+       },
+};
+
 static const struct amvdec_format vdec_formats_gxm[] = {
        {
                .pixfmt = V4L2_PIX_FMT_VP9,
@@ -263,6 +301,12 @@ const struct vdec_platform vdec_platform_gxl = {
        .revision = VDEC_REVISION_GXL,
 };
 
+const struct vdec_platform vdec_platform_gxlx = {
+       .formats = vdec_formats_gxlx,
+       .num_formats = ARRAY_SIZE(vdec_formats_gxlx),
+       .revision = VDEC_REVISION_GXLX,
+};
+
 const struct vdec_platform vdec_platform_gxm = {
        .formats = vdec_formats_gxm,
        .num_formats = ARRAY_SIZE(vdec_formats_gxm),
index 731877a..88ca4a9 100644 (file)
@@ -14,6 +14,7 @@ struct amvdec_format;
 enum vdec_revision {
        VDEC_REVISION_GXBB,
        VDEC_REVISION_GXL,
+       VDEC_REVISION_GXLX,
        VDEC_REVISION_GXM,
        VDEC_REVISION_G12A,
        VDEC_REVISION_SM1,
@@ -28,6 +29,7 @@ struct vdec_platform {
 extern const struct vdec_platform vdec_platform_gxbb;
 extern const struct vdec_platform vdec_platform_gxm;
 extern const struct vdec_platform vdec_platform_gxl;
+extern const struct vdec_platform vdec_platform_gxlx;
 extern const struct vdec_platform vdec_platform_g12a;
 extern const struct vdec_platform vdec_platform_sm1;