From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Debarshi Dutta <ddutta-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Terje Bergstrom
<tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] arm64: tegra: Add the GPU on Tegra194
Date: Thu, 16 Jul 2020 15:17:53 +0200 [thread overview]
Message-ID: <20200716131753.GG535268@ulmo> (raw)
In-Reply-To: <3748e071-4d08-8e77-43f6-de37f5a7eb1e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3475 bytes --]
On Thu, Jul 16, 2020 at 01:59:33PM +0100, Jon Hunter wrote:
>
> On 16/07/2020 13:01, Thierry Reding wrote:
> > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > The GPU found on NVIDIA Tegra194 SoCs is a Volta generation GPU called
> > GV11B.
> >
> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> > arch/arm64/boot/dts/nvidia/tegra194.dtsi | 33 ++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > index 259e40469908..f559fe983ebe 100644
> > --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > @@ -1395,6 +1395,39 @@ sor3: sor@15bc0000 {
> > nvidia,interface = <3>;
> > };
> > };
> > +
> > + gpu@17000000 {
> > + compatible = "nvidia,gv11b";
>
> I think we also need to add the to binding doc.
I've got a patch that converts the nvidia,gk20a.txt to the json-schema
format and then a patch on top that adds this compatible string. Since
that patch is part of a larger series that's a bit stalled, I'll add
this to the existing bindings for now.
> > + reg = <0x17000000 0x10000000>,
> > + <0x18000000 0x10000000>;
> > + interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "stall", "nonstall";
> > + clocks = <&bpmp TEGRA194_CLK_GPCCLK>,
> > + <&bpmp TEGRA194_CLK_GPU_PWR>;
> > + clock-names = "gpu", "pwr";
> > + resets = <&bpmp TEGRA194_RESET_GPU>;
> > + reset-names = "gpu";
> > + status = "disabled";
> > +
> > + power-domains = <&bpmp TEGRA194_POWER_DOMAIN_GPU>;
> > + interconnects = <&mc TEGRA194_MEMORY_CLIENT_NVL1R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL1RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL1W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4W &emc>;
> > + interconnect-names = "dma-mem", "read-0-hp", "write-0",
> > + "read-1", "read-1-hp", "write-1",
> > + "read-2", "read-2-hp", "write-2",
> > + "read-3", "read-3-hp", "write-3";
> > + };
> > };
>
> I also see that for gv11b we populate 'dma-coherent' and so we should
> probably add this as well.
Do we know for certain that the GPU is DMA coherent? I've only tested
this (with local patches to Nouveau) without dma-coherent, so I have not
actually verified that it works without.
I vaguely recall reading that there are different apertures for sysmem,
one for coherent sysmem and another for non-coherent sysmem. So I'm not
sure if dma-coherent here will work without additional code in the
driver to ensure that all memory is allocated from the coherent sysmem
aperture.
I'd suggest we leave this as-is for now until we're further along with
GPU support and we can properly test this. Leaving out dma-coherent
should be harmless and in the worst case unnecessarily flushes caches.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org, Debarshi Dutta <ddutta@nvidia.com>,
Terje Bergstrom <tbergstrom@nvidia.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: tegra: Add the GPU on Tegra194
Date: Thu, 16 Jul 2020 15:17:53 +0200 [thread overview]
Message-ID: <20200716131753.GG535268@ulmo> (raw)
In-Reply-To: <3748e071-4d08-8e77-43f6-de37f5a7eb1e@nvidia.com>
[-- Attachment #1.1: Type: text/plain, Size: 3417 bytes --]
On Thu, Jul 16, 2020 at 01:59:33PM +0100, Jon Hunter wrote:
>
> On 16/07/2020 13:01, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > The GPU found on NVIDIA Tegra194 SoCs is a Volta generation GPU called
> > GV11B.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > arch/arm64/boot/dts/nvidia/tegra194.dtsi | 33 ++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > index 259e40469908..f559fe983ebe 100644
> > --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > @@ -1395,6 +1395,39 @@ sor3: sor@15bc0000 {
> > nvidia,interface = <3>;
> > };
> > };
> > +
> > + gpu@17000000 {
> > + compatible = "nvidia,gv11b";
>
> I think we also need to add the to binding doc.
I've got a patch that converts the nvidia,gk20a.txt to the json-schema
format and then a patch on top that adds this compatible string. Since
that patch is part of a larger series that's a bit stalled, I'll add
this to the existing bindings for now.
> > + reg = <0x17000000 0x10000000>,
> > + <0x18000000 0x10000000>;
> > + interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "stall", "nonstall";
> > + clocks = <&bpmp TEGRA194_CLK_GPCCLK>,
> > + <&bpmp TEGRA194_CLK_GPU_PWR>;
> > + clock-names = "gpu", "pwr";
> > + resets = <&bpmp TEGRA194_RESET_GPU>;
> > + reset-names = "gpu";
> > + status = "disabled";
> > +
> > + power-domains = <&bpmp TEGRA194_POWER_DOMAIN_GPU>;
> > + interconnects = <&mc TEGRA194_MEMORY_CLIENT_NVL1R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL1RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL1W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL2W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL3W &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4R &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4RHP &emc>,
> > + <&mc TEGRA194_MEMORY_CLIENT_NVL4W &emc>;
> > + interconnect-names = "dma-mem", "read-0-hp", "write-0",
> > + "read-1", "read-1-hp", "write-1",
> > + "read-2", "read-2-hp", "write-2",
> > + "read-3", "read-3-hp", "write-3";
> > + };
> > };
>
> I also see that for gv11b we populate 'dma-coherent' and so we should
> probably add this as well.
Do we know for certain that the GPU is DMA coherent? I've only tested
this (with local patches to Nouveau) without dma-coherent, so I have not
actually verified that it works without.
I vaguely recall reading that there are different apertures for sysmem,
one for coherent sysmem and another for non-coherent sysmem. So I'm not
sure if dma-coherent here will work without additional code in the
driver to ensure that all memory is allocated from the coherent sysmem
aperture.
I'd suggest we leave this as-is for now until we're further along with
GPU support and we can properly test this. Leaving out dma-coherent
should be harmless and in the worst case unnecessarily flushes caches.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-16 13:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 12:01 [PATCH] arm64: tegra: Add the GPU on Tegra194 Thierry Reding
2020-07-16 12:01 ` Thierry Reding
[not found] ` <20200716120138.532906-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-16 12:59 ` Jon Hunter
2020-07-16 12:59 ` Jon Hunter
[not found] ` <3748e071-4d08-8e77-43f6-de37f5a7eb1e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-16 13:17 ` Thierry Reding [this message]
2020-07-16 13:17 ` Thierry Reding
2020-07-16 15:05 ` Terje Bergstrom
2020-07-16 15:05 ` Terje Bergstrom
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=20200716131753.GG535268@ulmo \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ddutta-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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.