Re: [Nouveau] [PATCH] drm: merge nouveau_platform.ko into nouveau.ko

2015-01-14 Thread Vince Hsu


On 01/15/2015 02:43 PM, Alexandre Courbot wrote:

On Thu, Jan 15, 2015 at 3:39 PM, Ben Skeggs  wrote:

On Thu, Jan 15, 2015 at 4:29 PM, Alexandre Courbot  wrote:

Having the two modules separated causes various unneeded complications,
including having to export symbols accessed between the modules. Make
things simpler by compiling platform device support into nouveau.ko.
Platform device support remains optional and is only compiled on Tegra.

Signed-off-by: Alexandre Courbot 
---
Vince, with this you won't have to export new functions for PM. I ended
up writing it myself because I hit the same issue (nv_device() would now
need to be exported on Ben's master branch).

Be careful that when compiling against a kernel, CONFIG_NOUVEAU_PLATFORM_DRIVER
now *must* be equal to 'y'. It is 'm' currently, so you will need to change it
from tristate to bool in the kernel's Kconfig. For this reason it might be good
to get this patch into -next quickly.

I've got a huge chunk of churn (finally finished the "rename to nvidia
names for stuff" thing) pending too which I want to get to Dave (ASAP,
separately from my other pending work) to avoid having to keep fixing
conflicts in the meantime :)

So, if you guys both agree on the patch, I'll send it along early with those.

That would be just perfect.

Vince, do you have anything against this patch?
Of course not. I just tested it and it worked as good as expected. 
Thanks for sending this.


Vince


___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH] drm: merge nouveau_platform.ko into nouveau.ko

2015-01-14 Thread Alexandre Courbot
On Thu, Jan 15, 2015 at 3:39 PM, Ben Skeggs  wrote:
> On Thu, Jan 15, 2015 at 4:29 PM, Alexandre Courbot  
> wrote:
>> Having the two modules separated causes various unneeded complications,
>> including having to export symbols accessed between the modules. Make
>> things simpler by compiling platform device support into nouveau.ko.
>> Platform device support remains optional and is only compiled on Tegra.
>>
>> Signed-off-by: Alexandre Courbot 
>> ---
>> Vince, with this you won't have to export new functions for PM. I ended
>> up writing it myself because I hit the same issue (nv_device() would now
>> need to be exported on Ben's master branch).
>>
>> Be careful that when compiling against a kernel, 
>> CONFIG_NOUVEAU_PLATFORM_DRIVER
>> now *must* be equal to 'y'. It is 'm' currently, so you will need to change 
>> it
>> from tristate to bool in the kernel's Kconfig. For this reason it might be 
>> good
>> to get this patch into -next quickly.
> I've got a huge chunk of churn (finally finished the "rename to nvidia
> names for stuff" thing) pending too which I want to get to Dave (ASAP,
> separately from my other pending work) to avoid having to keep fixing
> conflicts in the meantime :)
>
> So, if you guys both agree on the patch, I'll send it along early with those.

That would be just perfect.

Vince, do you have anything against this patch?
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH] drm: merge nouveau_platform.ko into nouveau.ko

2015-01-14 Thread Ben Skeggs
On Thu, Jan 15, 2015 at 4:29 PM, Alexandre Courbot  wrote:
> Having the two modules separated causes various unneeded complications,
> including having to export symbols accessed between the modules. Make
> things simpler by compiling platform device support into nouveau.ko.
> Platform device support remains optional and is only compiled on Tegra.
>
> Signed-off-by: Alexandre Courbot 
> ---
> Vince, with this you won't have to export new functions for PM. I ended
> up writing it myself because I hit the same issue (nv_device() would now
> need to be exported on Ben's master branch).
>
> Be careful that when compiling against a kernel, 
> CONFIG_NOUVEAU_PLATFORM_DRIVER
> now *must* be equal to 'y'. It is 'm' currently, so you will need to change it
> from tristate to bool in the kernel's Kconfig. For this reason it might be 
> good
> to get this patch into -next quickly.
I've got a huge chunk of churn (finally finished the "rename to nvidia
names for stuff" thing) pending too which I want to get to Dave (ASAP,
separately from my other pending work) to avoid having to keep fixing
conflicts in the meantime :)

