Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4167485pxb; Tue, 25 Jan 2022 05:02:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9BvO9DZ8IqlzTaAkscyfk51RwHxXufxPAFuFqody3cOO1GoAbnlVY8Y2Rc7uL6IpYLy/K X-Received: by 2002:a63:9347:: with SMTP id w7mr15038741pgm.84.1643115722314; Tue, 25 Jan 2022 05:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643115722; cv=none; d=google.com; s=arc-20160816; b=e+Ro+ILa1wcGZWGKXG32KV4uy5z8nnXqtyuRcJcZBVrPCds4BQuqQqqtwVt4xfdrE3 xw79LdRt3xgcemSAMT3PrRYku0jU40GwRjwXeht72Z7QE6iGcAMvMiliEzkezwEWabt8 cP/aBtzzY3LOMmLxppvnPq8/yRBiS+guvp1/Ekt+8JthhTIuiIlnFUcMrE8EcA//vfT2 Iwj2D7hSx/eFI30lTQC9VdAQ+Ba53fBWYRL54wXVp/8x7Y82J/2/FykUc6qNw+TUqdEw s51A9V+oL1fHRHZNXEUi4a0s6KdFHy7Kt9zIa94Ef77c3eSS5SlVBj0yXwigRQdsZvJU nOqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=VUjmE6N1fxexlCfT0QtR3sUU+l2NAy3gAe6XWlxk5Xc=; b=sL7rvA5GZFMI3s+ol+UaWY/09swdDMxUWMtcgyoAJdgba9hY65ydzaCoOp4eu+ekNO 9G0ZSuOtK1k+lyADeKHtV6Ehw61AHzcGFGd8zDRv84FedYxnn88IxfBbSvwohCj4HtjC kZ5Ct2aLouIEkOCvfcc7GG/ul0cAfeJp5P4ssgSgAoGOIPgIPodh4tkWCTI42izivyLN 3G4qXVzAZkp1H0mz16MQC1kud8YfOqrHjOHfnD55sX0o8yCLnM31k8x3QpAfH2apFisq aMRn7xjkVo4Rz5yI87BoYA8TkRTCOHg4aL6itFyyTjS1f5vZ9Vrw71pfQRlZ/ilypv/d GHDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md5si263250pjb.22.2022.01.25.05.01.49; Tue, 25 Jan 2022 05:02:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1454584AbiAYJCQ (ORCPT + 99 others); Tue, 25 Jan 2022 04:02:16 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:35282 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1454375AbiAYI7W (ORCPT ); Tue, 25 Jan 2022 03:59:22 -0500 X-UUID: 0ce1cb300b4142469599f7f4483f9679-20220125 X-UUID: 0ce1cb300b4142469599f7f4483f9679-20220125 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 448279544; Tue, 25 Jan 2022 16:58:14 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 25 Jan 2022 16:58:12 +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, 25 Jan 2022 16:58:11 +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 v4 10/35] iommu/mediatek: Add 12G~16G support for multi domains Date: Tue, 25 Jan 2022 16:56:09 +0800 Message-ID: <20220125085634.17972-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220125085634.17972-1-yong.wu@mediatek.com> References: <20220125085634.17972-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In mt8192, we preassign 0-4G; 4G-8G; 8G-12G for different multimedia engines. This depends on the "dma-ranges=" 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 1712f5fcdcab..4a24977274e3 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_domain[] = { }; static const struct mtk_iommu_iova_region mt8192_multi_dom[] = { - { .iova_base = 0x0, .size = SZ_4G}, /* disp: 0 ~ 4G */ + { .iova_base = 0x0, .size = SZ_4G}, /* 0 ~ 4G */ #if IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) - { .iova_base = SZ_4G, .size = SZ_4G}, /* vdec: 4G ~ 8G */ - { .iova_base = SZ_4G * 2, .size = SZ_4G}, /* CAM/MDP: 8G ~ 12G */ + { .iova_base = SZ_4G, .size = SZ_4G}, /* 4G ~ 8G */ + { .iova_base = SZ_4G * 2, .size = SZ_4G}, /* 8G ~ 12G */ + { .iova_base = SZ_4G * 3, .size = SZ_4G}, /* 12G ~ 16G */ + { .iova_base = 0x240000000ULL, .size = 0x4000000}, /* CCU0 */ { .iova_base = 0x244000000ULL, .size = 0x4000000}, /* CCU1 */ #endif -- 2.18.0