summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-02-13 21:35:14 -0500
committerBen Skeggs <bskeggs@redhat.com>2014-02-18 10:40:22 +1000
commit8125ad9222451326055cf1d107657c9ffade214a (patch)
tree74f39fb7476ea13f84cb9496bd9ba609e16e9742
parent1a69e492af24f83d075cd9443996f6f34242bccd (diff)
drm: use nv_debug for NV_DEBUG, make DRM a separate subflag
It's really confusing for NV_DEBUG's printing to be controlled via drm.debug while everything else is controlled via nouveau.debug. These messages can be turned on with nouveau.debug=DRM=debug. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drm/nouveau_drm.c2
-rw-r--r--drm/nouveau_drm.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c
index 0f67e194..eeadcac8 100644
--- a/drm/nouveau_drm.c
+++ b/drm/nouveau_drm.c
@@ -33,6 +33,7 @@
#include <core/client.h>
#include <core/gpuobj.h>
#include <core/class.h>
+#include <core/option.h>
#include <engine/device.h>
#include <engine/disp.h>
@@ -335,6 +336,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
dev->dev_private = drm;
drm->dev = dev;
+ nouveau_client(drm)->debug = nouveau_dbgopt(nouveau_debug, "DRM");
INIT_LIST_HEAD(&drm->clients);
spin_lock_init(&drm->tile.lock);
diff --git a/drm/nouveau_drm.h b/drm/nouveau_drm.h
index 23ca7a51..7efbafaf 100644
--- a/drm/nouveau_drm.h
+++ b/drm/nouveau_drm.h
@@ -161,10 +161,7 @@ int nouveau_pmops_resume(struct device *);
#define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args)
#define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args)
#define NV_INFO(cli, fmt, args...) nv_info((cli), fmt, ##args)
-#define NV_DEBUG(cli, fmt, args...) do { \
- if (drm_debug & DRM_UT_DRIVER) \
- nv_info((cli), fmt, ##args); \
-} while (0)
+#define NV_DEBUG(cli, fmt, args...) nv_debug((cli), fmt, ##args)
extern int nouveau_modeset;