So, if you guys both agree on the patch, I'll send it along early with those.

Ben.

>
>  drm/Kbuild |  3 +--
>  drm/Kconfig|  2 +-
>  drm/nouveau_drm.c  | 11 +--
>  drm/nouveau_platform.c |  6 --
>  drm/nouveau_platform.h |  3 +++
>  5 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drm/Kbuild b/drm/Kbuild
> index ba6b660d3316..1febf6ec0b69 100644
> --- a/drm/Kbuild
> +++ b/drm/Kbuild
> @@ -394,8 +394,7 @@ nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
>  endif
>  nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
>  nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
> +nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
>
>  obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
>
> -# platform driver
> -obj-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
> diff --git a/drm/Kconfig b/drm/Kconfig
> index 40afc69a3778..5ab13e7939db 100644
> --- a/drm/Kconfig
> +++ b/drm/Kconfig
> @@ -26,7 +26,7 @@ config DRM_NOUVEAU
>   Choose this option for open-source NVIDIA support.
>
>  config NOUVEAU_PLATFORM_DRIVER
> -   tristate "Nouveau (NVIDIA) SoC GPUs"
> +   bool "Nouveau (NVIDIA) SoC GPUs"
> depends on DRM_NOUVEAU && ARCH_TEGRA
> default y
> help
> diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c
> index 65910e3aed0c..1118efa56817 100644
> --- a/drm/nouveau_drm.c
> +++ b/drm/nouveau_drm.c
> @@ -52,6 +52,7 @@
>  #include "nouveau_debugfs.h"
>  #include "nouveau_usif.h"
>  #include "nouveau_connector.h"
> +#include "nouveau_platform.h"
>
>  MODULE_PARM_DESC(config, "option string to pass to driver core");
>  static char *nouveau_config;
> @@ -533,7 +534,6 @@ nouveau_drm_device_remove(struct drm_device *dev)
> nouveau_object_ref(NULL, &device);
> nouveau_object_debug();
>  }
> -EXPORT_SYMBOL(nouveau_drm_device_remove);
>
>  static void
>  nouveau_drm_remove(struct pci_dev *pdev)
> @@ -1083,7 +1083,6 @@ err_free:
>
> return ERR_PTR(err);
>  }
> -EXPORT_SYMBOL(nouveau_platform_device_create_);
>
>  static int __init
>  nouveau_drm_init(void)
> @@ -1105,6 +1104,10 @@ nouveau_drm_init(void)
> if (!nouveau_modeset)
> return 0;
>
> +#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
> +   platform_driver_register(&nouveau_platform_driver);
> +#endif
> +
> nouveau_register_dsm_handler();
> return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
>  }
> @@ -1117,6 +1120,10 @@ nouveau_drm_exit(void)
>
> drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
> nouveau_unregister_dsm_handler();
> +
> +#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
> +   platform_driver_unregister(&nouveau_platform_driver);
> +#endif
>  }
>
>  module_init(nouveau_drm_init);
> diff --git a/drm/nouveau_platform.c b/drm/nouveau_platform.c
> index b307bbedd4c4..34d78b288f97 100644
> --- a/drm/nouveau_platform.c
> +++ b/drm/nouveau_platform.c
> @@ -177,9 +177,3 @@ struct platform_driver nouveau_platform_driver = {
> .probe = nouveau_platform_probe,
> .remove = nouveau_platform_remove,
>  };
> -
> -module_platform_driver(nouveau_platform_driver);
> -
> -MODULE_AUTHOR(DRIVER_AUTHOR);
> -MODULE_DESCRIPTION(DRIVER_DESC);
> -MODULE_LICENSE("GPL and additional rights");
> diff --git a/drm/nouveau_platform.h b/drm/nouveau_platform.h
> index 58c28b5653d5..ca22c525329a 100644
> --- a/drm/nouveau_platform.h
> +++ b/drm/nouveau_platform.h
> @@ -28,6 +28,7 @@
>  struct reset_control;
>  struct clk;
>  struct regulator;
> +struct platform_driver;
>
>  struct nouveau_platform_gpu {
> struct reset_control *rst;
> @@ -48,4 +49,6 @@ struct nouveau_platform_device {
>  #define nv_device_to_platform(d) 
>   \
> container_of(d, struct nouveau_platform_device, device)
>
> +extern struct platform_driver nouveau_platform_dr

[Nouveau] [PATCH] drm: merge nouveau_platform.ko into nouveau.ko

2015-01-14 Thread Alexandre Courbot
Having the two modules separated causes various unneeded complications,
including having to export symbols accessed between the modules. Make
things simpler by compiling platform device support into nouveau.ko.
Platform device support remains optional and is only compiled on Tegra.

Signed-off-by: Alexandre Courbot 
---
Vince, with this you won't have to export new functions for PM. I ended
up writing it myself because I hit the same issue (nv_device() would now
need to be exported on Ben's master branch).

Be careful that when compiling against a kernel, CONFIG_NOUVEAU_PLATFORM_DRIVER
now *must* be equal to 'y'. It is 'm' currently, so you will need to change it
from tristate to bool in the kernel's Kconfig. For this reason it might be good
to get this patch into -next quickly.

 drm/Kbuild |  3 +--
 drm/Kconfig|  2 +-
 drm/nouveau_drm.c  | 11 +--
 drm/nouveau_platform.c |  6 --
 drm/nouveau_platform.h |  3 +++
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drm/Kbuild b/drm/Kbuild
index ba6b660d3316..1febf6ec0b69 100644
--- a/drm/Kbuild
+++ b/drm/Kbuild
@@ -394,8 +394,7 @@ nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
 endif
 nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
 nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
+nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
 
 obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
 
-# platform driver
-obj-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
diff --git a/drm/Kconfig b/drm/Kconfig
index 40afc69a3778..5ab13e7939db 100644
--- a/drm/Kconfig
+++ b/drm/Kconfig
@@ -26,7 +26,7 @@ config DRM_NOUVEAU
  Choose this option for open-source NVIDIA support.
 
 config NOUVEAU_PLATFORM_DRIVER
-   tristate "Nouveau (NVIDIA) SoC GPUs"
+   bool "Nouveau (NVIDIA) SoC GPUs"
depends on DRM_NOUVEAU && ARCH_TEGRA
default y
help
diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c
index 65910e3aed0c..1118efa56817 100644
--- a/drm/nouveau_drm.c
+++ b/drm/nouveau_drm.c
@@ -52,6 +52,7 @@
 #include "nouveau_debugfs.h"
 #include "nouveau_usif.h"
 #include "nouveau_connector.h"
+#include "nouveau_platform.h"
 
 MODULE_PARM_DESC(config, "option string to pass to driver core");
 static char *nouveau_config;
@@ -533,7 +534,6 @@ nouveau_drm_device_remove(struct drm_device *dev)
nouveau_object_ref(NULL, &device);
nouveau_object_debug();
 }
-EXPORT_SYMBOL(nouveau_drm_device_remove);
 
 static void
 nouveau_drm_remove(struct pci_dev *pdev)
@@ -1083,7 +1083,6 @@ err_free:
 
return ERR_PTR(err);
 }
-EXPORT_SYMBOL(nouveau_platform_device_create_);
 
 static int __init
 nouveau_drm_init(void)
@@ -1105,6 +1104,10 @@ nouveau_drm_init(void)
if (!nouveau_modeset)
return 0;
 
+#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
+   platform_driver_register(&nouveau_platform_driver);
+#endif
+
nouveau_register_dsm_handler();
return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
 }
