Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp528079pxb; Thu, 12 Aug 2021 23:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCRXJ15wqk+hXYmvC/7yJstqawikSE4OsE79NoipjSKavc1xVpAqIrxycBlCMYMo25COTo X-Received: by 2002:a05:6402:5210:: with SMTP id s16mr1235300edd.343.1628837819234; Thu, 12 Aug 2021 23:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628837819; cv=none; d=google.com; s=arc-20160816; b=Z8zvXVMX3oAik7sBr2R0Wl/mgimDJ8a1sb/Bylm73O3zgL+gZWzDwMO0oHWb4uZpHD z2vBz4mB+ZM8dY3IHHZsXVThs64ZqJsGWpLl0DAGx9cjUfjR9K+Tjxc94Pybc0VVR3Fa 96oCHwpl1zQ6CruUsChAimcDxKWB37L4E/BhDR7DalNy+qUNaJM50G+1crQLx58ecjs5 bz7dgAYiE6TXotwnRQRzYDUijZKW/FHCN6Ib1isArMX54MXMV6/qdhrQnPcRAHb5H2a/ mBen+P9nrkObDpDceXApjxF9XO1piKkEZPWT+pNGUPnD9jWwyyCijvTHERCc8K9fwMIV 7vxw== 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=JaeV+iLRMzriFnHdYDguPq92qNCQAyAkNLZt3CNf+dE=; b=Qe2LWP3Sr0VlIjrjGmzSYDX40YcU61HRo/gjr3loAKMXm+ArtF/wVVoiESfbzb6b58 sKpwvQcO5cu47X9eWdrkbTK9GzCENXbJkyw/g2P8Z1sfs4W2Z+hy+x0pz+SmEJ9qgGDk 6wKDG4FI6kLhbLmM4TqxH+qM4e7TxZ2wxzY7iF+QKW5BOTtqo48N9KpvZe4vAKS5fewd EJKoElXUe3yW3EsHOrUb/fhkFA1gjpXrV/FI026o8XjLMZsuyrjBnE1Hkoip9pLv7g7s IfzkCF8gnjmnlHpxTzQ8KXuDzlfw16Osana1sDO/3M9fBrMNRz5y/6WBwUia25hBOwTS yEHQ== 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 r17si832208edv.508.2021.08.12.23.56.36; Thu, 12 Aug 2021 23:56:59 -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 S239022AbhHMGyw (ORCPT + 99 others); Fri, 13 Aug 2021 02:54:52 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:58804 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S238942AbhHMGyv (ORCPT ); Fri, 13 Aug 2021 02:54:51 -0400 X-UUID: f10400ae2835406b97563a287b1440d0-20210813 X-UUID: f10400ae2835406b97563a287b1440d0-20210813 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 341778634; Fri, 13 Aug 2021 14:54:22 +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; Fri, 13 Aug 2021 14:54:21 +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; Fri, 13 Aug 2021 14:54:20 +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 v2 05/29] iommu/mediatek: Add 12G~16G support for multi domains Date: Fri, 13 Aug 2021 14:53:00 +0800 Message-ID: <20210813065324.29220-6-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210813065324.29220-1-yong.wu@mediatek.com> References: <20210813065324.29220-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 --- 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 287dfc0fc6f8..259ff7b90ff3 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -179,10 +179,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