Re: [PATCH 1/1] ARM: dts: imx6qdl: Add reserved memory area for CMA memory

From: Alexander Stein
Date: Wed Aug 28 2024 - 02:12:35 EST


Am Dienstag, 27. August 2024, 16:32:10 CEST schrieb Fabio Estevam:
> Hi Alexander,
>
> On Tue, Aug 27, 2024 at 11:25 AM Alexander Stein
> <alexander.stein@xxxxxxxxxxxxxxx> wrote:
> >
> > Default CMA size is too small for HDMI output and VPU usage. Increase the
> > default size by providing a CMA memory area.
> ....
> > + linux,cma {
> > + compatible = "shared-dma-pool";
> > + reusable;
> > + size = <0x14000000>;
>
> Just curious: how did you calculate that this is a suitable CMA memory
> area size?

Just after startup and a simple weston running on a 1080 HDMI output I habe
this CMA status:
> # grep Cma /proc/meminfo
> CmaTotal: 327680 kB
> CmaFree: 137764 kB

AFAIK also DMA setup is using CMA memory.

When playing (and decoding) bbb_sunflower_1080p_30fps_normal.mp4 free CMA memory
shrinks down to ~60MiB
> # grep Cma /proc/meminfo
> CmaTotal: 327680 kB
> CmaFree: 63144 kB

So, 260MiB should be enough (but just barely). But to give some spare memory
it has been increased to 320MiB.

Best regards,
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/