diff mbox

[1/2] ARM: tegra: venice2: add GK20A GPU DT node

Message ID 1412835112-7209-1-git-send-email-acourbot@nvidia.com
State Superseded, archived
Headers show

Commit Message

Alexandre Courbot Oct. 9, 2014, 6:11 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

Add the device-tree node for the GK20A GPU and leave it disabled by
default. It is the responsability of the bootloader to enable it if the
VPR registers have been programmed such as the GPU can operate.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Thierry Reding Oct. 9, 2014, 7:43 a.m. UTC | #1
On Thu, Oct 09, 2014 at 03:11:51PM +0900, Alexandre Courbot wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Add the device-tree node for the GK20A GPU and leave it disabled by
> default. It is the responsability of the bootloader to enable it if the
> VPR registers have been programmed such as the GPU can operate.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
>  arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Are you going to send the corresponding patches for U-Boot to update
the status property if it's initialized VPR?

Thierry
Alexandre Courbot Oct. 9, 2014, 7:48 a.m. UTC | #2
On 10/09/2014 04:43 PM, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Thu, Oct 09, 2014 at 03:11:51PM +0900, Alexandre Courbot wrote:
>> From: Thierry Reding <treding@nvidia.com>
>>
>> Add the device-tree node for the GK20A GPU and leave it disabled by
>> default. It is the responsability of the bootloader to enable it if the
>> VPR registers have been programmed such as the GPU can operate.
>>
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>>   arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> Are you going to send the corresponding patches for U-Boot to update
> the status property if it's initialized VPR?

Yes. But maybe I should wait until upstream Nouveau actually works 
properly for that? Right now it will probe successfully, but will crash 
as soon as the GPU is used because there still are memory coherency 
problems.

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding Oct. 9, 2014, 8 a.m. UTC | #3
On Thu, Oct 09, 2014 at 04:48:56PM +0900, Alexandre Courbot wrote:
> On 10/09/2014 04:43 PM, Thierry Reding wrote:
> >* PGP Signed by an unknown key
> >
> >On Thu, Oct 09, 2014 at 03:11:51PM +0900, Alexandre Courbot wrote:
> >>From: Thierry Reding <treding@nvidia.com>
> >>
> >>Add the device-tree node for the GK20A GPU and leave it disabled by
> >>default. It is the responsability of the bootloader to enable it if the
> >>VPR registers have been programmed such as the GPU can operate.
> >>
> >>Signed-off-by: Thierry Reding <treding@nvidia.com>
> >>Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> >>---
> >>  arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++-
> >>  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> >Are you going to send the corresponding patches for U-Boot to update
> >the status property if it's initialized VPR?
> 
> Yes. But maybe I should wait until upstream Nouveau actually works properly
> for that? Right now it will probe successfully, but will crash as soon as
> the GPU is used because there still are memory coherency problems.

I think the same really goes for these patches. Applying these will make
the node available to U-Boot, so technically some future U-Boot version
could modify a kernel DTB and boot a version where nouveau didn't yet
work out-of-the-box.

There's also still the issue about firmware loading and so on, so maybe
holding off on applying these patches until gk20a is fully enabled is a
good idea. Normally I guess this would be done by not adding the kernel
driver until it's expected to be at least usable to some degree, but I
guess it is a bit late for that now.

Thierry
Alexandre Courbot Oct. 9, 2014, 8:05 a.m. UTC | #4
On Thu, Oct 9, 2014 at 5:00 PM, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Thu, Oct 09, 2014 at 04:48:56PM +0900, Alexandre Courbot wrote:
>> On 10/09/2014 04:43 PM, Thierry Reding wrote:
>> >* PGP Signed by an unknown key
>> >
>> >On Thu, Oct 09, 2014 at 03:11:51PM +0900, Alexandre Courbot wrote:
>> >>From: Thierry Reding <treding@nvidia.com>
>> >>
>> >>Add the device-tree node for the GK20A GPU and leave it disabled by
>> >>default. It is the responsability of the bootloader to enable it if the
>> >>VPR registers have been programmed such as the GPU can operate.
>> >>
>> >>Signed-off-by: Thierry Reding <treding@nvidia.com>
>> >>Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> >>---
>> >>  arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++-
>> >>  1 file changed, 7 insertions(+), 1 deletion(-)
>> >
>> >Are you going to send the corresponding patches for U-Boot to update
>> >the status property if it's initialized VPR?
>>
>> Yes. But maybe I should wait until upstream Nouveau actually works properly
>> for that? Right now it will probe successfully, but will crash as soon as
>> the GPU is used because there still are memory coherency problems.
>
> I think the same really goes for these patches. Applying these will make
> the node available to U-Boot, so technically some future U-Boot version
> could modify a kernel DTB and boot a version where nouveau didn't yet
> work out-of-the-box.
>
> There's also still the issue about firmware loading and so on, so maybe
> holding off on applying these patches until gk20a is fully enabled is a
> good idea. Normally I guess this would be done by not adding the kernel
> driver until it's expected to be at least usable to some degree, but I
> guess it is a bit late for that now.

I'm fine with that too. Dropping these patches fow now.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren Oct. 10, 2014, 5:10 a.m. UTC | #5
On 10/08/2014 11:11 PM, Alexandre Courbot wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Add the device-tree node for the GK20A GPU and leave it disabled by
> default. It is the responsability of the bootloader to enable it if the
> VPR registers have been programmed such as the GPU can operate.

> diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts

> +	gpu@0,57000000 {
> +		status = "disabled";

status="disabled" usually goes into tegra124.dtsi. A board would only
override status to "okay" if necessary, and include any board specific
properties ...

> +		vdd-supply = <&vdd_gpu>;

... such as that.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding Oct. 10, 2014, 7:01 a.m. UTC | #6
On Thu, Oct 09, 2014 at 10:10:29PM -0700, Stephen Warren wrote:
> On 10/08/2014 11:11 PM, Alexandre Courbot wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > Add the device-tree node for the GK20A GPU and leave it disabled by
> > default. It is the responsability of the bootloader to enable it if the
> > VPR registers have been programmed such as the GPU can operate.
> 
> > diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
> 
> > +	gpu@0,57000000 {
> > +		status = "disabled";
> 
> status="disabled" usually goes into tegra124.dtsi. A board would only
> override status to "okay" if necessary, and include any board specific
> properties ...

True. I guess this is somewhat redundant here since the .dtsi file
already sets it to "disabled". Given how it is rather unusual for a
board's DTS file to not enable a node I think there would be some
advantage in keeping this explicitly to avoid confusion. Alternatively
perhaps a comment in the DTS file about why this isn't enabled by
default would be a good replacement.

Thierry
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 13008858e967..cadaab74e649 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -42,6 +42,12 @@ 
 		};
 	};
 
+	gpu@0,57000000 {
+		status = "disabled";
+
+		vdd-supply = <&vdd_gpu>;
+	};
+
 	pinmux: pinmux@0,70000868 {
 		pinctrl-names = "boot";
 		pinctrl-0 = <&pinmux_boot>;
@@ -734,7 +740,7 @@ 
 					regulator-always-on;
 				};
 
-				sd6 {
+				vdd_gpu: sd6 {
 					regulator-name = "+VDD_GPU_AP";
 					regulator-min-microvolt = <650000>;
 					regulator-max-microvolt = <1200000>;