@@ -1117,6 +1120,10 @@ nouveau_drm_exit(void)
 
drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
nouveau_unregister_dsm_handler();
+
+#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
+   platform_driver_unregister(&nouveau_platform_driver);
+#endif
 }
 
 module_init(nouveau_drm_init);
diff --git a/drm/nouveau_platform.c b/drm/nouveau_platform.c
index b307bbedd4c4..34d78b288f97 100644
--- a/drm/nouveau_platform.c
+++ b/drm/nouveau_platform.c
@@ -177,9 +177,3 @@ struct platform_driver nouveau_platform_driver = {
.probe = nouveau_platform_probe,
.remove = nouveau_platform_remove,
 };
-
-module_platform_driver(nouveau_platform_driver);
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL and additional rights");
diff --git a/drm/nouveau_platform.h b/drm/nouveau_platform.h
index 58c28b5653d5..ca22c525329a 100644
--- a/drm/nouveau_platform.h
+++ b/drm/nouveau_platform.h
@@ -28,6 +28,7 @@
 struct reset_control;
 struct clk;
 struct regulator;
+struct platform_driver;
 
 struct nouveau_platform_gpu {
struct reset_control *rst;
@@ -48,4 +49,6 @@ struct nouveau_platform_device {
 #define nv_device_to_platform(d)   
\
container_of(d, struct nouveau_platform_device, device)
 
+extern struct platform_driver nouveau_platform_driver;
+
 #endif
-- 
2.2.1

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] Nouveau Images - 3D

2015-01-14 Thread poma
https://nouveau.pmoreau.org

How to test Mesa i.e. hardware-accelerated OpenGL?

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 88415] [NVA8] nouveau GPU lockup when reclocking

