From nobody Thu Feb 12 09:21:23 2026 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 925D21474A8; Thu, 13 Jun 2024 15:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291354; cv=none; b=WW/Ycrx/X8KRg/NLQFOTy+BJ4DpEVwDnL23EG4FtU2OWxCabTK75+PXKMiPdSQN+zgkT13z9FdPDr5OShZ2s+9K+sSc68mue9lkWQ80nLZP9SbO2XoFl2zyXVXK2LlGAfNlzPjnvt9B1q6VLEMnPmNCdHwe2NJeabZ3bBcUxg+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291354; c=relaxed/simple; bh=5yUqq95OEzg8Vg07j3JEbfDJgM9RTXqe4IOXvDeb6BE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iBopqKJg9lP9S8gzSpYcF7LDFlh92cSm723n18y1daIikNTRyAQakX/nVcbaiftAIXYMKbCPzmW8Zcfv4RjTyZ91IcW9IN/vwXMoEiVujn8lnIpDxZh7dcb7o5CvGWaKJSno4ESYknu+M3BQVzpDk1cx3YyfMV9WpyKYGPEYMis= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=T0BVL1PL; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="T0BVL1PL" Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45DF95dq130716; Thu, 13 Jun 2024 10:09:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718291345; bh=+JRL1+N5yaYXTkwzYeHn0V3MvWD0ajIJEVtzSMxbctA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=T0BVL1PLhIXhdS9vMsWMg5hZJlZZwW+BBCaDWaUi8CE7X5kjO07RY434+Alb534Ry T5G7vfLHkmwGZZf96FB+ua8eLnURmiE5cdV8ki/Mh07ueWXqRl63J+EqQ4oT2X6tHQ X+v6VQu2NtyPMOPhWvnVq5lqUKo7aSWw4X6z/m+M= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45DF95hs029220 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Jun 2024 10:09:05 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 13 Jun 2024 10:09:05 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 13 Jun 2024 10:09:05 -0500 Received: from localhost (ti.dhcp.ti.com [172.24.227.95] (may be forged)) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45DF94Eh020670; Thu, 13 Jun 2024 10:09:05 -0500 From: Devarsh Thakkar To: , , , , , , , , CC: , , , , , , , Subject: [PATCH 1/3] arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA Date: Thu, 13 Jun 2024 20:39:00 +0530 Message-ID: <20240613150902.2173582-2-devarsht@ti.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240613150902.2173582-1-devarsht@ti.com> References: <20240613150902.2173582-1-devarsht@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Randolph Sapp --- 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/bo= ot/dts/ti/k3-am62x-sk-common.dtsi index f4948b937627..52231bfe60fe 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -48,6 +48,14 @@ ramoops@9ca00000 { pmsg-size =3D <0x8000>; }; =20 + /* global cma region */ + linux,cma { + compatible =3D "shared-dma-pool"; + reusable; + size =3D <0x00 0x8000000>; + linux,cma-default; + }; + secure_tfa_ddr: tfa@9e780000 { reg =3D <0x00 0x9e780000 0x00 0x80000>; alignment =3D <0x1000>; --=20 2.39.1 From nobody Thu Feb 12 09:21:23 2026 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 130011494C3; Thu, 13 Jun 2024 15:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291356; cv=none; b=uZdPQFjMYTuXsAwC+RlzY7RqUMHnJKg6/V0i8uQ5JQWza8F3cfknVmiGffdKfiL3DvZmkQtdguofBlb9BRQ5o+zN9+a7hnpz1i9cfIAH4GFh4blgrSH3KYTDdIT26Yt3FHTnRfvltwbjjX6kW4yvB4f7N0wtqb0iP4O4It30Vx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291356; c=relaxed/simple; bh=3mLOJ2my3NU/eiFRV7dchfiOohRvCmAOtTA2fOVBznM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kme2Qki8+TzwLxR29bPEMD4W3E8d/QRWt/yeZmOT1w4UHUzYwh2+gaAHVUTIobpYRtQeBg2L63ezTmAejYNMLViSju/3A3sZ48gRZHCmlV62BEEsiw4EE/2nY2BQYl45uXmD0vjoQdIp1IGH9y2oKgYV9xQuzN0/MluRr10pTAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=VRm0sqNo; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="VRm0sqNo" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45DF97tc109712; Thu, 13 Jun 2024 10:09:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718291347; bh=z3xwUJd1/KvLc1DEmjhfHhBuoHwF+UuatILAA85VS3E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VRm0sqNobJDAspZjsO8gg/HB3346ZnoGS5LPi9ThRPojJq1ZTqbpJQaE1pkKnjILv aSCBqTQJ74ETvUqYNsO5YvOc89xAAWw9k3VeywqNG5LRSVK0SzSPffgxnQBxvfaKmV IAWmwIoYAyiisuHpm+o60pPrPVjfGk+qWYueAXJY= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45DF979t044626 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Jun 2024 10:09:07 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 13 Jun 2024 10:09:06 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 13 Jun 2024 10:09:07 -0500 Received: from localhost (ti.dhcp.ti.com [172.24.227.95] (may be forged)) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45DF96ES020847; Thu, 13 Jun 2024 10:09:06 -0500 From: Devarsh Thakkar To: , , , , , , , , CC: , , , , , , , Subject: [PATCH 2/3] arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB of global CMA Date: Thu, 13 Jun 2024 20:39:01 +0530 Message-ID: <20240613150902.2173582-3-devarsht@ti.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240613150902.2173582-1-devarsht@ti.com> References: <20240613150902.2173582-1-devarsht@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Content-Type: text/plain; charset="utf-8" Reserve 576MiB of CMA as global CMA pool starting after initial 1GiB of DDR. AM62ax has different multimedia components such as Camera, Display, H.264 VPU and JPEG Encoder which use CMA for buffer allocations. The 12x 720x480 realtime VPU decode use-case requires 544MiB of CMA, additional 32MiB is kept as buffer in case some other peripheral also require it while VPU is running. The reason to choose latter 1GiB is to not overlap with existing memory map which is utilizing initial 1GiB for remoteproc firmwares as shared here [1]. Also some drivers such as JPEG require 32bit addressing so not allocating from higher DDR address. Link: https://lore.kernel.org/all/20240605124859.3034-5-hnagalla@ti.com [1] Signed-off-by: Devarsh Thakkar Reviewed-by: Randolph Sapp Tested-by: Brandon Brnich --- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/= ti/k3-am62a7-sk.dts index e026f65738b3..67faf46d7a35 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -40,6 +40,15 @@ reserved-memory { #size-cells =3D <2>; ranges; =20 + /* global cma region */ + linux,cma { + compatible =3D "shared-dma-pool"; + reusable; + size =3D <0x00 0x24000000>; + alloc-ranges =3D <0x00 0xc0000000 0x00 0x24000000>; + linux,cma-default; + }; + secure_tfa_ddr: tfa@9e780000 { reg =3D <0x00 0x9e780000 0x00 0x80000>; alignment =3D <0x1000>; --=20 2.39.1 From nobody Thu Feb 12 09:21:23 2026 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DCD91494D5; Thu, 13 Jun 2024 15:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291357; cv=none; b=DlK6yLX9WvsFIzYKebAQ8o/r1eIMrO1eOwc97EuKN90PyXQPZLgwjs8OsTtuyrYezoKbV4I5L9/CENEPFV4EDnEJY10TShuNnh00RFuN9wTCh0Wb0UcYzc6d7zPEuRgI21+zdDNzaD+oQG+giFeGnQrsrrc6OtSQM29I7aQUqrA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291357; c=relaxed/simple; bh=AItEJV3f/irbeMaAtG/BznIdWe8pOiuM2AA7s21Sr6I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iil+Lc/LtMe8Y+xsslQNuL8rh7UDB2kIULax7kaSKPo3OxKZvlGf0ftFjdTGsppB+8vGvwDEMNPY+SSgT7gzvdCQqh7pqFUqILRh8iZwAN0Jy0K5L9GROAjeANUXVfT9xBwa+1TIQkLjQpUJ/jtgCBHI5bx7UqDqkLsi1QTqITc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=LS85mebG; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="LS85mebG" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45DF98Es079901; Thu, 13 Jun 2024 10:09:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718291348; bh=sE4cl2s/d+Mn4dSnjIpEm+GQgW8R9GDKh3dxva06fOo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LS85mebGUxLPVee16wBkHLpVJr8MsEbDeuC83aMuf7NuLxLN9nem0JXQv2meFNMTK Y5Dm9xWDL4OefUqj2tT77y0B6eOa0KZZVbeRF59yDsdZ50Pm5VqPOVyUfK2xjfeCGZ hUgDl7LU8sMnw0r6W2w+X2W9jeTq9G4FE0F7Pw0s= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45DF98WH012968 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Jun 2024 10:09:08 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 13 Jun 2024 10:09:08 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 13 Jun 2024 10:09:08 -0500 Received: from localhost (ti.dhcp.ti.com [172.24.227.95] (may be forged)) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45DF97HO007811; Thu, 13 Jun 2024 10:09:08 -0500 From: Devarsh Thakkar To: , , , , , , , , CC: , , , , , , , Subject: [PATCH 3/3] arm64: dts: ti: k3-am62p5-sk: Reserve 576 MiB of global CMA Date: Thu, 13 Jun 2024 20:39:02 +0530 Message-ID: <20240613150902.2173582-4-devarsht@ti.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240613150902.2173582-1-devarsht@ti.com> References: <20240613150902.2173582-1-devarsht@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Content-Type: text/plain; charset="utf-8" From: Brandon Brnich AM62p has different multimedia components such as Camera, Display, H264 Video Codec which uses CMA for buffer allocations. We require 576MiB for 12 channel decode-to-encode 720x480@30FPS use case. Signed-off-by: Brandon Brnich Signed-off-by: Devarsh Thakkar Reviewed-by: Randolph Sapp --- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/= ti/k3-am62p5-sk.dts index fb980d46e304..5ef74d9f8eea 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts @@ -48,6 +48,13 @@ reserved-memory { #size-cells =3D <2>; ranges; =20 + linux,cma { + compatible =3D "shared-dma-pool"; + reusable; + size =3D <0x00 0x24000000>; + linux,cma-default; + }; + secure_tfa_ddr: tfa@9e780000 { reg =3D <0x00 0x9e780000 0x00 0x80000>; no-map; --=20 2.39.1