Skip to content

Commit 129a3b8

Browse files
YongWu-HFjoergroedel
authored andcommitted
iommu/mediatek: Add 12G~16G support for multi domains
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 <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20220503071427.2285-11-yong.wu@mediatek.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 9e3a2a6 commit 129a3b8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/iommu/mtk_iommu.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,12 @@ static const struct mtk_iommu_iova_region single_domain[] = {
180180
};
181181

182182
static const struct mtk_iommu_iova_region mt8192_multi_dom[] = {
183-
{ .iova_base = 0x0, .size = SZ_4G}, /* disp: 0 ~ 4G */
183+
{ .iova_base = 0x0, .size = SZ_4G}, /* 0 ~ 4G */
184184
#if IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT)
185-
{ .iova_base = SZ_4G, .size = SZ_4G}, /* vdec: 4G ~ 8G */
186-
{ .iova_base = SZ_4G * 2, .size = SZ_4G}, /* CAM/MDP: 8G ~ 12G */
185+
{ .iova_base = SZ_4G, .size = SZ_4G}, /* 4G ~ 8G */
186+
{ .iova_base = SZ_4G * 2, .size = SZ_4G}, /* 8G ~ 12G */
187+
{ .iova_base = SZ_4G * 3, .size = SZ_4G}, /* 12G ~ 16G */
188+
187189
{ .iova_base = 0x240000000ULL, .size = 0x4000000}, /* CCU0 */
188190
{ .iova_base = 0x244000000ULL, .size = 0x4000000}, /* CCU1 */
189191
#endif

0 commit comments

Comments
 (0)