[Nouveau] [PATCH v3 take 2] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Martin Peres
We received a donation of a Titan which has this useless feature
allowing users to control the brightness of the LED behind the
logo of NVIDIA. In the true spirit of open source, let's expose
that to the users of very expensive cards!

This patch hooks up this LED/PWM to the LED subsystem which allows
blinking it in sync with cpu/disk/network/whatever activity (heartbeat
is quite nice!). Users may also implement some breathing effect or
morse code support in the userspace if they feel like it.

v2:
 - surround the use of the LED framework with ifdef CONFIG_LEDS_CLASS

v3:
 - avoid using ifdefs everywhere, follow the recommendations of
   /doc/Documentation/CodingStyle. Suggested by Emil Velikov.

Signed-off-by: Martin Peres 
---

I again managed to send the wrong patch...

I guess porting patches between kernels and then scp'ing at 4am is not
something I should be doing. Sorry *again* for the noise!

This time, it looks sane though and actually follows what Emil
suggested!

 drm/nouveau/Kbuild  |   1 +
 drm/nouveau/include/nvkm/subdev/bios/gpio.h |   1 +
 drm/nouveau/nouveau_drm.c   |   7 ++
 drm/nouveau/nouveau_drv.h   |   3 +
 drm/nouveau/nouveau_led.c   | 132 
 drm/nouveau/nouveau_led.h   |  57 
 6 files changed, 201 insertions(+)
 create mode 100644 drm/nouveau/nouveau_led.c
 create mode 100644 drm/nouveau/nouveau_led.h

diff --git a/drm/nouveau/Kbuild b/drm/nouveau/Kbuild
index 2527bf4..fde6e36 100644
--- a/drm/nouveau/Kbuild
+++ b/drm/nouveau/Kbuild
@@ -22,6 +22,7 @@ nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
 nouveau-y += nouveau_drm.o
 nouveau-y += nouveau_hwmon.o
 nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
+nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o
 nouveau-y += nouveau_nvif.o
 nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
 nouveau-y += nouveau_usif.o # userspace <-> nvif
diff --git a/drm/nouveau/include/nvkm/subdev/bios/gpio.h 
b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
index a47d46d..b7a54e6 100644
--- a/drm/nouveau/include/nvkm/subdev/bios/gpio.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
@@ -6,6 +6,7 @@ enum dcb_gpio_func_name {
DCB_GPIO_TVDAC1 = 0x2d,
DCB_GPIO_FAN = 0x09,
DCB_GPIO_FAN_SENSE = 0x3d,
+   DCB_GPIO_LOGO_LED_PWM = 0x84,
DCB_GPIO_UNUSED = 0xff,
DCB_GPIO_VID0 = 0x04,
DCB_GPIO_VID1 = 0x05,
diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c
index 66c1280..0f16652 100644
--- a/drm/nouveau/nouveau_drm.c
+++ b/drm/nouveau/nouveau_drm.c
@@ -47,6 +47,7 @@
 #include "nouveau_ttm.h"
 #include "nouveau_gem.h"
 #include "nouveau_vga.h"
+#include "nouveau_led.h"
 #include "nouveau_hwmon.h"
 #include "nouveau_acpi.h"
 #include "nouveau_bios.h"
@@ -475,6 +476,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long 
flags)
nouveau_hwmon_init(dev);
nouveau_accel_init(drm);
nouveau_fbcon_init(dev);
+   nouveau_led_init(dev);
 
if (nouveau_runtime_pm != 0) {
pm_runtime_use_autosuspend(dev->dev);
@@ -510,6 +512,7 @@ nouveau_drm_unload(struct drm_device *dev)
pm_runtime_forbid(dev->dev);
}
 
+   nouveau_led_fini(dev);
nouveau_fbcon_fini(dev);
nouveau_accel_fini(drm);
nouveau_hwmon_fini(dev);
@@ -561,6 +564,8 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
struct nouveau_cli *cli;
int ret;
 
+   nouveau_led_suspend(dev);
+
if (dev->mode_config.num_crtc) {
NV_INFO(drm, "suspending console...\n");
nouveau_fbcon_set_suspend(dev, 1);
@@ -649,6 +654,8 @@ nouveau_do_resume(struct drm_device *dev, bool runtime)
nouveau_fbcon_set_suspend(dev, 0);
}
 
