]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ARM: dts sunxi: Relax a bit the CMA pool allocation range
authorMaxime Ripard <maxime@cerno.tech>
Sat, 4 Jul 2020 13:08:29 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:59:45 +0000 (09:59 +0200)
[ Upstream commit 92025b90f18d45e26b7f17d68756b1abd771b9d3 ]

The hardware codec on the A10, A10s, A13 and A20 needs buffer in the
first 256MB of RAM. This was solved by setting the CMA pool at a fixed
address in that range.

However, in recent kernels there's something else that comes in and
reserve some range that end up conflicting with our default pool
requirement, and thus makes its reservation fail.

The video codec will then use buffers from the usual default pool,
outside of the range it can access, and will fail to decode anything.

Since we're only concerned about that 256MB, we can however relax the
allocation to just specify the range that's allowed, and not try to
enforce a specific address.

Fixes: 5949bc5602cc ("ARM: dts: sun4i-a10: Add Video Engine and reserved memory nodes")
Fixes: 960432010156 ("ARM: dts: sun5i: Add Video Engine and reserved memory nodes")
Fixes: c2a641a74850 ("ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200704130829.34297-1-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/boot/dts/sun5i.dtsi
arch/arm/boot/dts/sun7i-a20.dtsi

index 4c268b70b73571e1ec6a79a8093217aa25342b89..e0a9b371c248fd3a62d1a80c740d92bfbdbf17b9 100644 (file)
                default-pool {
                        compatible = "shared-dma-pool";
                        size = <0x6000000>;
-                       alloc-ranges = <0x4a000000 0x6000000>;
+                       alloc-ranges = <0x40000000 0x10000000>;
                        reusable;
                        linux,cma-default;
                };
index 6befa236ba99d43b1f97a1d8df0cc64391c20cc7..fd31da8fd311208e1fe0dee5b656a5b40f594724 100644 (file)
                default-pool {
                        compatible = "shared-dma-pool";
                        size = <0x6000000>;
-                       alloc-ranges = <0x4a000000 0x6000000>;
+                       alloc-ranges = <0x40000000 0x10000000>;
                        reusable;
                        linux,cma-default;
                };
index 8aebefd6accfee08a67dd7a12ecb41a7576f470d..1f8b45f07e58ff9aa0ce75caef134725297db67b 100644 (file)
                default-pool {
                        compatible = "shared-dma-pool";
                        size = <0x6000000>;
-                       alloc-ranges = <0x4a000000 0x6000000>;
+                       alloc-ranges = <0x40000000 0x10000000>;
                        reusable;
                        linux,cma-default;
                };