From patchwork Wed Nov 16 19:31:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 21238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp29640wrr; Wed, 16 Nov 2022 11:45:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cZAaLwgb5wb7j6zKgN35XrD2M/c2WN8grbCzDmJqJtYNCN32YEAp9Vge402roNdUkeixa X-Received: by 2002:a05:6402:5488:b0:462:317a:e02f with SMTP id fg8-20020a056402548800b00462317ae02fmr20520518edb.125.1668627945344; Wed, 16 Nov 2022 11:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668627945; cv=none; d=google.com; s=arc-20160816; b=yo/kLhrCVlziBQH1odl1NYk+aRjKFoNSVP6q5PT/BIc36NOongD9Ln8jv9SMxPSoQF xfdiv76OdggNAcKu/9+Q/PwY2uMARu+cnQPHXYqfum9U8CNNt/aSG865K3UbQ+oYkZO1 eVXGbXP69UiDLnlBZZgcZSYX3sAKdrn2XRxXAFBYTpslXzGvE5mIXXjFlym4G1owjQTS BYP2w6W0LVhLlDC9bDfqZRlRq/HlDpQK6SyWb/FDoycsfLtBx4+12mwC8kdEDJYtx1bM 0wt4c3NST/zxx4QFuRih0910XkvPaPne/XfYqJ8T9kOj1hWK6x4ETwgEFbRvfiDGnJF0 hncA== 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=supRVz4T52oVqFelsFhkEjn9HuP+OJvPsiaQRkXaSXY=; b=voLWK6/WAitfuXogXKv6tOvt6S/ICZJx35DXEmANDWic18p1FOjnld4a9IASX65HOq G5Grg2azk/GiMjIquMTUvF2/Vdab2KT5ABD4zxJTUvnGb2pf55GjyjTLMk0cC4I6Idd0 jIYxvG8dPAitgaKLE+8DqJbrwz6DmVV+tKlnhtJzaPUQbIngwaKoAIXwjlB/9gfKLL9A ooP6E05iKYDw/hr5RTsaJSIuVEkABO9uRXOUxwxBQr15lLH1PqoM1MFv4WgfA5/0g6T3 6LULkIBey60tRcWVWiwhAhMs6VNiCWTPiFihcDOY5WLLaRrQP4Nny5Oz59PFVb0HNKgA PD+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RuwduGQo; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he43-20020a1709073dab00b007701a050273si17615531ejc.942.2022.11.16.11.45.21; Wed, 16 Nov 2022 11:45:45 -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=@gmail.com header.s=20210112 header.b=RuwduGQo; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234560AbiKPTbl (ORCPT + 99 others); Wed, 16 Nov 2022 14:31:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233905AbiKPTbf (ORCPT ); Wed, 16 Nov 2022 14:31:35 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C33A6315C; Wed, 16 Nov 2022 11:31:34 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id a14so31642468wru.5; Wed, 16 Nov 2022 11:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=supRVz4T52oVqFelsFhkEjn9HuP+OJvPsiaQRkXaSXY=; b=RuwduGQoL6RNZdNsCkvAs1s01RvLdNpuhqMxQcM5zQYPC05mFOSpK7h66qWpQM3Lqi 679YLRtq9sU/uy08ZbP1DDSQ7PPiTxEHCN4OlRc5mpMv/F5NYMOvF0jlUjGvuSKl+2sg QQ12EX6uhHBWQIS/D9Gs4IDpTIZqq+2RRKGt9Y/aMhezL1HszIRZr1Y5yfrv4KYH1v2i KM/OS9f7jcSZ8l2xeyM5FizpK6PyBLZgrqth5uagibIBp3Heju7m69Ln22nWAEJwbZdn cqXKOS6Q4HyQNvH78lT/aqGYdTrsW/+/y3rU5AJKQER/3322TcYoNtMYz7Rxi5/2n7nu ecbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=supRVz4T52oVqFelsFhkEjn9HuP+OJvPsiaQRkXaSXY=; b=k6+xy86EcnlEGkSMQfQmR6nvpoKhnS/5iuUHGyWQPjcpXsGOk0VjKphF7mhK/5m7WT jBXBTMOVMHD0QeGzoyRXokk1VGOuaCrjJSbD7VnsT3zCyYRjyGjvwhD9WAw1Wc0Pr4yW AR4PZ2IBX0lmpS8h8BjgT0DUd+xzYmN/hzmsjTkfox0obl+0d566bEc/7bb0O4Gz/Hh8 /YYBp2n90NGIQxhOt7FkW0e+/b8RjWqbbWcMs7tAryVFAIa0Wf4e6QnVac9LprSKkzsE ofHxy9zN27Ij4shhT/lF+D3JCeYjkRgFB0yQOpM+RPxb62diP2js2JfuEIx1a8ja28ip 2zRA== X-Gm-Message-State: ANoB5pn1Qv/jlPtYBljb5WBJq2PdYVQVOaIHY9MlrJ17AryWTZPFiF88 ogSsdlZi2uSHei0rH71KqCo= X-Received: by 2002:a5d:5741:0:b0:236:960f:161d with SMTP id q1-20020a5d5741000000b00236960f161dmr15517728wrw.376.1668627092709; Wed, 16 Nov 2022 11:31:32 -0800 (PST) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id q125-20020a1c4383000000b003c6cd82596esm3044646wma.43.2022.11.16.11.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 11:31:32 -0800 (PST) From: Jernej Skrabec To: mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, wens@csie.org, samuel@sholland.org Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 1/2] media: dt-bindings: allwinner: video-engine: Fix number of IOMMU channels Date: Wed, 16 Nov 2022 20:31:04 +0100 Message-Id: <20221116193105.363297-2-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116193105.363297-1-jernej.skrabec@gmail.com> References: <20221116193105.363297-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1749683216516311300?= X-GMAIL-MSGID: =?utf-8?q?1749683216516311300?= Cedrus (video engine) on Allwinner H6 actually uses two IOMMU channel, not just one. However, Cedrus on SoCs like D1 only uses one channel. Allow up to 2 IOMMU channels. Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage") Signed-off-by: Jernej Skrabec --- .../bindings/media/allwinner,sun4i-a10-video-engine.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml index 541325f900a1..257bb372d166 100644 --- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml @@ -55,7 +55,7 @@ properties: description: Phandle to the device SRAM iommus: - maxItems: 1 + maxItems: 2 memory-region: maxItems: 1 From patchwork Wed Nov 16 19:31:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 21237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp29037wrr; Wed, 16 Nov 2022 11:44:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eiuU/SbVovlr9+Omqtmg8zwCkBbZahSPnFl+wj3Gzdc5WDsl8C526pvkBorDWKgZar1/Z X-Received: by 2002:a17:903:25c1:b0:17f:7f60:480a with SMTP id jc1-20020a17090325c100b0017f7f60480amr10351870plb.145.1668627841672; Wed, 16 Nov 2022 11:44:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668627841; cv=none; d=google.com; s=arc-20160816; b=Dridj0oIR4hR+7IuPU5R/++g3xmD8jZ7TzzyKqzNdOI8d/5QhglEgD4y9d3kFzN96E 8Yzdm66fHKEFcD/QFRumE/viV2u7+dvMLIEEG/msquUTXsZoUNWXwJwGwVx7z3hWkM3W TMdAuxYpPVDNA1p+ZVZJtof7QxrX1dc3+KPtw+7c2hwTHXAZwL2y5VbDVPTyYWMInMVf 3vZCkYWibSRe1PelhqITa3k0blcfBGj3GHuR+4IYACZ9GvavN9LTbxnWDs6g3IoOpYCU AIt0ZHZEmMHHVvSs6t3llUA0s87I3YSgKpIDpI3mQ7R+0e7M75FBn1yzGxNBZAwxUeD3 igHw== 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=J3cqBPNXFCPM9SPqErLl5EqPv8TqD4kJvo+8/hC/Kvc=; b=kkrEcp6i5XvnJCmY/N45NcThj7Qpsy3yMs7knCQz2EZLkIJ9nL9pDjGr7IXvSCqErD RuqQp8mt2TbwPBLbyDD0NLju4QEUX9D5IaN5hSlIm021hpU8+fFDFWgMs+9g+EdN/aP5 JHh7rXzxpeCciS5/10Ywk6xhW5et/ND94xrUH645zugSXLOqMgYq5BHsroP7SFb+vbm+ TIHF6dmEncepUab1UUTC0HL1mmvL9yZ2veK50PzgTMCKnYOPpIdybNAp9HGJcXs8gYqO NNvPHOtICzwa64ZGWOhpWSNTB0nF5APFO0mZqpJGlVyvm5oBhALBpRyGN9zOPHg/rBzV nqBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ynri9fVx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a170902e14500b00188abb90281si12664747pla.433.2022.11.16.11.43.47; Wed, 16 Nov 2022 11:44:01 -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=@gmail.com header.s=20210112 header.b=Ynri9fVx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234128AbiKPTbq (ORCPT + 99 others); Wed, 16 Nov 2022 14:31:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbiKPTbf (ORCPT ); Wed, 16 Nov 2022 14:31:35 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01FDC63167; Wed, 16 Nov 2022 11:31:35 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id y16so31603737wrt.12; Wed, 16 Nov 2022 11:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J3cqBPNXFCPM9SPqErLl5EqPv8TqD4kJvo+8/hC/Kvc=; b=Ynri9fVx0vI5Lf+znhqrG0iR+yweHI2N2z+TchOnPi+rYb8P2px3K77Xwh0/l1DADz KnPlh+H+WqbGCSbGTQOaAM0hHFm3NN7CYcdx4NBKIKTZHT7dgzf0/CiT017fApLyqagX gSEc39/+sS4RNlMwyuT2FYFgDEeCdD34P5Ff7zITXMaWTAzRIScMQVPMMCdYyBmDRhfK ELlX74FnK45uhYSQqVkku4MPhiKvQLCkOmomsik0I4Wg1z9jZgRlg7w1QzQY03geTJUU P+YXXL88pUeGLQXOgQ//mrclw0YqMHJ95ytcAnxGYq8l9Js7K7rTQgof4vOwy2KOdUkk XeDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J3cqBPNXFCPM9SPqErLl5EqPv8TqD4kJvo+8/hC/Kvc=; b=b4OO427T6rZ1yXOeOUyfSh1zwaxLPIrCATAoXhcdafFeCHTiVpC9knYBNBiLy3wq0V DfGuGYGS0Kf+/e4DMNMtXHZpSoFrngklyzU5f/955ETk0WSQwDg5+ly8IbJnu53ladYg 0HYDPh4bT7b2LjB+0Ak4dus5tJt+OMADAkvQb7GitnQpwpL+1KxY0fYY7gUtsVCV6jhc DYjTZ5imZ2i8TF5uaCBwM9a42WjidUxose7I4FkDjV0KdWNpeJ+z9upX704rimcgTAw6 gVEPDhQM/WYUJEGdzii79ZdhUAwZ62x5tDnmKsJKQQWFIHa07WfnQ7R04w06AKfC8hOP it3g== X-Gm-Message-State: ANoB5pk14QaqAmWg+c7HCdpMLOQeN8pUR46/hO28JwFq+AI9hQjptCsE gpInxu8LXsChsgSLirE54jM= X-Received: by 2002:a5d:63c6:0:b0:235:e6a9:b492 with SMTP id c6-20020a5d63c6000000b00235e6a9b492mr15033159wrw.212.1668627093629; Wed, 16 Nov 2022 11:31:33 -0800 (PST) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id q125-20020a1c4383000000b003c6cd82596esm3044646wma.43.2022.11.16.11.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 11:31:33 -0800 (PST) From: Jernej Skrabec To: mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, wens@csie.org, samuel@sholland.org Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 2/2] arm64: dts: allwinner: h6: Fix Cedrus IOMMU channels Date: Wed, 16 Nov 2022 20:31:05 +0100 Message-Id: <20221116193105.363297-3-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116193105.363297-1-jernej.skrabec@gmail.com> References: <20221116193105.363297-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1749683108016017290?= X-GMAIL-MSGID: =?utf-8?q?1749683108016017290?= Cedrus H6 actually uses two IOMMU channels. During development page faults from both were observed. Documentation also lists both of them to be connected to Cedrus, but it doesn't make clear which is used for what. Add second IOMMU channel. Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage") Signed-off-by: Jernej Skrabec Reviewed-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 53f6660656ac..7bff054a9bdf 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -172,7 +172,7 @@ video-codec@1c0e000 { resets = <&ccu RST_BUS_VE>; interrupts = ; allwinner,sram = <&ve_sram 1>; - iommus = <&iommu 3>; + iommus = <&iommu 1>, <&iommu 3>; }; gpu: gpu@1800000 {