drm/nouveau: platform devices and GK20A probing
Subsystems (5)
cover drm/nouveau: platform devices and GK20A probing
This patch series is the final (?) step towards the initial support of GK20A, allowing it to be probed and used (currently at a very slow speed, and for offscreen rendering only) on the Jetson TK1 and Venice 2 boards.
The main piece if the first patch which adds platform devices probing support to Nouveau. There are probably lots of things that need to be discussed about it, e.g.:
* The way the DRM device is created, especially with respect to the ongoing changes to the DRM framework,
* The fact that the same drm_driver instance is used for the PCI and platform drivers,
* Whether we should have only one platform driver capable of probing all platform devices, or one driver per GPU (in this case, where should all these drivers reside?)
So there are still some rough edges, but we are getting there. :)
The first patch should go through the Nouveau tree, while the 4 others are rather intended for Tegra.
Alexandre Courbot (3):
drm/nouveau: support for probing platform devices
ARM: tegra: of: add GK20A device tree binding
ARM: tegra: jetson-tk1: enable GK20A GPU
Thierry Reding (2):
ARM: tegra: add GK20A GPU to Tegra124 DT
ARM: tegra: venice2: enable GK20A GPU
.../devicetree/bindings/gpu/nvidia,gk20a.txt | 45 +++++ arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +- arch/arm/boot/dts/tegra124-venice2.dts | 8 +- arch/arm/boot/dts/tegra124.dtsi | 15 ++ drivers/gpu/drm/nouveau/Kconfig | 8 + drivers/gpu/drm/nouveau/Makefile | 3 + drivers/gpu/drm/nouveau/nouveau_drm.c | 33 ++-- drivers/gpu/drm/nouveau/nouveau_drm.h | 21 +++ drivers/gpu/drm/nouveau/nouveau_platform.c | 191 +++++++++++++++++++++ 9 files changed, 315 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt create mode 100644 drivers/gpu/drm/nouveau/nouveau_platform.c
Signature · 1 line
1.9.2
PATCH 1/5 drm/nouveau: support for probing platform devices
Add a platform driver for Nouveau devices declared using the device tree or platform data. This driver currently supports GK20A on Tegra platforms and is only compiled for these platforms if Nouveau is enabled.
Nouveau will probe the chip type itself using the BOOT0 register, so all this driver really needs to do is to make sure the module is powered and its clocks active before calling nouveau_drm_platform_probe().
Heavily based on work done by Thierry Reding.
--- drivers/gpu/drm/nouveau/Kconfig | 8 ++ drivers/gpu/drm/nouveau/Makefile | 3 + drivers/gpu/drm/nouveau/nouveau_drm.c | 33 ++--- drivers/gpu/drm/nouveau/nouveau_drm.h | 21 ++++ drivers/gpu/drm/nouveau/nouveau_platform.c | 191 +++++++++++++++++++++++++++++ 5 files changed, 241 insertions(+), 15 deletions(-) create mode 100644 drivers/gpu/drm/nouveau/nouveau_platform.c
drivers/gpu/drm/nouveau/Kconfig +8 -0
@@ -25,6 +25,14 @@ config DRM_NOUVEAU help Choose this option for open-source nVidia support. +config NOUVEAU_PLATFORM_DRIVER + bool + depends on DRM_NOUVEAU + default y if ARCH_TEGRA + help + Support for Nouveau platform driver, used for integrated GPUs as found + on NVIDIA Tegra K1. + config NOUVEAU_DEBUG int "Maximum debug level" depends on DRM_NOUVEAU
drivers/gpu/drm/nouveau/Makefile +3 -0
@@ -331,6 +331,9 @@ nouveau-y += nv50_display.o # drm/pm nouveau-y += nouveau_hwmon.o nouveau_sysfs.o +# platform driver +nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o + # other random bits nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o ifdef CONFIG_X86
drivers/gpu/drm/nouveau/nouveau_drm.c +18 -15
@@ -359,6 +359,9 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) dev->dev_private = drm; drm->dev = dev; +if (dev->platformdev) +platform_set_drvdata (dev->platformdev, dev); +nouveau_client (drm)->debug =nouveau_dbgopt (nouveau_debug,"DRM" );INIT_LIST_HEAD (&drm->clients);
@@ -1003,23 +1006,19 @@ nouveau_drm_pci_driver = { .driver.pm = &nouveau_pm_ops, }; -int nouveau_drm_platform_probe (struct platform_device *pdev) +int nouveau_drm_platform_device_create (struct platform_device *pdev,int length, +void **pobject) { -struct nouveau_device *device; -int ret; - - ret =nouveau_device_create (pdev,NOUVEAU_BUS_PLATFORM , -nouveau_platform_name (pdev), -dev_name (&pdev->dev), nouveau_config, - nouveau_debug, &device); - - ret =drm_platform_init (&driver, pdev); -if (ret) { -nouveau_object_ref (NULL , (struct nouveau_object **)&device); -return ret; - } +return nouveau_device_create_ (pdev,NOUVEAU_BUS_PLATFORM , +nouveau_platform_name (pdev), +dev_name (&pdev->dev), + nouveau_config, nouveau_debug, length, + pobject); +} -return ret; +int nouveau_drm_platform_device_init (struct platform_device *pdev) +{ +return drm_platform_init (&driver, pdev); } static int __init
@@ -1035,6 +1034,8 @@ nouveau_drm_init(void)if (!nouveau_modeset)return 0 ; +nouveau_platform_driver_init (); +nouveau_register_dsm_handler ();return drm_pci_init (&driver, &nouveau_drm_pci_driver); }
@@ -1047,6 +1048,8 @@ nouveau_drm_exit(void)drm_pci_exit (&driver, &nouveau_drm_pci_driver);nouveau_unregister_dsm_handler (); + +nouveau_platform_driver_exit (); }module_init (nouveau_drm_init);
drivers/gpu/drm/nouveau/nouveau_drm.h +21 -0
@@ -157,6 +157,27 @@ nouveau_dev(struct drm_device *dev)int nouveau_pmops_suspend (struct device *);int nouveau_pmops_resume (struct device *); +int nouveau_drm_platform_device_create (struct platform_device *,int ,void **); +int nouveau_drm_platform_device_init (struct platform_device *); + +#if IS_ENABLED (CONFIG_NOUVEAU_PLATFORM_DRIVER ) + +int nouveau_platform_driver_init (void ); +void nouveau_platform_driver_exit (void ); + +#else + +static inline int nouveau_platform_driver_init (void ) +{ +return 0 ; +} + +static inline void nouveau_platform_driver_exit (void ) +{ +} + +#endif + #define NV_FATAL(cli, fmt, args...) nv_fatal((cli), fmt, ##args) #define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args) #define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args)
drivers/gpu/drm/nouveau/nouveau_platform.c new file +191 -0
191 lines not on this page · raw message
Signature · 1 line
1.9.2
PATCH 2/5 ARM: tegra: of: add GK20A device tree binding
In reply to Alexandre CourbotAdd the device tree binding documentation for the GK20A GPU used in Tegra K1 SoCs.
--- .../devicetree/bindings/gpu/nvidia,gk20a.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt new file +45 -0
@@ -0,0 +1,45 @@ +NVIDIA GK20A Graphics Processing Unit + +Required properties: +- compatible: "nvidia,<chip>-<gpu>" + Currently recognized values: + - nvidia,tegra124-gk20a +- reg: Physical base address and length of the controller's registers. + Must contain two entries: + - first entry for bar0 + - second entry for bar1 +- interrupts: The interrupt outputs from the controller. +- interrupt-names: Must include the following entries: + - stall + - nonstall +- vdd-supply: regulator for supply voltage. +- clocks: Must contain an entry for each entry in clock-names. + See ../clocks/clock-bindings.txt for details. +- clock-names: Must include the following entries: + - gpu + - pll +- resets: Must contain an entry for each entry in reset-names. + See ../reset/reset.txt for details. +- reset-names: Must include the following entries: + - gpu + +Example: + +/ { + gpu@0,57000000 { + compatible = "nvidia,gk20a"; + reg = <0x0 0x57000000 0x0 0x01000000>, + <0x0 0x58000000 0x0 0x01000000>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "stall", "nonstall"; + vdd-supply = <&vdd_gpu>; + clocks = <&tegra_car TEGRA124_CLK_GPU>, + <&tegra_car TEGRA124_CLK_PLL_P_OUT5>; + clock-names = "gpu", "pll"; + resets = <&tegra_car 184>; + reset-names = "gpu"; + status = "disabled"; + }; + +};
Signature · 1 line
1.9.2
PATCH 3/5 ARM: tegra: add GK20A GPU to Tegra124 DT
In reply to Alexandre CourbotFrom: Thierry Reding <[email protected]>
Add the GK20A device node to Tegra124's device tree.
--- arch/arm/boot/dts/tegra124.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/tegra124.dtsi +15 -0
@@ -102,6 +102,21 @@ (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; }; + gpu@0,57000000 { + compatible = "nvidia,gk20a"; + reg = <0x0 0x57000000 0x0 0x01000000>, + <0x0 0x58000000 0x0 0x01000000>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "stall", "nonstall"; + clocks = <&tegra_car TEGRA124_CLK_GPU>, + <&tegra_car TEGRA124_CLK_PLL_P_OUT5>; + clock-names = "gpu", "pll"; + resets = <&tegra_car 184>; + reset-names = "gpu"; + status = "disabled"; + }; + timer@0,60005000 { compatible = "nvidia,tegra124-timer", "nvidia,tegra20-timer"; reg = <0x0 0x60005000 0x0 0x400>;
Signature · 1 line
1.9.2
PATCH 4/5 ARM: tegra: venice2: enable GK20A GPU
In reply to Alexandre CourbotFrom: Thierry Reding <[email protected]>
--- arch/arm/boot/dts/tegra124-venice2.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-venice2.dts +7 -1
@@ -42,6 +42,12 @@ }; }; + gpu@0,57000000 { + status = "okay"; + + vdd-supply = <&vdd_gpu>; + }; + pinmux: pinmux@0,70000868 { pinctrl-names = "default"; pinctrl-0 = <&pinmux_default>;
@@ -726,7 +732,7 @@ regulator-always-on; }; - sd6 { + vdd_gpu: sd6 { regulator-name = "+VDD_GPU_AP"; regulator-min-microvolt = <650000>; regulator-max-microvolt = <1200000>;
Signature · 1 line
1.9.2
PATCH 5/5 ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Alexandre Courbot--- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-jetson-tk1.dts +7 -1
@@ -30,6 +30,12 @@ }; }; + gpu@0,57000000 { + status = "okay"; + + vdd-supply = <&vdd_gpu>; + }; + pinmux: pinmux@0,70000868 { pinctrl-names = "default"; pinctrl-0 = <&state_default>;
@@ -1505,7 +1511,7 @@ regulator-always-on; }; - sd6 { + vdd_gpu: sd6 { regulator-name = "+VDD_GPU_AP"; regulator-min-microvolt = <650000>; regulator-max-microvolt = <1200000>;
Signature · 1 line
1.9.2
Am Montag, den 19.05.2014, 18:24 +0900 schrieb Alexandre Courbot:
Quoted 4 lines
This patch series is the final (?) step towards the initial support of GK20A, allowing it to be probed and used (currently at a very slow speed, and for offscreen rendering only) on the Jetson TK1 and Venice 2 boards.
This seem to still need external firmware. Any chance to get this into linux-firmware?
Regards,
Lucas
Quoted 39 lines
The main piece if the first patch which adds platform devices probing support to Nouveau. There are probably lots of things that need to be discussed about it, e.g.:
* The way the DRM device is created, especially with respect to the ongoing changes to the DRM framework,
* The fact that the samedrm_driverinstance is used for the PCI and platform drivers,
* Whether we should have only one platform driver capable of probing all platform devices, or one driver per GPU (in this case, where should all these drivers reside?)So there are still some rough edges, but we are getting there. :)
The first patch should go through the Nouveau tree, while the 4 others are rather intended for Tegra.
Alexandre Courbot (3):
drm/nouveau: support for probing platform devices
ARM: tegra: of: add GK20A device tree binding
ARM: tegra: jetson-tk1: enable GK20A GPUThierry Reding (2):
ARM: tegra: add GK20A GPU to Tegra124 DT
ARM: tegra: venice2: enable GK20A GPU.../devicetree/bindings/gpu/nvidia,gk20a.txt | 45 +++++ arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +- arch/arm/boot/dts/tegra124-venice2.dts | 8 +- arch/arm/boot/dts/tegra124.dtsi | 15 ++ drivers/gpu/drm/nouveau/Kconfig | 8 + drivers/gpu/drm/nouveau/Makefile | 3 + drivers/gpu/drm/nouveau/nouveau_drm.c | 33 ++-- drivers/gpu/drm/nouveau/nouveau_drm.h | 21 +++ drivers/gpu/drm/nouveau/nouveau_platform.c | 191 +++++++++++++++++++++ 9 files changed, 315 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt create mode 100644 drivers/gpu/drm/nouveau/nouveau_platform.c
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 7 lines · Lucas Stach
Am Montag, den 19.05.2014, 18:24 +0900 schrieb Alexandre Courbot:
Quoted 4 lines
This patch series is the final (?) step towards the initial support of GK20A, allowing it to be probed and used (currently at a very slow speed, and for offscreen rendering only) on the Jetson TK1 and Venice 2 boards.
This seem to still need external firmware. Any chance to get this into linux-firmware?
I think that should be possible. There didn't seem to be any objections last time I asked but let me clarify again and get back to you.
Thierry
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [PATCH 2/5] ARM: tegra: of: add GK20A device tree binding
In reply to Alexandre CourbotQuoted 2 lines · Alexandre Courbot
Add the device tree binding documentation for the GK20A GPU used in Tegra K1 SoCs.
A few minor nits, but otherwise,
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt line 11
Quoted 11 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +9
-0+Required properties: +- compatible: "nvidia,<chip>-<gpu>" + Currently recognized values: + - nvidia,tegra124-gk20a +- reg: Physical base address and length of the controller's registers. + Must contain two entries: + - first entry for bar0 + - second entry for bar1 +- interrupts: The interrupt outputs from the controller.
To be consistent with the clocks and resets properties, it'd be nice to reword that as:
interrupts: Must contain an entry for each entry in interrupt-names.
Quoted 1 line
+- interrupt-names: Must include the following entries:
... and add the following here:
See ../interrupt-controller/interrupts.txt
Quoted 1 line
+/ {
No need to wrap a root node around this in the example.
Quoted 1 line
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +1
-0+ gpu@0,57000000 {
...
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt line 44
Quoted 2 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +2
-0+ }; +
Extra blank line here.
Quoted 1 line
+};
Re: [PATCH 3/5] ARM: tegra: add GK20A GPU to Tegra124 DT
In reply to Alexandre CourbotQuoted 3 lines · Alexandre Courbot
From: Thierry Reding <[email protected]>
Add the GK20A device node to Tegra124's device tree.
At a quick glance, patches 3-5 look fine too. I'll hold off on applying them until patches 1-2 have been applied to the DRM/... tree.
Re: [PATCH 2/5] ARM: tegra: of: add GK20A device tree binding
In reply to Stephen WarrenQuoted 32 lines · Stephen Warren
Quoted 2 lines · Alexandre Courbot
Add the device tree binding documentation for the GK20A GPU used in Tegra K1 SoCs.
A few minor nits, but otherwise,
Acked-by Stephen Warren <[email protected]>Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt line 11
Quoted 11 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +9
-0+Required properties: +- compatible: "nvidia,<chip>-<gpu>" + Currently recognized values: + - nvidia,tegra124-gk20a +- reg: Physical base address and length of the controller's registers. + Must contain two entries: + - first entry for bar0 + - second entry for bar1 +- interrupts: The interrupt outputs from the controller.To be consistent with the clocks and resets properties, it'd be nice to reword that as:
interrupts: Must contain an entry for each entry in interrupt-names.
Quoted 1 line
+- interrupt-names: Must include the following entries:
... and add the following here:
See
../interrupt-controller/interrupts.txtQuoted 1 line
+/ {
Quoted 11 lines
No need to wrap a root node around this in the example.
Quoted 1 line
+ gpu@0,57000000 {
...
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt line 44
Quoted 2 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +2
-0+ }; +Extra blank line here.
Quoted 1 line
+};
All fixed and acked-by added to the commit log.
Thanks,
Alex.
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Alexandre CourbotPlaying a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
Quoted 31 lines · Alexandre Courbot
Signed-off-by Alexandre Courbot <[email protected]>--- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/boot/dts/tegra124-jetson-tk1.dts +7
-1@@ -30,6 +30,12 @@ }; }; + gpu@0,57000000 { + status = "okay"; + + vdd-supply = <&vdd_gpu>; + }; + pinmux: pinmux@0,70000868 { pinctrl-names = "default"; pinctrl-0 = <&state_default>;@@ -1505,7 +1511,7 @@ regulator-always-on; }; - sd6 { + vdd_gpu: sd6 { regulator-name = "+VDD_GPU_AP"; regulator-min-microvolt = <650000>; regulator-max-microvolt = <1200000>;
Signature · 1 line
If you put it off long enough, it might go away.
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
Quoted 33 lines · Alexandre Courbot
Quoted 31 lines
Signed-off-by Alexandre Courbot <[email protected]>--- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/boot/dts/tegra124-jetson-tk1.dts +7
-1@@ -30,6 +30,12 @@ }; }; + gpu@0,57000000 { + status = "okay"; + + vdd-supply = <&vdd_gpu>; + }; + pinmux: pinmux@0,70000868 { pinctrl-names = "default"; pinctrl-0 = <&state_default>;@@ -1505,7 +1511,7 @@ regulator-always-on; }; - sd6 { + vdd_gpu: sd6 { regulator-name = "+VDD_GPU_AP"; regulator-min-microvolt = <650000>; regulator-max-microvolt = <1200000>;
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Quoted 5 lines
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
A patch that programs VPR was merged into U-Boot (though I don't think it's made it into master yet). I'm not sure we can reasonably check for that in Nouveau, given that the register is somewhere completely unrelated. In fact I think the U-Boot patch was triggered by some discussion about how to solve this and it was decided that it shouldn't be done in the kernel, but U-Boot should set it up.
That said, perhaps one solution would be to make U-Boot enable the gk20a device if it's set up the VPR and disable it otherwise?
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
Quoted 24 lines · Thierry Reding
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Quoted 5 lines
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
A patch that programs VPR was merged into U-Boot (though I don't think it's made it into master yet). I'm not sure we can reasonably check for that in Nouveau, given that the register is somewhere completely unrelated. In fact I think the U-Boot patch was triggered by some discussion about how to solve this and it was decided that it shouldn't be done in the kernel, but U-Boot should set it up.
Quoted 2 lines
That said, perhaps one solution would be to make U-Boot enable the gk20a device if it's set up the VPR and disable it otherwise?
For that to work, we'd need the DT to say status="disabled" by default for the GPU, and for the fixed U-Boot (and indeed every other bootloader...) to enable the GPU node. This would allow people with old versions of U-Boot (or other bootloaders) to continue to boot. This means bootloaders would only have to set status="okay", but never have to set status="disabled", which at least simplifies them a tiny bit.
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Thierry RedingQuoted 11 lines · Thierry Reding
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Quoted 8 lines
Quoted 5 lines
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
A patch that programs VPR was merged into U-Boot (though I don't think it's made it into master yet).
Assuming you're talking about "ARM: tegra: Disable VPR",that has landed in u-boot master and released as part of v2014.10-rc2 [0]
Quoted 8 lines
I'm not sure we can reasonably check for
that in Nouveau, given that the register is somewhere completely unrelated. In fact I think the U-Boot patch was triggered by some discussion about how to solve this and it was decided that it shouldn't be done in the kernel, but U-Boot should set it up.That said, perhaps one solution would be to make U-Boot enable the gk20a device if it's set up the VPR and disable it otherwise?
I guess in that case the vdd-supply should still be added to the dts with u-boot toggling the status field of the node?
0: http://git.denx.de/?p=u-boot.git;a=commit;h=df3443dfa449ad02bef8ddf6e2c90a6fd9394fc9
Signature · 1 line
Sjoerd Simons <[email protected]>
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
Quoted 4 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware
not available yet in liux-firmware?)I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Actually I am waiting for the firmware and firmware loading support patch to land in linux-firmware and Nouveau respectively. I have yet to send these patches publicly due to some ongoing discussion about the firmware's license.
For now if you want to run Nouveau on TK1, the easiest solution is to use my kernel and Nouveau branches. The branches that should be used are visible in the manifest of https://github.com/Gnurou/tegra-nouveau-rootfs - which BTW also provides an easy way to enable the FOSS graphics stack on a L4T image (minus the firmware at the moment).
More generally speaking, I still have a lot of patches to upstream - I apologize for not having been able to catch up with them. Things have been busy on other fronts, but since these other fronts are soon not going to be a concern anymore I will be able to focus on Nouveau again after mid-next week. :)
Quoted 6 lines
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
The VPR patch has landed in U-boot mainline, so this should be less of a problem now. AFAIK there is no safe way to check whether VPR has been disabled, but the solution might be in your suggestion to make the bootloader enable the GPU DT node if it finds it safe to do so.
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Stephen WarrenQuoted 28 lines · Stephen Warren
Quoted 24 lines · Thierry Reding
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Quoted 5 lines
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
A patch that programs VPR was merged into U-Boot (though I don't think it's made it into master yet). I'm not sure we can reasonably check for that in Nouveau, given that the register is somewhere completely unrelated. In fact I think the U-Boot patch was triggered by some discussion about how to solve this and it was decided that it shouldn't be done in the kernel, but U-Boot should set it up.
Quoted 2 lines
That said, perhaps one solution would be to make U-Boot enable the gk20a device if it's set up the VPR and disable it otherwise?
Quoted 6 lines
For that to work, we'd need the DT to say status="disabled" by default for the GPU, and for the fixed U-Boot (and indeed every other bootloader...) to enable the GPU node. This would allow people with old versions of U-Boot (or other bootloaders) to continue to boot. This means bootloaders would only have to set status="okay", but never have to set status="disabled", which at least simplifies them a tiny bit.
Sounds like a reasonable requirement on bootloaders to me. If it's clear that the device will not work without an initialized VPR region, part of the "boot protocol" should be for the bootloader to tell the kernel when it's safe to enable the GPU.
Thierry
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [5/5] ARM: tegra: jetson-tk1: enable GK20A GPU
In reply to Sjoerd SimonsQuoted 18 lines · Sjoerd Simons
Quoted 17 lines · Thierry Reding
Quoted 15 lines · Stephen Warren
Quoted 3 lines · Sjoerd Simons
Playing a bit with todays linux-next on my jetson, it seems this patch is still required for enabling the GPU. Is there anything blocking it (firmware not available yet in liux-firmware?)
I think initially I was waiting for the DRM patch "drm/nouvea: support for probing platform devices" to be applied, but it looks like that's been applied already, so only patches 4 and 5 in this series are still outstanding.
Alex, wasn't there also some issue where the VPR register had to be programmed, and if it wasn't there'd be a hang when the GPU registers were touched? If we've added code to Nouveau/tegradrm to detect that and avoid the problem, then I guess we can commit these last two patches for 3.19. A resend after the 3.18 merge window might help.
Quoted 5 lines
Quoted 2 lines
A patch that programs VPR was merged into U-Boot (though I don't think it's made it into master yet).
Assuming you're talking about "ARM: tegra: Disable VPR",that has landed in u-boot master and released as part of v2014.10-rc2 [0]
Oh, good.
Quoted 11 lines
Quoted 8 lines
I'm not sure we can reasonably check for
that in Nouveau, given that the register is somewhere completely unrelated. In fact I think the U-Boot patch was triggered by some discussion about how to solve this and it was decided that it shouldn't be done in the kernel, but U-Boot should set it up.That said, perhaps one solution would be to make U-Boot enable the gk20a device if it's set up the VPR and disable it otherwise?
I guess in that case the vdd-supply should still be added to the dts with u-boot toggling the status field of the node?
Yes, if that's what we decide on then this patch should be modified to remove the status = "okay" line.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel