From nobody Sun Sep 22 07:51:04 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 C5998C433EF for ; Thu, 7 Apr 2022 07:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242578AbiDGIBa (ORCPT ); Thu, 7 Apr 2022 04:01:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242569AbiDGIB0 (ORCPT ); Thu, 7 Apr 2022 04:01:26 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5F91544B3; Thu, 7 Apr 2022 00:59:26 -0700 (PDT) X-UUID: b763556c3c264ccda0fee38dd9397046-20220407 X-UUID: b763556c3c264ccda0fee38dd9397046-20220407 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2033247727; Thu, 07 Apr 2022 15:59:19 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) 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; Thu, 7 Apr 2022 15:59:17 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 7 Apr 2022 15:59:15 +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 v6 09/34] iommu/mediatek: Add 12G~16G support for multi domains Date: Thu, 7 Apr 2022 15:57:01 +0800 Message-ID: <20220407075726.17771-10-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220407075726.17771-1-yong.wu@mediatek.com> References: <20220407075726.17771-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