From nobody Sun Sep 22 06:22:01 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB482C433F5 for ; Tue, 3 May 2022 07:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231846AbiECHUd (ORCPT ); Tue, 3 May 2022 03:20:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbiECHUT (ORCPT ); Tue, 3 May 2022 03:20:19 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B633A2E9D4; Tue, 3 May 2022 00:16:22 -0700 (PDT) X-UUID: ac51bfb2bec044e4ac2c7a579d40c714-20220503 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.4,REQID:a533f1c5-b9f1-45ff-ad62-4ee1941d72da,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-20,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,AC TION:release,TS:-20 X-CID-META: VersionHash:faefae9,CLOUDID:9dba4ac7-85ee-4ac1-ac05-bd3f1e72e732,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,File:nil,QS:0,BEC:nil X-UUID: ac51bfb2bec044e4ac2c7a579d40c714-20220503 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 340991083; Tue, 03 May 2022 15:16:15 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Tue, 3 May 2022 15:16:14 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 3 May 2022 15:16:13 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , "Matthias Brugger" , Will Deacon CC: Robin Murphy , Krzysztof Kozlowski , Tomasz Figa , , , , , , Hsin-Yi Wang , , , , , , "AngeloGioacchino Del Regno" , , , , Subject: [PATCH v7 10/36] iommu/mediatek: Add 12G~16G support for multi domains Date: Tue, 3 May 2022 15:14:01 +0800 Message-ID: <20220503071427.2285-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220503071427.2285-1-yong.wu@mediatek.com> References: <20220503071427.2285-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In mt8192, we preassign 0-4G; 4G-8G; 8G-12G for different multimedia engines. This depends on the "dma-ranges=3D" in the iommu consumer's dtsi node. Adds 12G-16G region here. and reword the previous comment. we don't limit which master locate in which region. CCU still is 8G-12G. Don't change it here. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno --- drivers/iommu/mtk_iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 1b8e4405dd0f..d91a0c138536 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -180,10 +180,12 @@ static const struct mtk_iommu_iova_region single_doma= in[] =3D { }; =20 static const struct mtk_iommu_iova_region mt8192_multi_dom[] =3D { - { .iova_base =3D 0x0, .size =3D SZ_4G}, /* disp: 0 ~ 4G */ + { .iova_base =3D 0x0, .size =3D SZ_4G}, /* 0 ~ 4G */ #if IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) - { .iova_base =3D SZ_4G, .size =3D SZ_4G}, /* vdec: 4G ~ 8G */ - { .iova_base =3D SZ_4G * 2, .size =3D SZ_4G}, /* CAM/MDP: 8G ~ 12G */ + { .iova_base =3D SZ_4G, .size =3D SZ_4G}, /* 4G ~ 8G */ + { .iova_base =3D SZ_4G * 2, .size =3D SZ_4G}, /* 8G ~ 12G */ + { .iova_base =3D SZ_4G * 3, .size =3D SZ_4G}, /* 12G ~ 16G */ + { .iova_base =3D 0x240000000ULL, .size =3D 0x4000000}, /* CCU0 */ { .iova_base =3D 0x244000000ULL, .size =3D 0x4000000}, /* CCU1 */ #endif --=20 2.18.0