[RFC][PATCH] drm: Add DRM_DEBUG_DISPLAY macro for display configuration debug messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



KMS has a lot of code sequences where the driver has to select a certain HW
configuration among the available ones. For e.g., link rate, clock,
voltage swing, training pattern etc. Printing such low-level messages is
valuable for debugging display problems. But, will bloat dmesg if printed
with DRM_DEBUG_KMS.

DRM_DEBUG_DISPLAY will specifically address such cases where the developer
wants communicate why a display related configuration choice was made.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 include/drm/drmP.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index d377865..c831c69 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -114,6 +114,9 @@ struct dma_buf_attachment;
  * VBL: used for verbose debug message in the vblank code
  *	  This is the category used by the DRM_DEBUG_VBL() macro.
  *
+ * DISPLAY: used for low-level display configuration messages.
+ *	    This is the category used by the DRM_DEBUG_DISPLAY() macro.
+ *
  * Enabling verbose debug messages is done through the drm.debug parameter,
  * each category being enabled by a bit.
  *
@@ -133,6 +136,7 @@ struct dma_buf_attachment;
 #define DRM_UT_PRIME		0x08
 #define DRM_UT_ATOMIC		0x10
 #define DRM_UT_VBL		0x20
+#define DRM_UT_DISPLAY		0x40
 
 extern __printf(2, 3)
 void drm_ut_debug_printk(const char *function_name,
@@ -230,6 +234,11 @@ void drm_err(const char *format, ...);
 		if (unlikely(drm_debug & DRM_UT_VBL))			\
 			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
+#define DRM_DEBUG_DISPLAY(fmt, args...)					\
+	do {								\
+		if (unlikely(drm_debug & DRM_UT_DISPLAY))		\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
+	} while (0)
 
 /*@}*/
 
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux