Message ID | 20230411093144.2690-11-yong.wu@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2449776vqo; Tue, 11 Apr 2023 02:53:50 -0700 (PDT) X-Google-Smtp-Source: AKy350Y0bQHr0ZLtLTNXdl4Bx9idsSobotAGUvXPvM0dcZW3PIJxFTe/k3UEJdE8aA9OTMYp7kBu X-Received: by 2002:a17:906:2d2:b0:932:3d1b:b69d with SMTP id 18-20020a17090602d200b009323d1bb69dmr2092608ejk.47.1681206830332; Tue, 11 Apr 2023 02:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681206830; cv=none; d=google.com; s=arc-20160816; b=JJkLzyygTI6MBoABfQU2ISN/xUWoTm2CiE0oXNwXFPvx6HBX7gznLnqhZeQHQ+DNeP h55WiLrdQalOkEYcOJPfrULYJhSrzw9PAGs8HvNoZ72suujxivjKVbzy6bpnw/VmLRPz LLFXR1+oiVkSFMYun7/V7bES4/DLC4wDZ1JRHAHDYqALACYVC4RsNKHEdHZoBapLlc2B A/rfJaxhmhi33s7R+vFxfKzufSZaNBIgJvaVMDWBHSg9F3YyjycKKPNz1aOU1Ra6p9CC y3yE7LaulNfG28uoW1q6nwxTwbQxzj0NjaBsiti23AnU0xrGr3PZtpHWyC168V5ZaLoO dd2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tFB5+TDegZ2t6qK9NrZoRPZ2/IQBCygYDbpoNSt9KtE=; b=ha4MPOKCUwmXb4XG9exFcGy6wjgqQagEtLAPPAMLNXEOG4A583bkUitSj0FiHEoMWH bISTeVzb4ECL5VQC1hnFiv9D0prZlbtbUSdfWPFHYW+NU3pqHoK0wojGPs+n+a9aOi2F VrZ3T8k1z6rzJwZCuvGiZrIHgx5OKBCkhwsG5JuXVIcOQHlU+oysmlMeFX4xHUVow+VF IrTyToTYM58vcIF+9v4a8F4v9sivtqGJiKM6jO3XWayFSvJkSUh41B04nqMoxUFTetps +zH3L5hNgS2PIIXPEmN/znMvQU6q10uBdkbHh/AleGhtDU5ZN7XGrjQxoWd72QJAJ5Yt V61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pV+naLgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id io3-20020a17090780c300b0093f3cd5628asi7797649ejc.684.2023.04.11.02.53.25; Tue, 11 Apr 2023 02:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pV+naLgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjDKJee (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Tue, 11 Apr 2023 05:34:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjDKJeH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 11 Apr 2023 05:34:07 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADF613C10; Tue, 11 Apr 2023 02:33:48 -0700 (PDT) X-UUID: f3025d6cd84b11eda9a90f0bb45854f4-20230411 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=tFB5+TDegZ2t6qK9NrZoRPZ2/IQBCygYDbpoNSt9KtE=; b=pV+naLgGJriNjqfMwpcxe9/gdwKN0tAsOp/Gs30Oih4tYKOrdEi+0fTJY5Hr4eSMU5ihEGT7q4U9ZClHzq44y9Q4hCdfeHA3J4jkNsB3WsdXIODfC3BNGYx1hfMs8e6q8YNOIjXVHJ5r4LZ+FbcCqvHRTmGcQQrI4B96FF9SGas=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:61df390b-34ce-4048-a5b0-e07a00750186,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:120426c,CLOUDID:a70c95ea-db6f-41fe-8b83-13fe7ed1ef52,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-UUID: f3025d6cd84b11eda9a90f0bb45854f4-20230411 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from <yong.wu@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1667052521; Tue, 11 Apr 2023 17:33:42 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Tue, 11 Apr 2023 17:33:41 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Tue, 11 Apr 2023 17:33:40 +0800 From: Yong Wu <yong.wu@mediatek.com> To: Joerg Roedel <joro@8bytes.org>, Matthias Brugger <matthias.bgg@gmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org> CC: Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Hans Verkuil <hverkuil@xs4all.nl>, <nfraprado@collabora.com>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <iommu@lists.linux.dev>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, <mingyuan.ma@mediatek.com>, <yf.wang@mediatek.com>, <jianjiao.zeng@mediatek.com>, Yunfei Dong <yunfei.dong@mediatek.com>, kyrie wu <kyrie.wu@mediatek.corp-partner.google.com>, <chengci.xu@mediatek.com>, <youlin.pei@mediatek.com>, <anan.sun@mediatek.com>, Yong Wu <yong.wu@mediatek.com>, Bin Liu <bin.liu@mediatek.com>, kyrie wu <kyrie.wu@mediatek.com> Subject: [PATCH v7 10/14] media: mtk-jpegdec: Remove the setting for dma_mask Date: Tue, 11 Apr 2023 17:31:40 +0800 Message-ID: <20230411093144.2690-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230411093144.2690-1-yong.wu@mediatek.com> References: <20230411093144.2690-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762873133556618928?= X-GMAIL-MSGID: =?utf-8?q?1762873133556618928?= |
Series |
Adjust the dma-ranges for MTK IOMMU
|
|
Commit Message
Yong Wu
April 11, 2023, 9:31 a.m. UTC
In order to simplify the masters to set their respective dma masks, MTK
IOMMU helps to centralize the processing. Because all the dma ranges is
set in IOMMU, IOMMU knows well the dma mask requirements of masters. After
this patch, the masters code does not need care
dma-ranges/dma_mask related information.
Cc: Bin Liu <bin.liu@mediatek.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 ---
1 file changed, 3 deletions(-)
Comments
Il 11/04/23 11:31, Yong Wu ha scritto: > In order to simplify the masters to set their respective dma masks, MTK > IOMMU helps to centralize the processing. Because all the dma ranges is > set in IOMMU, IOMMU knows well the dma mask requirements of masters. After > this patch, the masters code does not need care > dma-ranges/dma_mask related information. > > Cc: Bin Liu <bin.liu@mediatek.com> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > Cc: kyrie wu <kyrie.wu@mediatek.com> > Signed-off-by: Yong Wu <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On 11/04/2023 11:31, Yong Wu wrote: > In order to simplify the masters to set their respective dma masks, MTK > IOMMU helps to centralize the processing. Because all the dma ranges is > set in IOMMU, IOMMU knows well the dma mask requirements of masters. After > this patch, the masters code does not need care > dma-ranges/dma_mask related information. > > Cc: Bin Liu <bin.liu@mediatek.com> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > Cc: kyrie wu <kyrie.wu@mediatek.com> > Signed-off-by: Yong Wu <yong.wu@mediatek.com> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Regards, Hans > --- > drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c > index 969516a940ba..9b96d2436311 100644 > --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c > +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c > @@ -1757,9 +1757,6 @@ static int mtk_jpeg_probe(struct platform_device *pdev) > jpeg->vdev->device_caps = V4L2_CAP_STREAMING | > V4L2_CAP_VIDEO_M2M_MPLANE; > > - if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL)) > - dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34)); > - > ret = video_register_device(jpeg->vdev, VFL_TYPE_VIDEO, -1); > if (ret) { > v4l2_err(&jpeg->v4l2_dev, "Failed to register video device\n");
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c index 969516a940ba..9b96d2436311 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c @@ -1757,9 +1757,6 @@ static int mtk_jpeg_probe(struct platform_device *pdev) jpeg->vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE; - if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL)) - dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34)); - ret = video_register_device(jpeg->vdev, VFL_TYPE_VIDEO, -1); if (ret) { v4l2_err(&jpeg->v4l2_dev, "Failed to register video device\n");