From patchwork Mon Apr 3 09:13:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 78422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2164602vqo; Mon, 3 Apr 2023 02:17:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ayZmHuGcnxnyYXzOz7gzmt4FIWimvXd3fKAsGZcE6pH2ndPBNx785LYTTFgJUq59hWhPlN X-Received: by 2002:aa7:c906:0:b0:4fd:2aac:d480 with SMTP id b6-20020aa7c906000000b004fd2aacd480mr36974269edt.21.1680513446903; Mon, 03 Apr 2023 02:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680513446; cv=none; d=google.com; s=arc-20160816; b=paPrKAUhbrDMjdgbPscpdZjAWjhPoMsqFx947Lh83Ylu2E0rVCiVsrTtOB+ipVzZZm PF5giGK6qDbWzd1Zau2g5EDhj2o+eeU4FJh8hk2MCR/3ipJ8lSDmNOxqNrhdVcHgz6aP Pe3dqwTBvTMUCYRETjeNY30Ooaym9laLOl7MWn2BPmkpeBw4vY8Kwj6FSwfgYu2g7Xde 0tuABp06/2ICGzvhX7gjaAPZkLBDXwd1YoYo9ReHMtQgY6bB9NvUMLVwZEuZlGFeAKZl FEi4oc+We3XBfJbeBpbRLU28hOTF8cKq/v5YHOUo+0c25d2K0x7T8govuam24YHLRuQC z/Dw== 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=iARxrO41E5X4zx48oWKHHtf5xGSUiwXLbJMpk9ZAFmU=; b=d91+mggZa+IvLQLeCdy8heZZi489A4tDiFMVGYEhmtofYxfkCifhOURoj8/1jiDupN bPDzevJXUFZoIVd6RjN0aBRtZY4OT1gxbUz+5UV6w2qtUggJ9l+n1G5Lcyd4HEdEesjM zeU7jNNSqiOEq+eBx/XWQG2asoXXXCqR/ou+W4OY96trMukuD+jb8kOg+JdE4ZbCCVV+ pF9FTZ2yWgULv7gFO2t7sP40eh7gK4lBQHJbj1nM4OFf0JvD3+xoElqD/ZlxICTxGFNm C5WUJWYxzmOrE1MP1JrOMFvx4wlaQWx6mEXPSRr/ROvwEfVItyfj4NTIa+7aodRwXQQw eQiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bY1Dgq2b; 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 f13-20020aa7d84d000000b004fc9c7986c5si7477480eds.530.2023.04.03.02.16.42; Mon, 03 Apr 2023 02:17:26 -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=bY1Dgq2b; 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 S231558AbjDCJOQ (ORCPT + 99 others); Mon, 3 Apr 2023 05:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231826AbjDCJOL (ORCPT ); Mon, 3 Apr 2023 05:14:11 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C838C976C; Mon, 3 Apr 2023 02:14:08 -0700 (PDT) X-UUID: e022d12ed1ff11eda9a90f0bb45854f4-20230403 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=iARxrO41E5X4zx48oWKHHtf5xGSUiwXLbJMpk9ZAFmU=; b=bY1Dgq2bifubtJ9RxFOA8yMOLDbPVtwQc3jMt9t5NH8hUZFVzSzxE+eAZ6v5by1oMuB2oZ6t5pJiW5btT3oCpCAdE+aV/1JM7nfeOSqIpVx7/nLDTL7ynBFrvXydpoWrVod6jCXwRMrxLXIZXQ5YY9y6RoW5CbAw9dC9xKzoees=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:91cff81f-6c97-4150-99a6-2afbc47ade5a,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:9d95b1f7-ddba-41c3-91d9-10eeade8eac7,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: e022d12ed1ff11eda9a90f0bb45854f4-20230403 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2095647034; Mon, 03 Apr 2023 17:14:02 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 3 Apr 2023 17:14:01 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 3 Apr 2023 17:14:00 +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 , Rob Herring , Hans Verkuil Subject: [PATCH v6 01/14] dt-bindings: media: mediatek,vcodec: Remove dma-ranges property Date: Mon, 3 Apr 2023 17:13:24 +0800 Message-ID: <20230403091337.26745-2-yong.wu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230403091337.26745-1-yong.wu@mediatek.com> References: <20230403091337.26745-1-yong.wu@mediatek.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762146067954434084?= X-GMAIL-MSGID: =?utf-8?q?1762146067954434084?= 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 Acked-by: Hans Verkuil --- .../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>;