From patchwork Tue Feb 14 03:11:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 56635 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2729857wrn; Mon, 13 Feb 2023 19:13:47 -0800 (PST) X-Google-Smtp-Source: AK7set8uKcuXhTcKg0TUwPLW+5/kAKEHW67W0U1q0CIlXokcF6wa8vNQqeHzNSkybCeUIEL7Ns4G X-Received: by 2002:a62:1904:0:b0:5a8:c6a6:ffd0 with SMTP id 4-20020a621904000000b005a8c6a6ffd0mr531962pfz.2.1676344426494; Mon, 13 Feb 2023 19:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676344426; cv=none; d=google.com; s=arc-20160816; b=wChiqvUmRhBa8/ldENeZ07ytwM/cJnN4FFbP4rwgwYKiR2okn5cujYq1AZJACMWEYz Ft2dXtl5VY9CwBoSl4afSoeTOynx2CJ+XppuGFneAYCPc8aXmWUktAuEO6yjQQE9YgkN TBozx0h6nKFVxxGukUo/dthLWTFwH8pr3mmo5dnlEVMIuT7ifLzVQ+0nEXSk1H2OUNfH mAyhO7uzEDaUCmXXGexJU1kRudrHw5CFuf8dXYiXnpyY/66LBU6sLkrH4MFgEs9ojRaO cL+9f3f4FCYNJ2rhFEi1MBqDF5x3rHRZNA/TLTuVW6pLU9/v4FZWECphmQsUT0MdYrxG nXDA== 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:dkim-signature; bh=Tj7gc9/ETJfThMX11/SvkW6RSCkvj56c1pXVSNQqS0I=; b=hlatA8o8SPs4U6bVpFLD8MOfDPYaC8QMGcZkWe5SRlXcGvI7/IsvlT31Ma6cYGfKNu SNCuKNRtpcOGDfu2gWQqzj+SvLpobCmdpDpwYb655mULXoeor2oVGU75vCrJ5q2jt3fD jNOhKZxBjcZ1/hH36f0KqOunXKgsTAKdunQIoGe3Ux3SzGDE4Sqjyy1h4q+nEaIkhB+/ fDu3JTtFwG7ahqJgtXQfEdqBLrY4GZ6fzc8Nwx2QqscMohqlF4/MEYv9m7XxCr+P1isQ vjEpi7U0IWkUgSjaqLLuuS+NnnaEpRQYMqu0/rE19D+N3k+a/WsvaPPYSjEWBLzvETLm z3rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LduadrWg; 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 r6-20020aa79ec6000000b0058e061e0fe7si12935258pfq.42.2023.02.13.19.13.33; Mon, 13 Feb 2023 19:13:46 -0800 (PST) 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=LduadrWg; 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 S229642AbjBNDLv (ORCPT + 99 others); Mon, 13 Feb 2023 22:11:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjBNDLu (ORCPT ); Mon, 13 Feb 2023 22:11:50 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF1C3ABD; Mon, 13 Feb 2023 19:11:46 -0800 (PST) X-UUID: 4c4e0924ac1511ed945fc101203acc17-20230214 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Tj7gc9/ETJfThMX11/SvkW6RSCkvj56c1pXVSNQqS0I=; b=LduadrWg5nsrX4qrfe3pwpA7BsBx1THD+Fyz6FNf6sYrzqtf577ONOpZVKg3IYGgNPcCTmbWsu/W9MqBIZbcRepX+gBXAr7WLh7d89a97RXLu28qeu2uXYFNCmbnCBJdM9kP9Q9hVthNnDlHRG1EixRAJwq3l8pYFuK0iExeGZ0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:379066a4-207f-4128-8b61-a8149d09d043,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:885ddb2,CLOUDID:d1a5cc8e-8530-4eff-9f77-222cf6e2895b,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-UUID: 4c4e0924ac1511ed945fc101203acc17-20230214 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 24010724; Tue, 14 Feb 2023 11:11:39 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Tue, 14 Feb 2023 11:11:38 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 14 Feb 2023 11:11:37 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Mauro Carvalho Chehab , Rob Herring CC: Will Deacon , Robin Murphy , Krzysztof Kozlowski , Hans Verkuil , , , , , , , , "AngeloGioacchino Del Regno" , , , , Yunfei Dong , kyrie wu , , , , Yong Wu , Tiffany Lin , "Andrew-CT Chen" Subject: [PATCH v3 01/11] dt-bindings: media: mediatek,vcodec: Remove dma-ranges property Date: Tue, 14 Feb 2023 11:11:04 +0800 Message-ID: <20230214031114.926-2-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230214031114.926-1-yong.wu@mediatek.com> References: <20230214031114.926-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757774533313778389?= X-GMAIL-MSGID: =?utf-8?q?1757774533313778389?= After commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), the dma-ranges of the leaf node doesn't work. Remove it for vcodec here. 1) For mediatek,vcodec-decoder.yaml and mediatek,vcodec-encoder.yaml, this property is in the leaf node, it is invalid as the above comment. Currently there is only mt8195 VENC node has this property in upstream. Indeed, VENC is affected, but it is not a fatal issue. Originally it expects its iova range locate at 4GB-8GB. However after that commit, its expectation doesn't come true, it will fall back to 0-4GB iova and also could work well. 2) For mediatek,vcodec-subdev-decoder.yaml, It already uses parent-child node, this property works. Instead, MediaTek iommu will control the masters' iova ranges by the master's larb/port id internally, then the dma-ranges property is unnecessary for the master's node. Cc: Tiffany Lin Cc: Andrew-CT Chen Cc: Yunfei Dong Cc: Mauro Carvalho Chehab Cc: Matthias Brugger Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- .../devicetree/bindings/media/mediatek,vcodec-decoder.yaml | 5 ----- .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 5 ----- .../bindings/media/mediatek,vcodec-subdev-decoder.yaml | 7 ------- 3 files changed, 17 deletions(-) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml index aa55ca65d6ed..fad59b486d5d 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml @@ -56,11 +56,6 @@ properties: List of the hardware port in respective IOMMU block for current Socs. Refer to bindings/iommu/mediatek,iommu.yaml. - dma-ranges: - maxItems: 1 - description: | - Describes the physical address space of IOMMU maps to memory. - mediatek,vpu: $ref: /schemas/types.yaml#/definitions/phandle description: diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml index 0f2ea8d9a10c..a2051b31fa29 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -49,11 +49,6 @@ properties: List of the hardware port in respective IOMMU block for current Socs. Refer to bindings/iommu/mediatek,iommu.yaml. - dma-ranges: - maxItems: 1 - description: | - Describes the physical address space of IOMMU maps to memory. - mediatek,vpu: $ref: /schemas/types.yaml#/definitions/phandle description: diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml index c4f20acdc1f8..290594bc91cc 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml @@ -76,11 +76,6 @@ properties: The node of system control processor (SCP), using the remoteproc & rpmsg framework. - dma-ranges: - maxItems: 1 - description: | - Describes the physical address space of IOMMU maps to memory. - "#address-cells": const: 2 @@ -203,7 +198,6 @@ required: - reg - iommus - mediatek,scp - - dma-ranges - ranges if: @@ -236,7 +230,6 @@ examples: compatible = "mediatek,mt8192-vcodec-dec"; mediatek,scp = <&scp>; iommus = <&iommu0 M4U_PORT_L4_VDEC_MC_EXT>; - dma-ranges = <0x1 0x0 0x0 0x40000000 0x0 0xfff00000>; #address-cells = <2>; #size-cells = <2>; ranges = <0 0 0 0x16000000 0 0x40000>;