From patchwork Thu Aug 3 11:14:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devarsh Thakkar X-Patchwork-Id: 130579 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1143668vqx; Thu, 3 Aug 2023 06:20:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlHSxfWKjRpPKW1/oPnamlnVfRfewN79jJi8rJI83h3qI9uGAhcCiE3Jac3z5s6ESV00J2P0 X-Received: by 2002:a17:907:724f:b0:991:f0dc:c930 with SMTP id ds15-20020a170907724f00b00991f0dcc930mr11483729ejc.16.1691068830333; Thu, 03 Aug 2023 06:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691068830; cv=none; d=google.com; s=arc-20160816; b=YQITYz+F8PfB7PX1JG6z0rLiYz2hVjqXCvrkkyQV6DOu0oCJp11yf0LLa+OUt+v2yI beKJsg2pc6Y5/u3kX0LNMU+m/qUlL9+EypwVVGoF537v9SwGo3CGm2qqiDfSwEdLToxJ nEMgIvEyPtOMDj8G5rboJpzSw84VwsIYkNIlBTbJGve31B1dohdZEcfAyDPUJjryK7S6 uYVleVoIIpuctLV1wpuKFueIsy734sW+MMp4j5oLg+wWk43LpqwpwG7p4A0apHTR+vS3 oHHYNuPzNtoFyfgkIuirM9kOc3z7oqeaPKMthnRjuLNZENzRNxWGJ718x+vYfiWYlKJA 63MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Me/6ZJVB8QBwCQFOpcmLDOu+F661wRbjDCNT/Gw3BTU=; fh=NoKigBj+/8TwOdQGpdGIS3UgR0RUwNc2yiSZVtfDwS8=; b=uTV7MuUZCHlLpRBsFmvhGplDPUyN9WcB/YcqqUykTWSxR6tYdPcBt+/lixCthWgjqE y7EjosTpIEFCQsiQ7xZAke0ieYsND2VXU5X2okF1aLDMgGO1tBbtw9Sl35S4RqwAsmc9 pIoEn+Q1nM+gPKIHCCLS1izfBC9lLdRmP85hpCk4f5qAWR0xmZWUbgeUxq2EC26rBP2h EnibfGM8C1i04IJUu8t/ZdZMmJjKS+HYIU42iyeOkHY3AVnWNK3HA6yGDQ+GwA03v3Z6 hns/ifAnAOcU3X9VdQi0IrKZtAWZKXh1hy4jP+hXYHE90PvkeII9AuMAxNL+dH4ai1xY HWQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NN7s+ao+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a170906228800b00992b32e3e3esi11355292eja.468.2023.08.03.06.20.06; Thu, 03 Aug 2023 06:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NN7s+ao+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232505AbjHCLPO (ORCPT + 99 others); Thu, 3 Aug 2023 07:15:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234240AbjHCLPJ (ORCPT ); Thu, 3 Aug 2023 07:15:09 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D2C61A5; Thu, 3 Aug 2023 04:15:05 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 373BEv1g095445; Thu, 3 Aug 2023 06:14:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691061297; bh=Me/6ZJVB8QBwCQFOpcmLDOu+F661wRbjDCNT/Gw3BTU=; h=From:To:CC:Subject:Date; b=NN7s+ao+IokQP2fGCa31nN7Kszf6no8Hc/SLI0q08/ZXZj9kynH3BSq1skV5sd0HM y191z1bSwwYKrOddAXS3t8wH+OadZB5YSkLA/3pprVzjfQMRIZqoyqCs4WCAu4RUMa QYUxsZY6K7CXn1rgnUGqGvLZVXd6iPzyulK+5iVA= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 373BEv6Y037080 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Aug 2023 06:14:57 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 3 Aug 2023 06:14:56 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) 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, 3 Aug 2023 06:14:56 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 373BEukW036047; Thu, 3 Aug 2023 06:14:56 -0500 From: Devarsh Thakkar To: , , , , , , , , CC: , , , Subject: [PATCH] arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA Date: Thu, 3 Aug 2023 16:44:55 +0530 Message-ID: <20230803111455.811339-1-devarsht@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773214189736142181 X-GMAIL-MSGID: 1773214189736142181 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 Acked-by: Darren Etheridge Signed-off-by: Vignesh Raghavendra --- 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@9ca00000 { pmsg-size = <0x8000>; }; + /* global cma region */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x00 0x8000000>; + linux,cma-default; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; alignment = <0x1000>;