mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
103 lines
3.5 KiB
Diff
103 lines
3.5 KiB
Diff
From 1b994ed915398729aa50c709628176f928b2f0dc Mon Sep 17 00:00:00 2001
|
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
Date: Sat, 1 Jun 2024 15:51:07 +0000
|
|
Subject: [PATCH 66/69] WIP: media: meson: vdec: add GXLX SoC platform
|
|
|
|
The GXLX SoC is a GXL variant that omits VP9 codec support.
|
|
|
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
---
|
|
drivers/staging/media/meson/vdec/vdec.c | 2 ++
|
|
.../staging/media/meson/vdec/vdec_platform.c | 34 +++++++++++++++++++
|
|
.../staging/media/meson/vdec/vdec_platform.h | 2 ++
|
|
3 files changed, 38 insertions(+)
|
|
|
|
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
|
|
index de3e0345ab7c..5e5b296f93ba 100644
|
|
--- a/drivers/staging/media/meson/vdec/vdec.c
|
|
+++ b/drivers/staging/media/meson/vdec/vdec.c
|
|
@@ -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",
|
|
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
|
index 083adf0d07d9..870e61dedd81 100644
|
|
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
|
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
|
@@ -82,6 +82,34 @@ 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,
|
|
+ .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,
|
|
+ },
|
|
+};
|
|
+
|
|
static const struct amvdec_format vdec_formats_gxm[] = {
|
|
{
|
|
.pixfmt = V4L2_PIX_FMT_VP9,
|
|
@@ -190,6 +218,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),
|
|
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.h b/drivers/staging/media/meson/vdec/vdec_platform.h
|
|
index 731877a771f4..88ca4a9db8a8 100644
|
|
--- a/drivers/staging/media/meson/vdec/vdec_platform.h
|
|
+++ b/drivers/staging/media/meson/vdec/vdec_platform.h
|
|
@@ -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;
|
|
|
|
--
|
|
2.34.1
|
|
|