Commit a4c902887f1d8ea3eebbbdfb3b7c85964a3eadec

Authored by Maxime Ripard
Committed by Greg Kroah-Hartman
1 parent 0307da6866

ARM: dts sunxi: Relax a bit the CMA pool allocation range

[ 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>

Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff

arch/arm/boot/dts/sun4i-a10.dtsi
... ... @@ -198,7 +198,7 @@
198 198 default-pool {
199 199 compatible = "shared-dma-pool";
200 200 size = <0x6000000>;
201   - alloc-ranges = <0x4a000000 0x6000000>;
  201 + alloc-ranges = <0x40000000 0x10000000>;
202 202 reusable;
203 203 linux,cma-default;
204 204 };
arch/arm/boot/dts/sun5i.dtsi
... ... @@ -117,7 +117,7 @@
117 117 default-pool {
118 118 compatible = "shared-dma-pool";
119 119 size = <0x6000000>;
120   - alloc-ranges = <0x4a000000 0x6000000>;
  120 + alloc-ranges = <0x40000000 0x10000000>;
121 121 reusable;
122 122 linux,cma-default;
123 123 };
arch/arm/boot/dts/sun7i-a20.dtsi
... ... @@ -180,7 +180,7 @@
180 180 default-pool {
181 181 compatible = "shared-dma-pool";
182 182 size = <0x6000000>;
183   - alloc-ranges = <0x4a000000 0x6000000>;
  183 + alloc-ranges = <0x40000000 0x10000000>;
184 184 reusable;
185 185 linux,cma-default;
186 186 };