-
-
Save CounterPillow/6bea809f15ada7ddd3a3d7a4994fdc4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.yaml b/Documentation/devicetree/bindings/media/rockchip-rga.yaml | |
index dd645ddccb07..8adb18245187 100644 | |
--- a/Documentation/devicetree/bindings/media/rockchip-rga.yaml | |
+++ b/Documentation/devicetree/bindings/media/rockchip-rga.yaml | |
@@ -20,9 +20,11 @@ properties: | |
oneOf: | |
- const: rockchip,rk3288-rga | |
- const: rockchip,rk3399-rga | |
+ - const: rockchip,rk356x-rga | |
- items: | |
- const: rockchip,rk3228-rga | |
- const: rockchip,rk3288-rga | |
+ - const: rockchip,rk356x-rga | |
reg: | |
maxItems: 1 | |
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi | |
index 46d9552f6028..e05ee09c7854 100644 | |
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi | |
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi | |
@@ -386,6 +386,17 @@ power-domain@RK3568_PD_RKVENC { | |
}; | |
}; | |
+ rga: rga@fdeb0000 { | |
+ compatible = "rockchip,rk356x-rga"; | |
+ reg = <0x0 0xfdeb0000 0x0 0x1000>; | |
+ interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; | |
+ clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru CLK_RGA_CORE>; | |
+ clock-names = "aclk", "hclk", "sclk"; | |
+ resets = <&cru SRST_RGA_CORE>, <&cru SRST_A_RGA>, <&cru SRST_H_RGA>; | |
+ reset-names = "core", "axi", "ahb"; | |
+ power-domains = <&power RK3568_PD_RGA>; | |
+ }; | |
+ | |
sdmmc2: mmc@fe000000 { | |
compatible = "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc"; | |
reg = <0x0 0xfe000000 0x0 0x4000>; | |
diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c | |
index 4de5e8d2b261..4af5a8d00718 100644 | |
--- a/drivers/media/platform/rockchip/rga/rga.c | |
+++ b/drivers/media/platform/rockchip/rga/rga.c | |
@@ -892,7 +892,7 @@ static int rga_probe(struct platform_device *pdev) | |
} | |
rga->dst_mmu_pages = | |
(unsigned int *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 3); | |
- if (rga->dst_mmu_pages) { | |
+ if (!rga->dst_mmu_pages) { | |
ret = -ENOMEM; | |
goto free_src_pages; | |
} | |
@@ -977,6 +977,9 @@ static const struct of_device_id rockchip_rga_match[] = { | |
{ | |
.compatible = "rockchip,rk3399-rga", | |
}, | |
+ { | |
+ .compatible = "rockchip,rk356x-rga", | |
+ }, | |
{}, | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment