From patchwork Thu Nov 17 06:07:03 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: 13046196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BBC4C4332F for ; Thu, 17 Nov 2022 06:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbiKQGH3 (ORCPT ); Thu, 17 Nov 2022 01:07:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239302AbiKQGHR (ORCPT ); Thu, 17 Nov 2022 01:07:17 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F2E82A71A; Wed, 16 Nov 2022 22:07:12 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id l39-20020a05600c1d2700b003cf93c8156dso999320wms.4; Wed, 16 Nov 2022 22:07:12 -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=B/4dSPCEiDUe3Xyt1vQbKBrfveGFoVaGx8ciHb9QLPU=; b=WUBVCwSUcsGVoF5A63XFfDYRW1n0W7vigFBveEkiddsyxkiK9JwbQ2C8nQfM6NuS8j 1YiOGDJe/57NZX+qOTUggz6zwUvRm+U1wLbURpOIUesmnmvuK42IioAj0pWaJ8NqqT8L 9+yLc1PiTJx3NP6rtLtzWC+Gnjx2593eesxm3O33ss8pcUZqy2mwMgNq7DRCJWgc1u30 tbfRqwKb/anPwHPrrop0+4r6bcFvIgHRDb9ieqt45zUGDsyfgHbirdVGWZutcibNcqd9 8aJ0T+3Cut4F3djKa7abbi2qEkD3OTGCRbO8L+xPzveL7/xciSYhx27Ccm4Ckn9sx9kU PswQ== 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=B/4dSPCEiDUe3Xyt1vQbKBrfveGFoVaGx8ciHb9QLPU=; b=3VsvI8b5D1p+4Dpp7wzV01PwgxbkpgttdeoMk69wG4oCOPui6E3LOWUomyTG+ePcq/ gaStrdDWjN2Cyb7yftOXQGw0JQcCKH8MyWKwNraZTzig2+UAZu2aqF8lvcpO6JdOmKtt zUCLmFpjo/BXzrXm1Q6KRfCrEFZsIx1aPCnZHKROF8pJDsRqMNW4JNa1R6VG6q5nYKPT h8gRKTmyOq206+fZk55q1/rrxVk7ah9JxtR6UF+7cw+024XFwIFV1sw5d4knjjacrxir 2xHJlOeo0hqa/V3zkkztbKb0dbTBwvYvxwEhyLxlWHiMWGyLvIAlTwUpkD/M/Mmb+Nu3 UqQA== X-Gm-Message-State: ANoB5pl8CTDfOzvwWtMfRHGkoK4JhtadREqhpMjA841G5rCEPpyfSqPL 3XD5i5aDjNptYOf3M9gmQ8M= X-Google-Smtp-Source: AA0mqf6nbH1NYbfiNWEsx3ll18zbt1NmXbZvFY47Q26qtUlN3NrLlCKI8CekDyokCXbhnOmaguJOdg== X-Received: by 2002:a05:600c:3c8a:b0:3cf:6fe0:b16a with SMTP id bg10-20020a05600c3c8a00b003cf6fe0b16amr4030910wmb.28.1668665230759; Wed, 16 Nov 2022 22:07:10 -0800 (PST) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id r11-20020a5d694b000000b0023691d62cffsm16542568wrw.70.2022.11.16.22.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 22:07:10 -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 v2 1/2] media: dt-bindings: allwinner: video-engine: Fix number of IOMMU channels Date: Thu, 17 Nov 2022 07:07:03 +0100 Message-Id: <20221117060704.367945-2-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221117060704.367945-1-jernej.skrabec@gmail.com> References: <20221117060704.367945-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 | 3 ++- 1 file changed, 2 insertions(+), 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..6446004d59d9 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,8 @@ properties: description: Phandle to the device SRAM iommus: - maxItems: 1 + minItems: 1 + maxItems: 2 memory-region: maxItems: 1 From patchwork Thu Nov 17 06:07: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: 13046195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBB48C43219 for ; Thu, 17 Nov 2022 06:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239298AbiKQGH0 (ORCPT ); Thu, 17 Nov 2022 01:07:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234756AbiKQGHT (ORCPT ); Thu, 17 Nov 2022 01:07:19 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CD8754B15; Wed, 16 Nov 2022 22:07:13 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id l39-20020a05600c1d2700b003cf93c8156dso999347wms.4; Wed, 16 Nov 2022 22:07:13 -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=FYLz02viNCcZeuKJqkLZJicl/v6PrsUfH2KEY8TpF5c=; b=XAILsUAJagM8MUl29mV+63W7fYXbvVj1O6ywhS5MTgcLI3+dE+YuG2BgElNzv6qGWd MIZhedNEAN9eTFz/qYbXZx2SjfD70pLE01qrHOw3JGyBdYj6UsAcNBEtF2N5XvcmhAJ0 WtWGTmDzYXmFJ7LNism80tQWa8NLSn2Qjmys/RmCnCbJ4moyDyZ4kNBacLPBepBvYcTa WP7rHuVe+fy4cFCCxUGZUGCtFHBL0EznaMPh+gxSyKLHaCq9rhNckWaf+qPIWNQ1G9rF pbxv3rI+yj4bcGOzQW/oH0Ug5kZ+MGSOaMSCMf7Rv198BUocjZaEy+Gb8hRpUYKFcrvn Rnpw== 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=FYLz02viNCcZeuKJqkLZJicl/v6PrsUfH2KEY8TpF5c=; b=TBmHtnQ5jURK4VhVZXwEQwYAoPVJ/vWBVTXwi5wQG/iHkQYm1mHPhwpas1zQ+ZFZ9x bHIFFqutWzQSVsN45F2PvEL+sVHx+4c2RC46kGN5mzL19WKGMN9J5gVCLJc9ztBaje2f 4pvFRMUT2gVR8ZpxfcFFmLep6Y6pAOcTgW25oprBvpkTbBS72YfJlePBmeBXlvrJVJDH qh0WG2eCxR4ycTAX/4vRHJF6pcbXBH7aD3ImmKFeSaZ/Uo2YzceZS58rMdMSUSkRP2CY xp07PcRNyX3uxRu6VZWDderWBxG1ZIT/9xlyAtFAKIBW9qTnHi+UHJAVwrnLVupgwujt y/uw== X-Gm-Message-State: ANoB5pkJwj3XwBrTyZUmCQpKD732bFHkAgYgyYRMPOW8mWRmesTBLpce NWTV9Qdvbdo8Nxyamb+VGHE= X-Google-Smtp-Source: AA0mqf7PN/VpawVglIwIn6auY2jtpRLyUWC/cyLwr5nNPze1Twrr1VtCbQ+ltxYbw0sQ6aJURe2Rag== X-Received: by 2002:a05:600c:3b18:b0:3cf:6ab3:49ce with SMTP id m24-20020a05600c3b1800b003cf6ab349cemr538308wms.137.1668665231715; Wed, 16 Nov 2022 22:07:11 -0800 (PST) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id r11-20020a5d694b000000b0023691d62cffsm16542568wrw.70.2022.11.16.22.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 22:07:11 -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 v2 2/2] arm64: dts: allwinner: h6: Fix Cedrus IOMMU channels Date: Thu, 17 Nov 2022 07:07:04 +0100 Message-Id: <20221117060704.367945-3-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221117060704.367945-1-jernej.skrabec@gmail.com> References: <20221117060704.367945-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. Reviewed-by: Samuel Holland Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage") Signed-off-by: Jernej Skrabec --- 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 {