lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230805193355.o657pwbq2w3tciui@vehicular>
Date:   Sat, 5 Aug 2023 14:33:55 -0500
From:   Nishanth Menon <nm@...com>
To:     Devarsh Thakkar <devarsht@...com>, <afd@...com>
CC:     <vigneshr@...com>, <kristo@...nel.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <a-bhatia1@...com>, <j-luthra@...com>, <praneeth@...com>,
        <j-choudhary@...com>
Subject: Re: [PATCH] arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of
 global CMA

On 16:44-20230803, Devarsh Thakkar wrote:
> Reserve 128MiB of global CMA which is also marked as re-usable
> so that OS can also use the same if peripheral drivers are not using the
> same.
> 
> AM62x supports multimedia components such as GPU, dual Display and Camera.
> Assuming the worst-case scenario where all 3 are run in parallel below
> is the calculation :
> 
> 1) OV5640 camera sensor supports 1920x1080 resolution
> -> 1920 width x 1080 height x 2 bytesperpixel x 8 buffers
>    (default in yavta) : 32MiB
> 
> 2) 1920x1200 Microtips LVDS panel supported
> -> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers :
>    16 MiB
> 
> 3) 1920x1080 HDMI display supported
> -> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers :
>    15.82 MiB which is ~16 MiB
> 
> 4) IMG GPU shares with display allocated buffers while rendering
>    but in case some dedicated operation viz color conversion,
>    keeping same window of ~16 MiB for GPU too.
> 
> Total is 80 MiB and adding 32 MiB for other peripherals and extra
> 16 MiB to keep as buffer for fragmentation thus rounding total to 128
> MiB.
> 
> Signed-off-by: Devarsh Thakkar <devarsht@...com>
> Acked-by: Darren Etheridge <detheridge@...com>
> Signed-off-by: Vignesh Raghavendra <vigneshr@...com>
> ---

I don't think this is right approach. There are other techniques
than having to do this (Andrew: please comment) and require drivers to
behave properly. I am esp concerned since there are platforms based on
am62x and just 256MB DDR.

>  arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> index 34c8ffc553ec..9dd6e23ca9ca 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> @@ -47,6 +47,14 @@ ramoops@...00000 {
>  			pmsg-size = <0x8000>;
>  		};
>  
> +		/* global cma region */
> +		linux,cma {
> +			compatible = "shared-dma-pool";
> +			reusable;
> +			size = <0x00 0x8000000>;
> +			linux,cma-default;
> +		};
> +
>  		secure_tfa_ddr: tfa@...80000 {
>  			reg = <0x00 0x9e780000 0x00 0x80000>;
>  			alignment = <0x1000>;
> -- 
> 2.34.1
> 

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