+   nouveau_led_resume(dev);
+
return 0;
 }
 
diff --git a/drm/nouveau/nouveau_drv.h b/drm/nouveau/nouveau_drv.h
index 822a021..c0e2b32 100644
--- a/drm/nouveau/nouveau_drv.h
+++ b/drm/nouveau/nouveau_drv.h
@@ -166,6 +166,9 @@ struct nouveau_drm {
struct nouveau_hwmon *hwmon;
struct nouveau_debugfs *debugfs;
 
+   /* led management */
+   struct nouveau_led *led;
+
/* display power reference */
bool have_disp_power_ref;
 
diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
new file mode 100644
index 000..9eed5a6
--- /dev/null
+++ b/drm/nouveau/nouveau_led.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2016 Martin Peres
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditi

[Nouveau] [PATCH v3] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Martin Peres
We received a donation of a Titan which has this useless feature
allowing users to control the brightness of the LED behind the
logo of NVIDIA. In the true spirit of open source, let's expose
that to the users of very expensive cards!

This patch hooks up this LED/PWM to the LED subsystem which allows
blinking it in sync with cpu/disk/network/whatever activity (heartbeat
is quite nice!). Users may also implement some breathing effect or
morse code support in the userspace if they feel like it.

v2:
 - surround the use of the LED framework with ifdef CONFIG_LEDS_CLASS

v3:
 - avoid using ifdefs everywhere, follow the recommendations of
   /doc/Documentation/CodingStyle. Suggested by Emil Velikov.

Reviewed-by: Karol Herbst 
Signed-off-by: Martin Peres 
---
 drm/nouveau/Kbuild  |   1 +
 drm/nouveau/include/nvkm/subdev/bios/gpio.h |   1 +
 drm/nouveau/nouveau_drm.c   |   7 ++
 drm/nouveau/nouveau_drv.h   |   3 +
 drm/nouveau/nouveau_led.c   | 148 
 drm/nouveau/nouveau_led.h   |  50 ++
 6 files changed, 210 insertions(+)
 create mode 100644 drm/nouveau/nouveau_led.c
 create mode 100644 drm/nouveau/nouveau_led.h

diff --git a/drm/nouveau/Kbuild b/drm/nouveau/Kbuild
index 2527bf4..312bca9 100644
--- a/drm/nouveau/Kbuild
+++ b/drm/nouveau/Kbuild
@@ -22,6 +22,7 @@ nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
 nouveau-y += nouveau_drm.o
 nouveau-y += nouveau_hwmon.o
 nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
+nouveau-y += nouveau_led.o
 nouveau-y += nouveau_nvif.o
 nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
 nouveau-y += nouveau_usif.o # userspace <-> nvif
diff --git a/drm/nouveau/include/nvkm/subdev/bios/gpio.h 
b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
index a47d46d..b7a54e6 100644
--- a/drm/nouveau/include/nvkm/subdev/bios/gpio.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
@@ -6,6 +6,7 @@ enum dcb_gpio_func_name {
DCB_GPIO_TVDAC1 = 0x2d,
DCB_GPIO_FAN = 0x09,
DCB_GPIO_FAN_SENSE = 0x3d,
+   DCB_GPIO_LOGO_LED_PWM = 0x84,
DCB_GPIO_UNUSED = 0xff,
DCB_GPIO_VID0 = 0x04,
DCB_GPIO_VID1 = 0x05,
diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c
index 66c1280..0f16652 100644
--- a/drm/nouveau/nouveau_drm.c
+++ b/drm/nouveau/nouveau_drm.c
@@ -47,6 +47,7 @@
 #include "nouveau_ttm.h"
 #include "nouveau_gem.h"
 #include "nouveau_vga.h"
+#include "nouveau_led.h"
 #include "nouveau_hwmon.h"
 #include "nouveau_acpi.h"
 #include "nouveau_bios.h"
@@ -475,6 +476,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long 
flags)
nouveau_hwmon_init(dev);
nouveau_accel_init(drm);
nouveau_fbcon_init(dev);
+   nouveau_led_init(dev);
 
if (nouveau_runtime_pm != 0) {
pm_runtime_use_autosuspend(dev->dev);
@@ -510,6 +512,7 @@ nouveau_drm_unload(struct drm_device *dev)
pm_runtime_forbid(dev->dev);
}
 
+   nouveau_led_fini(dev);
nouveau_fbcon_fini(dev);
nouveau_accel_fini(drm);
nouveau_hwmon_fini(dev);
@@ -561,6 +564,8 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
struct nouveau_cli *cli;
int ret;
 
+   nouveau_led_suspend(dev);
+
if (dev->mode_config.num_crtc) {
NV_INFO(drm, "suspending console...\n");
nouveau_fbcon_set_suspend(dev, 1);
@@ -649,6 +654,8 @@ nouveau_do_resume(struct drm_device *dev, bool runtime)
nouveau_fbcon_set_suspend(dev, 0);
}
 
+   nouveau_led_resume(dev);
+
return 0;
 }
 