2015-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88415

--- Comment #4 from Benedikt Morbach  ---
Created attachment 112242
  --> https://bugs.freedesktop.org/attachment.cgi?id=112242&action=edit
dmesg of second try

I just tried again and this time I could reclock between 03 and 07 while X was
running, albeit with quite some errors in dmesg.

But when I tried to go to 0f, I got a lockup again. (also some minor
corruption).
I used sysrq again to get out and dump dmesg. (see attachment)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 88415] [NVA8] nouveau GPU lockup when reclocking

2015-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88415

--- Comment #3 from Benedikt Morbach  ---
> Which levels exactly did you clock between? 03 and 07? Or did you use 0f?

between 03 and 07

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 88415] [NVA8] nouveau GPU lockup when reclocking

2015-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88415

--- Comment #2 from Benedikt Morbach  ---
Created attachment 112241
  --> https://bugs.freedesktop.org/attachment.cgi?id=112241&action=edit
vbios

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 88415] [NVA8] nouveau GPU lockup when reclocking

2015-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88415

Ilia Mirkin  changed:

   What|Removed |Added

 CC||rspl...@eclipso.eu

--- Comment #1 from Ilia Mirkin  ---
Please upload your VBIOS as well (cat /sys/kernel/debug/dri/0/vbios.rom >
gt218-vbios.rom).

Which levels exactly did you clock between? 03 and 07? Or did you use 0f?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 88415] New: [NVA8] nouveau GPU lockup when reclocking

2015-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88415

Bug ID: 88415
   Summary: [NVA8] nouveau GPU lockup when reclocking
   Product: xorg
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Driver/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: benedikt.morb...@googlemail.com
QA Contact: xorg-t...@lists.x.org

Created attachment 112240
  --> https://bugs.freedesktop.org/attachment.cgi?id=112240&action=edit
full dmesg

kernel: 3.19-rc4
hardware: Thinkpad T510, Quadro NVS 3100M
full dmesg attached, nouveau parts below

What I did:
 1. downclocking before starting X
-> '[:01:00.0] invalid/missing rammap entry' in dmesg

 2. start X
