summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Herbst <kherbst@redhat.com>2021-05-05 14:01:29 +0200
committerKarol Herbst <kherbst@redhat.com>2021-05-06 19:41:10 +0200
commitc0ae9cfa001788bc33d69bd3e65a2d4c417e2a5f (patch)
treec6ae818d0f508193835369911166fd8c594f732a
parent2f04bd2d891dde617a4c7829188333cbdcdf0038 (diff)
downloaddrm-c0ae9cfa001788bc33d69bd3e65a2d4c417e2a5f.tar.gz
nouveau: make debug features accessible in normal builds
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--nouveau/nouveau.c4
-rw-r--r--nouveau/private.h5
2 files changed, 0 insertions, 9 deletions
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index f18d1426..80c62c58 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -46,7 +46,6 @@
#include "nvif/ioctl.h"
#include "nvif/unpack.h"
-#ifdef DEBUG
drm_private uint32_t nouveau_debug = 0;
static void
@@ -58,7 +57,6 @@ debug_init(char *args)
nouveau_debug = n;
}
}
-#endif
static int
nouveau_object_ioctl(struct nouveau_object *obj, void *data, uint32_t size)
@@ -327,9 +325,7 @@ nouveau_drm_new(int fd, struct nouveau_drm **pdrm)
struct nouveau_drm *drm;
drmVersionPtr ver;
-#ifdef DEBUG
debug_init(getenv("NOUVEAU_LIBDRM_DEBUG"));
-#endif
if (!(drm = calloc(1, sizeof(*drm))))
return -ENOMEM;
diff --git a/nouveau/private.h b/nouveau/private.h
index 034a958e..13cec3cd 100644
--- a/nouveau/private.h
+++ b/nouveau/private.h
@@ -9,17 +9,12 @@
#include "nouveau.h"
-#ifdef DEBUG
drm_private extern uint32_t nouveau_debug;
#define dbg_on(lvl) (nouveau_debug & (1 << lvl))
#define dbg(lvl, fmt, args...) do { \
if (dbg_on((lvl))) \
fprintf(stderr, "nouveau: "fmt, ##args); \
} while(0)
-#else
-#define dbg_on(lvl) (0)
-#define dbg(lvl, fmt, args...)
-#endif
#define err(fmt, args...) fprintf(stderr, "nouveau: "fmt, ##args)
struct nouveau_client_kref {