drm/nouveau/kms/nv50: control evo trace output with DRM_UT_KMS
authorBen Skeggs <bskeggs@redhat.com>
Fri, 4 Nov 2016 07:20:36 +0000 (17:20 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 7 Nov 2016 04:04:50 +0000 (14:04 +1000)
Will be useful in debugging the transition to atomic.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_display.c

index 1f4e1370ea7d088513b1cd3ef9833c4e1a36ed51..9a04ee5bd148a2801447a2a3af41328bc3dc85ed 100644 (file)
@@ -463,21 +463,19 @@ evo_kick(u32 *push, void *evoc)
        mutex_unlock(&dmac->lock);
 }
 
-#if 1
-#define evo_mthd(p,m,s) *((p)++) = (((s) << 18) | (m))
-#define evo_data(p,d)   *((p)++) = (d)
-#else
 #define evo_mthd(p,m,s) do {                                                   \
        const u32 _m = (m), _s = (s);                                          \
-       printk(KERN_ERR "%04x %d %s\n", _m, _s, __func__);                     \
+       if (drm_debug & DRM_UT_KMS)                                            \
+               printk(KERN_ERR "%04x %d %s\n", _m, _s, __func__);             \
        *((p)++) = ((_s << 18) | _m);                                          \
 } while(0)
+
 #define evo_data(p,d) do {                                                     \
        const u32 _d = (d);                                                    \
-       printk(KERN_ERR "\t%08x\n", _d);                                       \
+       if (drm_debug & DRM_UT_KMS)                                            \
+               printk(KERN_ERR "\t%08x\n", _d);                               \
        *((p)++) = _d;                                                         \
 } while(0)
-#endif
 
 static bool
 evo_sync_wait(void *data)