Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp500719pxb; Thu, 23 Sep 2021 05:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrGx37GaK7mMmZ1QxNCBNaGvde39Y/0DArbpQysG4lqEykiUMj50YIELcgkLyHbA8Zg9NJ X-Received: by 2002:a50:cf83:: with SMTP id h3mr5029810edk.63.1632398542934; Thu, 23 Sep 2021 05:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632398542; cv=none; d=google.com; s=arc-20160816; b=ceOHxCBkDMUIlx5a+zm8pR5VvovtbhLWl8eBx12p3kmQRUZEl/6z84ZlL1OTmsO7ld 3UOvSSXecqbLIwbpqE6/2qhiRZr1saiRlBfMexJGFd1PXerbMtyQuEnjU8qU9f9EGdkm Z1KYL6hOVpYjVsHzBvAO7CDuAErvvNrtsFl3HODHVVV9Hq2Br35bON3hSi1tDUyq0Oi4 ihbdXrKqKSeMalE70h1eLCFYGSE7Ld4kGRBkCamrujjdd6b1GyzeTSNaeFDJ/0pE3sK+ bZTJu5t5w1+20zTF8QLHCYSB+/YVV/JGoe8NBxR8kzwQMFKoHXjNYgzm9xc/YOr9CCO+ nrDQ== 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=hrXKsDnxT7UC8ROrggrg0TA0cbo+R/QY4njEy/XJce0=; b=KCDeVt90RUb8OT4pMzIjKeLFIpPJLu3pH4rMbhFWYr8HXLQSxZ0zx2o83tA1KaxLZe AtlKu2eNJYKWg1bDa04zo5i8xGq94sSRi8rFYNBVveR0PUiSYH45rtcT0TPnbUepurfI MfgA0XrO2E62ZiPAmN40Ej81ivzDcJqwr2uIKP2jykKysYXdtdK49dPTGZ9nPOeufx7s RqSwkTuTZbISeOhnM8l+ntoU3ryDbzZo9112Iajhc3W3U7hjsbyFkeNLHB8UU/rHpEPf HVlNGLmuxCqud8Fi7d/j6k65dejnx9bLal9JtbTPHRyeZEmbibukx3xiSXZADAzav5sJ CDMA== 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 s18si7155930eji.655.2021.09.23.05.01.45; Thu, 23 Sep 2021 05:02:22 -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 S240739AbhIWMB2 (ORCPT + 99 others); Thu, 23 Sep 2021 08:01:28 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:49214 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S240786AbhIWMB0 (ORCPT ); Thu, 23 Sep 2021 08:01:26 -0400 X-UUID: 473eaf70bac34e6d94392abf69853f42-20210923 X-UUID: 473eaf70bac34e6d94392abf69853f42-20210923 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1097137229; Thu, 23 Sep 2021 19:59:49 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Sep 2021 19:59:48 +0800 Received: from localhost.localdomain (10.17.3.154) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 23 Sep 2021 19:59:47 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Tomasz Figa , , , , , , , Hsin-Yi Wang , , , , , Subject: [PATCH v3 06/33] iommu/mediatek: Add 12G~16G support for multi domains Date: Thu, 23 Sep 2021 19:58:13 +0800 Message-ID: <20210923115840.17813-7-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210923115840.17813-1-yong.wu@mediatek.com> References: <20210923115840.17813-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 ee10c56e8f96..00d9ae3dc88a 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -178,10 +178,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