From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5342768EA; Fri, 31 May 2024 09:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147937; cv=none; b=VLy42g8ACqPr9ILXndg3iGIJmMJ+JEeDsTmUqILy5dIYfv2k+Wt6JKOGqj3TDV3qIlOhDOSUcmFye44YJ4t/EyT56DPu62bayBkg7RxEWh48J73FeiNFoP6XTK5f7C3/ctDsR+pqVZgdRtMZT7NWIzyhBJz1s653puFLN4mAdpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147937; c=relaxed/simple; bh=BNlEZVWKmmSynJ3s+ToRZwZGUYwR1GZgOKkG1m+2oIE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RfgyHttVZrZbEN7H6LCzltGSEddPWk8FC+nBq/Ntk4nKRc4zFVqodv7v/+y/PbTiC6+iUo/RrTvt5vL2lU1uzntKSzTM6O12/5cnhc2KU358x3g4lp8JAireBaMZ/B42DnAIrkpz8fPHcQNCvMmbThYz10a4pPhFLP3h8xaBRVw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5CEAC1424; Fri, 31 May 2024 02:32:39 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2CBF3F641; Fri, 31 May 2024 02:32:12 -0700 (PDT) Date: Fri, 31 May 2024 10:32:09 +0100 From: Andre Przywara To: Robin Murphy Cc: Joerg Roedel , Will Deacon , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Krzysztof Kozlowski , Conor Dooley , Rob Herring , Chris Morgan , Ryan Walklin , iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/5] arm64: dts: allwinner: h616: add IOMMU node Message-ID: <20240531103209.7db573c8@donnerap.manchester.arm.com> In-Reply-To: References: <20240530233800.27705-1-andre.przywara@arm.com> <20240530233800.27705-6-andre.przywara@arm.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 31 May 2024 09:42:36 +0100 Robin Murphy wrote: Hi Robin, > On 2024-05-31 12:38 am, Andre Przywara wrote: > > The Allwinner H616 contains a scatter-gather IOMMU connected to some > > video related devices. It's almost compatible to the one used in the H6, > > though with minor incompatibilities. > > > > Add the DT node describing its resources, so that devices like the video > > or display engine can connect to it. > > Without also describing those connections, though, having this node > enabled in the DT means the driver will just bind, block DMA, and > prevent those devices from working. That's probably not what you want. The IOMMU manages the Display Engine (DE), the Deinterlacer (DI), the video engine (VE) and the 2D acceleration engine (G2D). None of those devices are supported for the H616 in mainline yet, but there are patches out there for the DE and VE, at least. Especially the video codecs benefit from scatter-gather, so with this patch they can make use of it from day one. I agree that the series on its own is not very useful, but there are quite some H616 patches in flight out there, so this is an attempt to clean those up, picking the low hanging fruits first ;-) Cheers, Andre > > Signed-off-by: Andre Przywara > > --- > > arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > index 9c1980e24cb21..44f04619a43ac 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > @@ -320,6 +320,15 @@ x32clk_fanout_pin: x32clk-fanout-pin { > > }; > > }; > > > > + iommu: iommu@30f0000 { > > + compatible = "allwinner,sun50i-h616-iommu"; > > + reg = <0x030f0000 0x10000>; > > + interrupts = ; > > + clocks = <&ccu CLK_BUS_IOMMU>; > > + resets = <&ccu RST_BUS_IOMMU>; > > + #iommu-cells = <1>; > > + }; > > + > > gic: interrupt-controller@3021000 { > > compatible = "arm,gic-400"; > > reg = <0x03021000 0x1000>, > From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66E8AC27C44 for ; Fri, 31 May 2024 09:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v5ZBj+lL+Ha+mR6yfW7MdPEZLrW7rm2frLwqWgx1xWg=; b=cKT2ThYB2czZ2K T04kJgpGLUpQ2IAqRyqOO1Xx34HW4B2piNJb65Dpc9Z/1yw5QAp2vgutQSiQTMSEV3+TL1GbzWVEb pxbBu80Ng4GPxNrf89j0+DtpICVYP0Ud4hKyfb2aGeYZhvG0j07yxVDvF+vbcB/VUk2Vh/5bnfTRj rJSTaYh0NFc6rfM4n2n3UZEMqR75lQuvl17DaL0kGrQvndl5nnE5OpAVs6Gs2p5vJ3bekhseZz/5C UVDg4u0tsgxmWi7zCS6Yf0Ua3tMYNuWQr1piebrPOY+1tPlBfck/EBcfFnHiaQOILzXi7eWfA6utf i9D++K/lnVwKurtLBQAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCycV-00000009nyw-3NNn; Fri, 31 May 2024 09:32:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCycS-00000009nxX-3iNt for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 09:32:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5CEAC1424; Fri, 31 May 2024 02:32:39 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2CBF3F641; Fri, 31 May 2024 02:32:12 -0700 (PDT) Date: Fri, 31 May 2024 10:32:09 +0100 From: Andre Przywara To: Robin Murphy Cc: Joerg Roedel , Will Deacon , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Krzysztof Kozlowski , Conor Dooley , Rob Herring , Chris Morgan , Ryan Walklin , iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/5] arm64: dts: allwinner: h616: add IOMMU node Message-ID: <20240531103209.7db573c8@donnerap.manchester.arm.com> In-Reply-To: References: <20240530233800.27705-1-andre.przywara@arm.com> <20240530233800.27705-6-andre.przywara@arm.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_023217_012148_FF1171E3 X-CRM114-Status: GOOD ( 21.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 31 May 2024 09:42:36 +0100 Robin Murphy wrote: Hi Robin, > On 2024-05-31 12:38 am, Andre Przywara wrote: > > The Allwinner H616 contains a scatter-gather IOMMU connected to some > > video related devices. It's almost compatible to the one used in the H6, > > though with minor incompatibilities. > > > > Add the DT node describing its resources, so that devices like the video > > or display engine can connect to it. > > Without also describing those connections, though, having this node > enabled in the DT means the driver will just bind, block DMA, and > prevent those devices from working. That's probably not what you want. The IOMMU manages the Display Engine (DE), the Deinterlacer (DI), the video engine (VE) and the 2D acceleration engine (G2D). None of those devices are supported for the H616 in mainline yet, but there are patches out there for the DE and VE, at least. Especially the video codecs benefit from scatter-gather, so with this patch they can make use of it from day one. I agree that the series on its own is not very useful, but there are quite some H616 patches in flight out there, so this is an attempt to clean those up, picking the low hanging fruits first ;-) Cheers, Andre > > Signed-off-by: Andre Przywara > > --- > > arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > index 9c1980e24cb21..44f04619a43ac 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > @@ -320,6 +320,15 @@ x32clk_fanout_pin: x32clk-fanout-pin { > > }; > > }; > > > > + iommu: iommu@30f0000 { > > + compatible = "allwinner,sun50i-h616-iommu"; > > + reg = <0x030f0000 0x10000>; > > + interrupts = ; > > + clocks = <&ccu CLK_BUS_IOMMU>; > > + resets = <&ccu RST_BUS_IOMMU>; > > + #iommu-cells = <1>; > > + }; > > + > > gic: interrupt-controller@3021000 { > > compatible = "arm,gic-400"; > > reg = <0x03021000 0x1000>, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel