All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: "Jernej Škrabec" <jernej.skrabec@gmail.com>
Cc: Joerg Roedel <joro@8bytes.org>, Chen-Yu Tsai <wens@csie.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	iommu@lists.linux-foundation.org
Subject: Re: [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU
Date: Wed, 29 Jan 2020 18:27:38 +0100	[thread overview]
Message-ID: <20200129172738.c53f5du2byreze2n@gilmour.lan> (raw)
In-Reply-To: <2140600.ElGaqSPkdT@jernej-laptop>

Hi,

On Mon, Jan 27, 2020 at 08:04:02PM +0100, Jernej Škrabec wrote:
> Dne ponedeljek, 27. januar 2020 ob 15:23:39 CET je Maxime Ripard napisal(a):
> > Hi Jernej,
> >
> > On Fri, Jan 24, 2020 at 09:54:23PM +0100, Jernej Škrabec wrote:
> > > Dne sreda, 22. januar 2020 ob 13:44:09 CET je Maxime Ripard napisal(a):
> > > > Now that we have a driver for the IOMMU, let's start using it.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 11 +++++++++++
> > > >  1 file changed, 11 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > 29824081b43b..8608bcf1c52c 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > @@ -53,6 +53,7 @@
> > > >
> > > >  	de: display-engine {
> > > >
> > > >  		compatible = "allwinner,sun50i-h6-display-engine";
> > > >  		allwinner,pipelines = <&mixer0>;
> > > >
> > > > +		iommus = <&iommu 0>;
> > > >
> > > >  		status = "disabled";
> > > >
> > > >  	};
> > >
> > > Isn't iommu property of the mixer node? After all, mixer is the one which
> > > reads one or more framebuffers. Once second mixer is defined, would you
> > > put
> > > another iommu phandle here?
> >
> > You're right. I added it during the early dev, and forgot to remove
> > it. Thanks!
>
> Remove it or move it? I guess enabling iommu support in each driver needs a
> bit more work than just referencing iommu node, right? At least in such case
> buffers don't need to be allocated by CMA, which sun4i-drm driver currently
> use.
>
> I just take another look at BSP kernel and it seems that only one channel is
> used for whole display stack. That would mean that both mixers would have same
> iommu phandle, right? Confusingly enough, DE2 iommu channel seems to be for
> deinterlace core.

To add on Robin's answer, yeah, it looks like the display engine is
called DE (and I've checked that this is indeed the master 0), while
the deinterlace is called DE2 (and probably is the master 2).

Maxime

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime@cerno.tech>
To: "Jernej Škrabec" <jernej.skrabec@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, iommu@lists.linux-foundation.org,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU
Date: Wed, 29 Jan 2020 18:27:38 +0100	[thread overview]
Message-ID: <20200129172738.c53f5du2byreze2n@gilmour.lan> (raw)
In-Reply-To: <2140600.ElGaqSPkdT@jernej-laptop>

Hi,

On Mon, Jan 27, 2020 at 08:04:02PM +0100, Jernej Škrabec wrote:
> Dne ponedeljek, 27. januar 2020 ob 15:23:39 CET je Maxime Ripard napisal(a):
> > Hi Jernej,
> >
> > On Fri, Jan 24, 2020 at 09:54:23PM +0100, Jernej Škrabec wrote:
> > > Dne sreda, 22. januar 2020 ob 13:44:09 CET je Maxime Ripard napisal(a):
> > > > Now that we have a driver for the IOMMU, let's start using it.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 11 +++++++++++
> > > >  1 file changed, 11 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > 29824081b43b..8608bcf1c52c 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > @@ -53,6 +53,7 @@
> > > >
> > > >  	de: display-engine {
> > > >
> > > >  		compatible = "allwinner,sun50i-h6-display-engine";
> > > >  		allwinner,pipelines = <&mixer0>;
> > > >
> > > > +		iommus = <&iommu 0>;
> > > >
> > > >  		status = "disabled";
> > > >
> > > >  	};
> > >
> > > Isn't iommu property of the mixer node? After all, mixer is the one which
> > > reads one or more framebuffers. Once second mixer is defined, would you
> > > put
> > > another iommu phandle here?
> >
> > You're right. I added it during the early dev, and forgot to remove
> > it. Thanks!
>
> Remove it or move it? I guess enabling iommu support in each driver needs a
> bit more work than just referencing iommu node, right? At least in such case
> buffers don't need to be allocated by CMA, which sun4i-drm driver currently
> use.
>
> I just take another look at BSP kernel and it seems that only one channel is
> used for whole display stack. That would mean that both mixers would have same
> iommu phandle, right? Confusingly enough, DE2 iommu channel seems to be for
> deinterlace core.

To add on Robin's answer, yeah, it looks like the display engine is
called DE (and I've checked that this is indeed the master 0), while
the deinterlace is called DE2 (and probably is the master 2).

Maxime
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime@cerno.tech>
To: "Jernej Škrabec" <jernej.skrabec@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Joerg Roedel <joro@8bytes.org>,
	iommu@lists.linux-foundation.org, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU
Date: Wed, 29 Jan 2020 18:27:38 +0100	[thread overview]
Message-ID: <20200129172738.c53f5du2byreze2n@gilmour.lan> (raw)
In-Reply-To: <2140600.ElGaqSPkdT@jernej-laptop>

Hi,

On Mon, Jan 27, 2020 at 08:04:02PM +0100, Jernej Škrabec wrote:
> Dne ponedeljek, 27. januar 2020 ob 15:23:39 CET je Maxime Ripard napisal(a):
> > Hi Jernej,
> >
> > On Fri, Jan 24, 2020 at 09:54:23PM +0100, Jernej Škrabec wrote:
> > > Dne sreda, 22. januar 2020 ob 13:44:09 CET je Maxime Ripard napisal(a):
> > > > Now that we have a driver for the IOMMU, let's start using it.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 11 +++++++++++
> > > >  1 file changed, 11 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > 29824081b43b..8608bcf1c52c 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > @@ -53,6 +53,7 @@
> > > >
> > > >  	de: display-engine {
> > > >
> > > >  		compatible = "allwinner,sun50i-h6-display-engine";
> > > >  		allwinner,pipelines = <&mixer0>;
> > > >
> > > > +		iommus = <&iommu 0>;
> > > >
> > > >  		status = "disabled";
> > > >
> > > >  	};
> > >
> > > Isn't iommu property of the mixer node? After all, mixer is the one which
> > > reads one or more framebuffers. Once second mixer is defined, would you
> > > put
> > > another iommu phandle here?
> >
> > You're right. I added it during the early dev, and forgot to remove
> > it. Thanks!
>
> Remove it or move it? I guess enabling iommu support in each driver needs a
> bit more work than just referencing iommu node, right? At least in such case
> buffers don't need to be allocated by CMA, which sun4i-drm driver currently
> use.
>
> I just take another look at BSP kernel and it seems that only one channel is
> used for whole display stack. That would mean that both mixers would have same
> iommu phandle, right? Confusingly enough, DE2 iommu channel seems to be for
> deinterlace core.

To add on Robin's answer, yeah, it looks like the display engine is
called DE (and I've checked that this is indeed the master 0), while
the deinterlace is called DE2 (and probably is the master 2).

Maxime

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-01-29 17:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 12:44 [PATCH 0/3] iommu: Add Allwinner H6 IOMMU driver Maxime Ripard
2020-01-22 12:44 ` Maxime Ripard
2020-01-22 12:44 ` Maxime Ripard
2020-01-22 12:44 ` [PATCH 1/3] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-23 14:44   ` Rob Herring
2020-01-23 14:44     ` Rob Herring
2020-01-23 14:44     ` Rob Herring
2020-01-22 12:44 ` [PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-23 18:47   ` Robin Murphy
2020-01-23 18:47     ` Robin Murphy
2020-01-23 18:47     ` Robin Murphy
2020-01-27 14:22     ` Maxime Ripard
2020-01-27 14:22       ` Maxime Ripard
2020-01-27 14:22       ` Maxime Ripard
2020-01-27 19:01       ` Robin Murphy
2020-01-27 19:01         ` Robin Murphy
2020-01-27 19:01         ` Robin Murphy
2020-02-11 12:39         ` Maxime Ripard
2020-02-11 12:39           ` Maxime Ripard
2020-02-11 12:39           ` Maxime Ripard
2020-01-22 12:44 ` [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-22 12:44   ` Maxime Ripard
2020-01-24 20:54   ` Jernej Škrabec
2020-01-24 20:54     ` Jernej Škrabec
2020-01-24 20:54     ` Jernej Škrabec
2020-01-27 14:23     ` Maxime Ripard
2020-01-27 14:23       ` Maxime Ripard
2020-01-27 14:23       ` Maxime Ripard
2020-01-27 19:04       ` Jernej Škrabec
2020-01-27 19:04         ` Jernej Škrabec
2020-01-27 19:04         ` Jernej Škrabec
2020-01-28 14:41         ` Robin Murphy
2020-01-28 14:41           ` Robin Murphy
2020-01-28 14:41           ` Robin Murphy
2020-01-29 17:27         ` Maxime Ripard [this message]
2020-01-29 17:27           ` Maxime Ripard
2020-01-29 17:27           ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200129172738.c53f5du2byreze2n@gilmour.lan \
    --to=maxime@cerno.tech \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.