SBC_builder/patch/kernel/rockchip64-6.16/media-0003-rk3568-disable-hantro-h264.patch
2025-08-21 23:20:43 +02:00

98 lines
4.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Sun, 28 Jul 2024 14:35:34 +0800
Subject: [ARCHEOLOGY] rockchip64-edge: disable hantro g1 h264 decoder on
rk356x
> X-Git-Archeology: - Revision d5cb0d6732f7ab06f34ee6ce18ed6bef266c3c4a: https://github.com/armbian/build/commit/d5cb0d6732f7ab06f34ee6ce18ed6bef266c3c4a
> X-Git-Archeology: Date: Sun, 28 Jul 2024 14:35:34 +0800
> X-Git-Archeology: From: amazingfate <liujianfeng1994@gmail.com>
> X-Git-Archeology: Subject: rockchip64-edge: disable hantro g1 h264 decoder on rk356x
> X-Git-Archeology:
---
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +-
drivers/media/platform/verisilicon/hantro_drv.c | 1 -
drivers/media/platform/verisilicon/hantro_hw.h | 1 -
drivers/media/platform/verisilicon/rockchip_vpu_hw.c | 21 ++--------
4 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -1141,7 +1141,7 @@ power-domain@RK3588_PD_SDMMC {
};
vpu121: video-codec@fdb50000 {
- compatible = "rockchip,rk3588-vpu121", "rockchip,rk3568-vpu";
+ compatible = "rockchip,rk3588-vpu121", "rockchip,rk3328-vpu";
reg = <0x0 0xfdb50000 0x0 0x800>;
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH 0>;
interrupt-names = "vdpu";
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index 111111111111..222222222222 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -721,7 +721,6 @@ static const struct of_device_id of_hantro_match[] = {
{ .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, },
{ .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, },
{ .compatible = "rockchip,rk3568-vepu", .data = &rk3568_vepu_variant, },
- { .compatible = "rockchip,rk3568-vpu", .data = &rk3568_vpu_variant, },
{ .compatible = "rockchip,rk3588-vepu121", .data = &rk3568_vepu_variant, },
{ .compatible = "rockchip,rk3588-av1-vpu", .data = &rk3588_vpu981_variant, },
#endif
diff --git a/drivers/media/platform/verisilicon/hantro_hw.h b/drivers/media/platform/verisilicon/hantro_hw.h
index 111111111111..222222222222 100644
--- a/drivers/media/platform/verisilicon/hantro_hw.h
+++ b/drivers/media/platform/verisilicon/hantro_hw.h
@@ -413,7 +413,6 @@ extern const struct hantro_variant rk3288_vpu_variant;
extern const struct hantro_variant rk3328_vpu_variant;
extern const struct hantro_variant rk3399_vpu_variant;
extern const struct hantro_variant rk3568_vepu_variant;
-extern const struct hantro_variant rk3568_vpu_variant;
extern const struct hantro_variant rk3588_vpu981_variant;
extern const struct hantro_variant sama5d4_vdec_variant;
extern const struct hantro_variant sunxi_vpu_variant;
diff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
index 111111111111..222222222222 100644
--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
@@ -740,10 +740,9 @@ const struct hantro_variant rk3288_vpu_variant = {
const struct hantro_variant rk3328_vpu_variant = {
.dec_offset = 0x400,
- .dec_fmts = rockchip_vdpu2_dec_fmts,
- .num_dec_fmts = ARRAY_SIZE(rockchip_vdpu2_dec_fmts),
- .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER |
- HANTRO_H264_DECODER,
+ .dec_fmts = rk3399_vpu_dec_fmts,
+ .num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts),
+ .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER,
.codec_ops = rk3399_vpu_codec_ops,
.irqs = rockchip_vdpu2_irqs,
.num_irqs = ARRAY_SIZE(rockchip_vdpu2_irqs),
@@ -787,20 +786,6 @@ const struct hantro_variant rk3568_vepu_variant = {
.num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names)
};
-const struct hantro_variant rk3568_vpu_variant = {
- .dec_offset = 0x400,
- .dec_fmts = rockchip_vdpu2_dec_fmts,
- .num_dec_fmts = ARRAY_SIZE(rockchip_vdpu2_dec_fmts),
- .codec = HANTRO_MPEG2_DECODER |
- HANTRO_VP8_DECODER | HANTRO_H264_DECODER,
- .codec_ops = rk3399_vpu_codec_ops,
- .irqs = rockchip_vdpu2_irqs,
- .num_irqs = ARRAY_SIZE(rockchip_vdpu2_irqs),
- .init = rockchip_vpu_hw_init,
- .clk_names = rockchip_vpu_clk_names,
- .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names)
-};
-
const struct hantro_variant px30_vpu_variant = {
.enc_offset = 0x0,
.enc_fmts = rockchip_vpu_enc_fmts,
--
Armbian