From bba724597d7df40df949cd4ebbdb59aa488cd908 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 4 Jun 2024 10:49:58 +0000
Subject: [PATCH 32/36] WIP: media: meson: vdec: add HEVC and remove MPEG1/2
 from GXLX

This patch is required until GXLX support has been merged upstream.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 .../staging/media/meson/vdec/vdec_platform.c  | 34 +++++++------------
 1 file changed, 12 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
index ca0cb417d793..870e61dedd81 100644
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
@@ -84,6 +84,18 @@ static const struct amvdec_format vdec_formats_gxl[] = {
 
 static const struct amvdec_format vdec_formats_gxlx[] = {
 	{
+		.pixfmt = V4L2_PIX_FMT_HEVC,
+		.min_buffers = 4,
+		.max_buffers = 24,
+		.max_width = 3840,
+		.max_height = 2160,
+		.vdec_ops = &vdec_hevc_ops,
+		.codec_ops = &codec_hevc_ops,
+		.firmware_path = "meson/vdec/gxl_hevc.bin",
+		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
+		.flags = V4L2_FMT_FLAG_COMPRESSED |
+			 V4L2_FMT_FLAG_DYN_RESOLUTION,
+	}, {
 		.pixfmt = V4L2_PIX_FMT_H264,
 		.min_buffers = 2,
 		.max_buffers = 24,
@@ -95,28 +107,6 @@ static const struct amvdec_format vdec_formats_gxlx[] = {
 		.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,
 	},
 };
 
-- 
2.34.1

