drm: Add new LEASE debug level
authorKeith Packard <keithp@keithp.com>
Tue, 7 Nov 2017 16:28:37 +0000 (18:28 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:39:17 +0000 (15:39 -0500)
Separate out lease debugging from the core.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
drivers/gpu/drm/drm_drv.c
include/drm/drmP.h

index 80a903b..7284774 100644 (file)
@@ -54,7 +54,8 @@ MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug cat
 "\t\tBit 2 (0x04) will enable KMS messages (modesetting code)\n"
 "\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n"
 "\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n"
-"\t\tBit 5 (0x20) will enable VBL messages (vblank code)");
+"\t\tBit 5 (0x20) will enable VBL messages (vblank code)\n"
+"\t\tBit 7 (0x80) will enable LEASE messages (leasing code)");
 module_param_named(debug, drm_debug, int, 0600);
 
 static DEFINE_SPINLOCK(drm_minor_lock);
index 0c4f9c6..eda5dc8 100644 (file)
@@ -135,6 +135,7 @@ struct dma_buf_attachment;
 #define DRM_UT_PRIME           0x08
 #define DRM_UT_ATOMIC          0x10
 #define DRM_UT_VBL             0x20
+#define DRM_UT_LEASE           0x80
 
 extern __printf(6, 7)
 void drm_dev_printk(const struct device *dev, const char *level,
@@ -273,6 +274,9 @@ void drm_printk(const char *level, unsigned int category,
 #define DRM_DEBUG_VBL(fmt, ...)                                        \
        drm_printk(KERN_DEBUG, DRM_UT_VBL, fmt, ##__VA_ARGS__)
 
+#define DRM_DEBUG_LEASE(fmt, ...)                                      \
+       drm_printk(KERN_DEBUG, DRM_UT_LEASE, fmt, ##__VA_ARGS__)
+
 #define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, level, fmt, args...)    \
 ({                                                                     \
        static DEFINE_RATELIMIT_STATE(_rs,                              \