Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4902412pxv; Tue, 29 Jun 2021 19:37:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbc46OkheuXct18K2TBNdD8vAayJyHZOS/+6HgM8WYbtG6kXMH25Rtp8/PdHd6ALheZBy4 X-Received: by 2002:aa7:c891:: with SMTP id p17mr30925864eds.225.1625020675624; Tue, 29 Jun 2021 19:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625020675; cv=none; d=google.com; s=arc-20160816; b=AtJT3Dy9JXbMwPwffl6QQaOAeQPHOH9kxfakZ4pqE57XOW/ChyFDD5N2QNEXIV919h 9Tkuu0qVeA/egQTBELaDntpd7SPfTF6TSA00iob0ju6tQWPswvnXm5VE5tlP7HjAOkvW FAG9saTwFZMzRV77NRg1mvtO3PtGoiJ66FmRKA2aWT+VI1RwC0bOHtMRz6KS7x6hljIS PB2P1lQrU9eT93T+FxPynxwV3cYOFf+cEeB06oM8P8rjG6KR5R9g51wq/tF0HApDaHhp ilvjpCMM1oEIzATLVJcgh03Ka0Nn5WZgOwBUSOEKuNrs21gwSH82vuw8gF+O67ltJcAD SQ+A== 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=sI4XBgYNGuHBc6m78NLoqusVQYfh/EkJMwtuf5BolCU=; b=Q1Ys+U4B4Ae5TDIb4FSFhW2Xv0Z2fw5CJtnJ6sZoQ2/GoqFVst1kOdu6RaKAHc1wrX ctCGC9Sl/MJPmSU3XEEMqqRYaPspwo0ypvOwf6N518LLqIAnTkI0aWOGeyo/2zZwfLaa aug/WC59o1bjIVt4hZYc3Bau9OIDx99iHg0dQldwbNBcQjnRizX09/l4AnjzdKnYaY5k 3vJwzmFZg6ap/in4w7CTj2cx+IsA4tpRiIDfNg/L0xlCQzUsne2sM2eLPyofASTEv2yA iTMByB9KbB9pGRAHAcaJMOM0dDaKM3gxZZ20g7zmxEBdpVykhsQAp7GPzmNajPhH6x5Z AG7A== 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 b18si3562112ejb.739.2021.06.29.19.37.24; Tue, 29 Jun 2021 19:37:55 -0700 (PDT) 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 S232836AbhF3Cig (ORCPT + 99 others); Tue, 29 Jun 2021 22:38:36 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:34120 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232779AbhF3Cif (ORCPT ); Tue, 29 Jun 2021 22:38:35 -0400 X-UUID: 5a4cdd9b27c841a7b00b0d90b0afad27-20210630 X-UUID: 5a4cdd9b27c841a7b00b0d90b0afad27-20210630 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 891989153; Wed, 30 Jun 2021 10:36:03 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 10:36:02 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Jun 2021 10:36:01 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Evan Green , Tomasz Figa , Tomasz Figa , , , , , , , , , Nicolas Boichat , , Subject: [PATCH 05/24] iommu/mediatek: Add 12G~16G support for mult domain Date: Wed, 30 Jun 2021 10:34:45 +0800 Message-ID: <20210630023504.18177-6-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210630023504.18177-1-yong.wu@mediatek.com> References: <20210630023504.18177-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 depend on the dma-ranges in the iommu consumer's dtsi node. This patch only add 12G-16G region. and reword the prevous comment. we don't limit which master local in which regions. CCU still is 8G-12G. Don't change it here. Signed-off-by: Yong Wu --- 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 4689b65fdb03..78b35e187c78 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