diff --git a/drm/nouveau/nouveau_drv.h b/drm/nouveau/nouveau_drv.h
index 822a021..c0e2b32 100644
--- a/drm/nouveau/nouveau_drv.h
+++ b/drm/nouveau/nouveau_drv.h
@@ -166,6 +166,9 @@ struct nouveau_drm {
struct nouveau_hwmon *hwmon;
struct nouveau_debugfs *debugfs;
 
+   /* led management */
+   struct nouveau_led *led;
+
/* display power reference */
bool have_disp_power_ref;
 
diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
new file mode 100644
index 000..824a9c6
--- /dev/null
+++ b/drm/nouveau/nouveau_led.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2016 Martin Peres
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY

[Nouveau] [Bug 94990] [GM204] GTX 970 + 4GB VRAM fails at secboot (v4.6+)

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

Ilia Mirkin  changed:

   What|Removed |Added

 CC||pil.smmi...@yandex.com

--- Comment #68 from Ilia Mirkin  ---
*** Bug 97066 has been marked as a duplicate of this bug. ***

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


[Nouveau] [Bug 97066] Blank screen when starting KMS on a GTX970 for kernel 4.6 series

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97066

Ilia Mirkin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #8 from Ilia Mirkin  ---


*** This bug has been marked as a duplicate of bug 94990 ***

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


[Nouveau] [Bug 94990] [GM204] GTX 970 + 4GB VRAM fails at secboot (v4.6+)

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

Ilia Mirkin  changed:

   What|Removed |Added

Summary|Latest 4.6rc4 kernel, no|[GM204] GTX 970 + 4GB VRAM
   |booting on gtx970   |fails at secboot (v4.6+)

--- Comment #67 from Ilia Mirkin  ---
I don't see a way to lock this bug down, unfortunately, but Efram, please
refrain from further comments other than to say "Yes, I have tested the
provided patch and it works" (or doesn't work), once such a patch has been made
available. [It has not yet.] This is not a discussion forum.

There are a few hackpatches available that "work around" this, but they aren't
real solutions. Wait for something from Ben before reporting test results.

Thanks for everyone's patience!

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


Re: [Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread Efrem Mc
In reference, I do use the nouveau driver on non-CUDA development systems.
I like how the development teams respond to bugs and fixes.  There are some
differences in the behavior of the kernels between 4.6.x and 4.7.x with the
video drivers.  I am not sure if is related to libdrm, mesa, of libGL
types.  I have a 960 GTX which is in the same product family as the 970
GTX.  Had problems with the 4.7.0 kernel and reverted back to the 4.6.5
kernel and working with some limitations.

On Wed, Aug 24, 2016 at 4:55 PM,  wrote:

> *Comment # 65  on
> bug 94990  from Florian
> Mickler  *
>
> It is considered to be very rude to hijack a bug report for other discussions.
>
> --
> You are receiving this mail because:
>
>- You are the assignee for the bug.
>
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
>
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #66 from Efrem McCrimon  ---
In reference, I do use the nouveau driver on non-CUDA development systems.
I like how the development teams respond to bugs and fixes.  There are some
differences in the behavior of the kernels between 4.6.x and 4.7.x with the
video drivers.  I am not sure if is related to libdrm, mesa, of libGL
types.  I have a 960 GTX which is in the same product family as the 970
GTX.  Had problems with the 4.7.0 kernel and reverted back to the 4.6.5
kernel and working with some limitations.

On Wed, Aug 24, 2016 at 4:55 PM,  wrote:

> *Comment # 65  on
> bug 94990  from Florian
> Mickler  *
>
> It is considered to be very rude to hijack a bug report for other discussions.
>
> --
> You are receiving this mail because:
>
>- You are the assignee for the bug.
>
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
>

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


[Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #65 from Florian Mickler  ---
It is considered to be very rude to hijack a bug report for other discussions.

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


Re: [Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread Efrem Mc
I have to install the Nvidia driver on on development systems because I am
doing some programming with CUDA.  I use the CUDA Toolkit in C/C++.  I am
converting some of the software over to OpenACC.  OpenACC has it own
compilers but CUDA requires the non-free driver because the tools
communication to the driver with the APIs.

Regards,

Efrem Mc

On Wed, Aug 24, 2016 at 4:35 AM,  wrote:

> *Comment # 63  on
> bug 94990  from Yann
> Golanski  *
>
> (In reply to Efrem McCrimon from comment #62 
> )> What version of 
> the non-free Nvidia driver are you using? 370.23 or 367.35?
>
> I do not use the non-free Nvidia driver because it causes many more problems
> than it solves: every kernel upgrade might break things until a new driver is
> released. At least with the nouveau, it's more in sync.  Well, this bug none
> withstanding :)
>
> --
> You are receiving this mail because:
>
>- You are the assignee for the bug.
>
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
>
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #64 from Efrem McCrimon  ---
I have to install the Nvidia driver on on development systems because I am
doing some programming with CUDA.  I use the CUDA Toolkit in C/C++.  I am
converting some of the software over to OpenACC.  OpenACC has it own
compilers but CUDA requires the non-free driver because the tools
communication to the driver with the APIs.

Regards,

Efrem Mc

On Wed, Aug 24, 2016 at 4:35 AM,  wrote:

> *Comment # 63  on
> bug 94990  from Yann
> Golanski  *
>
> (In reply to Efrem McCrimon from comment #62 
> )> What version of 
> the non-free Nvidia driver are you using? 370.23 or 367.35?
>
> I do not use the non-free Nvidia driver because it causes many more problems
> than it solves: every kernel upgrade might break things until a new driver is
> released. At least with the nouveau, it's more in sync.  Well, this bug none
> withstanding :)
>
> --
> You are receiving this mail because:
>
>- You are the assignee for the bug.
>
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
>

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


[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

--- Comment #5 from wa...@mailbox.hu ---
Um, wait, what? now this was a straightforward build process.
I managed to build it in the background in say, 7 minutes.

I have to leave the office now and have to leave something running, but will
test it tomorrow and get back to you.

Thanks for assistance.

PS. I had no luck with the usual config settings (not that two changes per hang
is viable even on the medium run).

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


[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

--- Comment #4 from Ilia Mirkin  ---
(In reply to wadev from comment #3)
> WOW. You do quite a work there, aren't you.
> 
> Thanks, I will try and build it soon from source but as this is my work
> machine, it is not quite sure that this will be tomorrow.

I'm in no rush. Until then, you can disable all the webgl/acceleration stuff in
firefox and it should hopefully not happen again. I believe this can be done
from about:config.

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


[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

--- Comment #3 from wa...@mailbox.hu ---
WOW. You do quite a work there, aren't you.

Thanks, I will try and build it soon from source but as this is my work
machine, it is not quite sure that this will be tomorrow.

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


[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

--- Comment #2 from Ilia Mirkin  ---
This reads like a desync of some sort. The most common cause of this is the
fact that nouveau + threading = fail. I have some preliminary patches which
kinda-sorta work but not quite done that you can try -
https://github.com/imirkin/mesa/commits/locking

Chances are you can ssh in from another computer and kill the offending process
and then things should come back. Not always though.

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


[Nouveau] [Bug 78530] Memory corruption on Lenovo t440p with runpm

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=78530

Peter Wu  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||pe...@lekensteyn.nl
 Status|REOPENED|RESOLVED

--- Comment #22 from Peter Wu  ---
Fixed in v4.8-rc1

commit 692a17dcc2922a91c6bcf11b3321503a3377b1b1
Author: Peter Wu 
Date:   Fri Jul 15 15:12:18 2016 +0200

drm/nouveau/acpi: fix lockup with PCIe runtime PM

It was confirmed to fix the memory corruption, if it still happens, please
re-open.

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


[Nouveau] [Bug 91408] Lenovo T440s alternate way to turn off discrete GPU

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91408

Peter Wu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pe...@lekensteyn.nl
 Resolution|--- |FIXED

--- Comment #2 from Peter Wu  ---
Fixed in Linux v4.8-rc1

commit 692a17dcc2922a91c6bcf11b3321503a3377b1b1
Author: Peter Wu 
Date:   Fri Jul 15 15:12:18 2016 +0200

drm/nouveau/acpi: fix lockup with PCIe runtime PM

Can you validate this?

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


[Nouveau] [Bug 93828] Xorg hangs randomly with nouveau driver

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93828

--- Comment #6 from j...@shade-fx.com ---
Created attachment 126001
  --> https://bugs.freedesktop.org/attachment.cgi?id=126001&action=edit
Kernel log when crash

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


[Nouveau] [Bug 93828] Xorg hangs randomly with nouveau driver

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93828

--- Comment #5 from j...@shade-fx.com ---
Created attachment 126000
  --> https://bugs.freedesktop.org/attachment.cgi?id=126000&action=edit
xorg-log after crash

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


[Nouveau] [Bug 93828] Xorg hangs randomly with nouveau driver

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93828

--- Comment #4 from j...@shade-fx.com ---
I think I faced this exactly same crash today on Slackware 14.2 x86 system.

Chromium was loading some page while whole X freezes. i was able to SSH in to
the system but only restart really fixed the system.

OS info :
Slackware 14.2

kernel : 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 Intel(R) Core(TM)2
Quad CPUQ6600  @ 2.40GHz GenuineIntel GNU/Linux

GPU: 01:00.0 VGA compatible controller: NVIDIA Corporation G84GL [Quadro FX
370] (rev a1)

Packet / library info & versions
kernel-huge-4.4.14-x86_64-1
mesa-11.2.2-x86_64-1
xf86-video-nouveau-1.0.12-x86_64-1
xorg-server-1.18.3-x86_64-2

I attach some xorg log and kernel log

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


Re: [Nouveau] [PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Emil Velikov
On 24 August 2016 at 13:11, Martin Peres  wrote:
> On 23/08/16 17:43, Emil Velikov wrote:
>>
>> On 23 August 2016 at 00:42, Martin Peres  wrote:
>>>
>>> v2:
>>>   - guard LED framework calls with ifdef CONFIG_LEDS_CLASS
>>>
>> IIRC kernel has the tendency of using static inlines in the headers
>> when CONFIG_foo is not set. Worth using that and removing the ifdef
>> from the source file ?
>
>
> Oh, you mean, re-defining the functions I use but make them do nothing.
>
> However, I should do it in the source file and not in the header since I do
> not want to export these symbols outside of the object.
>
Afaics they're used in nouveau_drm.c outside the object, which is why
I suggested it.

> Do you have an example to share? Anyway, this seems like a good
> candidate to reduce the number of ifdefs. Thanks!
>
Others have provided with a link, but here is an inline example:

cat nouveau_led.h
...

#ifdef CONFIG_LEDS_CLASS
int  nouveau_led_init(struct drm_device *dev);
void nouveau_led_suspend(struct drm_device *dev);
void nouveau_led_resume(struct drm_device *dev);
void nouveau_led_fini(struct drm_device *dev);
#else
static inline int  nouveau_led_init(struct drm_device *dev) { return 0; };
static inline ...
...
#endif /* CONFIG_LEDS_CLASS */


-Emil
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Karol Herbst
https://www.kernel.org/doc/Documentation/CodingStyle

"Chapter 20: Conditional Compilation" ;)

2016-08-24 14:11 GMT+02:00 Martin Peres :
> On 23/08/16 17:43, Emil Velikov wrote:
>>
>> On 23 August 2016 at 00:42, Martin Peres  wrote:
>>>
>>> v2:
>>>   - guard LED framework calls with ifdef CONFIG_LEDS_CLASS
>>>
>> IIRC kernel has the tendency of using static inlines in the headers
>> when CONFIG_foo is not set. Worth using that and removing the ifdef
>> from the source file ?
>
>
> Oh, you mean, re-defining the functions I use but make them do nothing.
>
> However, I should do it in the source file and not in the header since I do
> not want to export these symbols outside of the object.
>
> Do you have an example to share? Anyway, this seems like a good
> candidate to reduce the number of ifdefs. Thanks!
>
> Martin
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Lukas Wunner
On Wed, Aug 24, 2016 at 03:11:12PM +0300, Martin Peres wrote:
> On 23/08/16 17:43, Emil Velikov wrote:
> > On 23 August 2016 at 00:42, Martin Peres  wrote:
> > > v2:
> > >   - guard LED framework calls with ifdef CONFIG_LEDS_CLASS
> > > 
> > IIRC kernel has the tendency of using static inlines in the headers
> > when CONFIG_foo is not set. Worth using that and removing the ifdef
> > from the source file ?
> 
> Oh, you mean, re-defining the functions I use but make them do nothing.
> 
> However, I should do it in the source file and not in the header since I do
> not want to export these symbols outside of the object.
> 
> Do you have an example to share? Anyway, this seems like a good
> candidate to reduce the number of ifdefs. Thanks!

See Documentation/CodingStyle, "Chapter 20: Conditional Compilation".
Plenty examples are in include/linux/.

Best regards,

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


Re: [Nouveau] [PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo

2016-08-24 Thread Martin Peres

On 23/08/16 17:43, Emil Velikov wrote:

On 23 August 2016 at 00:42, Martin Peres  wrote:

v2:
  - guard LED framework calls with ifdef CONFIG_LEDS_CLASS


IIRC kernel has the tendency of using static inlines in the headers
when CONFIG_foo is not set. Worth using that and removing the ifdef
from the source file ?


Oh, you mean, re-defining the functions I use but make them do nothing.

However, I should do it in the source file and not in the header since I do
not want to export these symbols outside of the object.

Do you have an example to share? Anyway, this seems like a good
candidate to reduce the number of ifdefs. Thanks!

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


[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

--- Comment #1 from wa...@mailbox.hu ---
uname:

Linux terra 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux

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


[Nouveau] [Bug 97462] New: Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

Bug ID: 97462
   Summary: Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa
version 11.2.2 when visiting Google Maps with firefox
49.0b5
   Product: xorg
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Driver/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: wa...@mailbox.hu
QA Contact: xorg-t...@lists.x.org

When visiting Google Maps website from Firefox 49.0b5, the computer totally
locks up.
It becomes unresponsive, no keyboard input (not even leds) nor mouse activity
from there on.

If I press the power button, however, it *will* shut down in a superfast 5-6
minutes course.

This must be the same problem as #33222 and #96802, more details added for
reproducibility. Should you need any further information, please let me know.

glxinfo excerpt:

Extended renderer info (GLX_MESA_query_renderer):
Vendor: nouveau (0x10de)
Device: NVD9 (0x104a)
Version: 11.2.2
Accelerated: yes
Video memory: 2031MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.1
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NVD9
OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.2.2
OpenGL core profile shading language version string: 4.10

Syslog excerpt as follows:

Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 000c data
8671
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0200 []
ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0020 data 4302
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0030 data
200104d6
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0034 data
4303
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0038 data
800103e4
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 003c data
20010680
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0040 data

Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0044 data

Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0048 data
800104b3
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 004c data
800104ba
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: gr: DATA_ERROR 0004
[INVALID_VALUE] ch 7 [007f9ed000 Compositor[29014]] subc 0 class 9297 mthd 0804
data 3a88acfb
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0054 data
0203
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0058 data
866f
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 005c data
84e0
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: PBDMA0: 0020
[ILLEGAL_MTHD] ch 7 [007f9ed000 Compositor[29014]] subc 0 mthd 0060 data
84bb
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: read fault at
002004 engine 07 [PFIFO] client 07 [BAR_READ] reason 00 [PT_NOT_PRESENT] on
channel 7 [007f9ed000 Compositor[29014]]
Aug 23 10:46:13 terra kernel: nouveau :01:00.0: fifo: fifo engine fault on
channel 7, recovering...

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


[Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #63 from Yann Golanski  ---
(In reply to Efrem McCrimon from comment #62)
> What version of the non-free Nvidia driver are you using? 370.23 or 367.35?

I do not use the non-free Nvidia driver because it causes many more problems
than it solves: every kernel upgrade might break things until a new driver is
released. At least with the nouveau, it's more in sync.  Well, this bug none
withstanding :)

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