[Nouveau] [PATCH v2 2/2] drm/nouveau: mark symbols static where possible

2016-10-23 Thread Baoyou Xie
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:29:1: warning: no previous 
prototype for 'nvbios_fan_table' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:56:1: warning: no previous 
prototype for 'nvbios_fan_entry' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:184:1: warning: no previous 
prototype for 'gt215_clk_info' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:99:1: warning: no previous 
prototype for 'gt215_link_train_calc' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:153:1: warning: no previous 
prototype for 'gt215_link_train' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:271:1: warning: no previous 
prototype for 'gt215_link_train_init' [-Wmissing-prototypes]


In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie 
---
 drivers/gpu/drm/nouveau/nouveau_display.c   | 2 +-
 drivers/gpu/drm/nouveau/nv10_fence.c| 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/device/user.c   | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 8 
 drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c  | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c   | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c   | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c  | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c  | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c   | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c  | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c   | 8 
 drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c| 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c| 4 ++--
 17 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
b/drivers/gpu/drm/nouveau/nouveau_display.c
index afbf557..b60ee21 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -92,7 +92,7 @@ calc(int blanks, int blanke, int total, int line)
return line;
 }
 
-int
+static int
 nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
ktime_t *stime, ktime_t *etime)
 {
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c 
b/drivers/gpu/drm/nouveau/nv10_fence.c
index 4e3de34..619f79d 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -66,7 +66,7 @@ nv10_fence_context_del(struct nouveau_channel *chan)
nouveau_fence_context_free(>base);
 }
 
-int
+static int
 nv10_fence_context_new(struct nouveau_channel *chan)
 {
struct nv10_fence_chan *fctx;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
index 79a8f71..513ee6b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
@@ -326,7 +326,7 @@ nvkm_udevice = {
.sclass = nvkm_udevice_child_get,
 };
 
-int
+static int
 nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size,
 struct nvkm_object **pobject)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
index dd2953b..26990d4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
@@ -153,7 +153,7 @@ nv50_disp_chan_uevent = {
.fini = nv50_disp_chan_uevent_fini,
 };
 
-int
+static int
 nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
 {
struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -163,7 +163,7 @@ nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, 
u32 *data)
return 0;
 }
 
-int
+static int
 nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
 {
struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -173,7 +173,7 @@ nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, 
u32 data)
return 0;
 }
 
-int
+static int
 nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
struct nvkm_event **pevent)
 {
@@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
return -EINVAL;
 }
 
-int
+static int
 nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size)
 {
struct nv50_disp_chan *chan = nv50_disp_chan(object);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c

[Nouveau] [PATCH v2 1/2] drm/nouveau: add missing header dependencies

2016-10-23 Thread Baoyou Xie
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous 
prototype for 'nvkm_firmware_get' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous 
prototype for 'nvkm_firmware_put' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c:69:1: warning: no previous 
prototype for 'nvkm_sddr3_calc' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c:60:1: warning: no previous 
prototype for 'nvkm_sddr2_calc' [-Wmissing-prototypes]


In fact, these functions are declared in
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h
drivers/gpu/drm/nouveau/dispnv04/disp.h.
So this patch adds missing header dependencies.

Signed-off-by: Baoyou Xie 
---
 drivers/gpu/drm/nouveau/dispnv04/overlay.c   | 2 +-
 drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 1 +
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c | 1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c   | 1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c   | 1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c  | 1 +
 6 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c 
b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
index ec444ea..a79514d 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@ -33,7 +33,7 @@
 #include "nouveau_connector.h"
 #include "nouveau_display.h"
 #include "nvreg.h"
-
+#include "disp.h"
 
 struct nouveau_plane {
struct drm_plane base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c 
b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
index 34ecd4a..058ff46 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
@@ -20,6 +20,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 #include 
+#include 
 
 /**
  * nvkm_firmware_get - load firmware from the official nvidia/chip/ directory
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
index 1e13278..c8bb919 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
@@ -106,6 +106,7 @@
 #define CP_SEEK_2  0x00c800ff
 
 #include "ctxnv40.h"
+#include "nv50.h"
 
 #include 
 
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
index b9f1ffd..4dcd874 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
@@ -23,6 +23,7 @@
  *  Ben Skeggs
  */
 #include "priv.h"
+#include "ram.h"
 
 struct ramxlat {
int id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
index 2690033..eca8a44 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
@@ -23,6 +23,7 @@
  * Roy Spliet 
  */
 #include "priv.h"
+#include "ram.h"
 
 struct ramxlat {
int id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
index d2bac1d..443c031 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include "priv.h"
 
 static const u8 tags[] = {
DCB_GPIO_VID0, DCB_GPIO_VID1, DCB_GPIO_VID2, DCB_GPIO_VID3,
-- 
2.7.4

___
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-10-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97462

Daniel Barkalow  changed:

   What|Removed |Added

 CC||barka...@iabervon.org

--- Comment #14 from Daniel Barkalow  ---
I'm having similar problems (google maps in firefox reliably causes a freeze,
although my mouse and magic-sysrq work); in my case, the logging grinds to a
halt with a fifo engine fault it doesn't seem to recover from. I've also found
that spherical video on youtube does it reliably, other video does it
occasionally, and other firefox usage does it rarely. This is my home computer,
so I can mess around with it some more if you want extra debugging output or
something.

-- 
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-10-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #76 from Zach Wolfe  ---
Was just curious about this issue myself, on Mint 18 w/ kernel 4.5.4 and my GTX
980 just gives me a black screen as well. Worked on Fedora with later kernel
versions however so I take it its not strictly a nouveau issue but its beyond
my capabilities to even find the problem?

-- 
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 98398] Vgaswitcharoo fails to turn off GPU properly

2016-10-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98398

--- Comment #7 from Pablo Cholaky  ---
Just to add extra info here, this problem also happens with bbswitch
https://github.com/Bumblebee-Project/bbswitch/issues/140

Guys, do you know if this is really a bug from Linux or a feature? I meant, if
changes to fix this problem would be at kernel side (PM team) or kernel
interface side (vgaswitcheroo / bbswitch) ?

Regards

-- 
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 93557] Kernel Panic on Linux Kernel 4.4 when loading KDE/KDM on Nvidia GeForce 7025 / nForce 630a

2016-10-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93557

--- Comment #8 from kisame...@gmail.com ---
System: Arch Linux with linux 4.8.4 and xf86-video-nouveau 1.0.13.
Same problem as above.Kernel crashes after spamming MMIO write fault errors.

Interestingly, problem goes away with kernel parameter "nouveau.noaccel=1".
Of course this means no 2D acceleration.

-- 
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