summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_screen.c
diff options
context:
space:
mode:
authorMarcin Slusarz <[email protected]>2011-10-08 23:58:32 +0200
committerMarcin Slusarz <[email protected]>2011-10-09 14:49:30 +0200
commit90dcd6c89ab4afa55ca19d572a1a695cf55cb1b2 (patch)
treef32247353993da621aec44b1260db6b958a9c862 /src/gallium/drivers/nouveau/nouveau_screen.c
parentf03810fbdd41012422f6920c2026c49927bcb820 (diff)
nouveau: hide some debugging messages behind environment variable
They spam console, but are not very useful - hide them behind NOUVEAU_MESA_DEBUG environment variable.
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_screen.c')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index 223e7682ccd..cdc2bffee81 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <errno.h>
+#include <stdlib.h>
#include "nouveau/nouveau_bo.h"
#include "nouveau/nouveau_mm.h"
@@ -21,6 +22,8 @@
#include "state_tracker/drm_driver.h"
#include "util/u_simple_screen.h"
+int nouveau_mesa_debug = 0;
+
static const char *
nouveau_screen_get_name(struct pipe_screen *pscreen)
{
@@ -202,6 +205,10 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
struct pipe_screen *pscreen = &screen->base;
int ret;
+ char *nv_dbg = getenv("NOUVEAU_MESA_DEBUG");
+ if (nv_dbg)
+ nouveau_mesa_debug = atoi(nv_dbg);
+
ret = nouveau_channel_alloc(dev, 0xbeef0201, 0xbeef0202,
512*1024, &screen->channel);
if (ret)