-> working fine (could run glxgears, didn't try much else)

 3. returning to default performance level
-> fine

 4. downclocking again
-> lockup, broke it with sysrq and saved dmesg

Any other logs I should produce?
Do you want a more verbose dmesg?

dmesg | grep nouveau:
[   24.080412] nouveau  [  DEVICE][:01:00.0] BOOT0  : 0x0a8600a2
[   24.080417] nouveau  [  DEVICE][:01:00.0] Chipset: GT218 (NVA8)
[   24.080420] nouveau  [  DEVICE][:01:00.0] Family : NV50
[   24.112811] nouveau  [   VBIOS][:01:00.0] using image from PRAMIN
[   24.113012] nouveau  [   VBIOS][:01:00.0] BIT signature found
[   24.113016] nouveau  [   VBIOS][:01:00.0] version 70.18.45.00.09
[   24.114500] nouveau  [ PMC][:01:00.0] MSI interrupts enabled
[   24.114546] nouveau  [ PFB][:01:00.0] RAM type: DDR3
[   24.114549] nouveau  [ PFB][:01:00.0] RAM size: 512 MiB
[   24.114551] nouveau  [ PFB][:01:00.0]ZCOMP: 960 tags
[   24.117885] nouveau  [VOLT][:01:00.0] GPU voltage: 85uv
[   24.147955] nouveau  [  PTHERM][:01:00.0] FAN control: none / external
[   24.147972] nouveau  [  PTHERM][:01:00.0] fan management: automatic
[   24.147978] nouveau  [  PTHERM][:01:00.0] internal sensor: yes
[   24.168063] nouveau  [ CLK][:01:00.0] 03: core 135 MHz shader 270
MHz memory 135 MHz
[   24.168070] nouveau  [ CLK][:01:00.0] 07: core 405 MHz shader 810
MHz memory 405 MHz
[   24.168074] nouveau  [ CLK][:01:00.0] 0f: core 606 MHz shader 1468
MHz memory 790 MHz
[   24.168117] nouveau  [ CLK][:01:00.0] --: core 405 MHz shader 810
MHz memory 405 MHz
[   24.168493] nouveau  [ DRM] VRAM: 512 MiB
[   24.168495] nouveau  [ DRM] GART: 1048576 MiB
[   24.168499] nouveau  [ DRM] TMDS table version 2.0
[   24.168501] nouveau  [ DRM] DCB version 4.0
[   24.168504] nouveau  [ DRM] DCB outp 00: 01800323 00010034
[   24.168506] nouveau  [ DRM] DCB outp 01: 02811300 
[   24.168508] nouveau  [ DRM] DCB outp 02: 028223a6 0f220010
[   24.168510] nouveau  [ DRM] DCB outp 03: 02822362 00020010
[   24.168511] nouveau  [ DRM] DCB outp 04: 048333b6 0f220010
[   24.168513] nouveau  [ DRM] DCB outp 05: 04833372 00020010
[   24.168515] nouveau  [ DRM] DCB outp 06: 088443c6 0f220010
[   24.168517] nouveau  [ DRM] DCB outp 07: 08844382 00020010
[   24.168519] nouveau  [ DRM] DCB conn 00: 0040
[   24.168521] nouveau  [ DRM] DCB conn 01: 0100
[   24.168523] nouveau  [ DRM] DCB conn 02: 00101246
[   24.168524] nouveau  [ DRM] DCB conn 03: 00202346
[   24.168526] nouveau  [ DRM] DCB conn 04: 00410446
[   24.236201] nouveau  [ DRM] MM: using COPY for buffer copies
[   25.443491] nouveau  [ DRM] allocated 1600x900 fb: 0x7, bo
8800b8decc00
[   25.443614] fbcon: nouveaufb (fb0) is primary device
[   25.763829] nouveau :01:00.0: fb0: nouveaufb frame buffer device
[   25.763831] nouveau :01:00.0: registered panic notifier
[   25.766694] [drm] Initialized nouveau 1.2.1 20120801 for :01:00.0 on
minor 0
[  107.585436] nouveau E[ PFB][:01:00.0] invalid/missing rammap entry
[  612.287829] nouveau E[ DRM] GPU lockup - switching to software fbcon
[  626.123229] nouveau E[  X[907]] failed to idle channel 0x [X[907]]
[  641.123107] nouveau E[  X[907]] failed to idle channel 0x [X[907]]
[  643.129470] nouveau E[   PFIFO][:01:00.0] channel 6 [X[907]] unload
timeout

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau