From: Zhao Yakui <yakui.z...@intel.com>

Add the explanation about DRM debug level in the drmP header file. This is to
explain how/where to use the different DRM debug level.

Signed-off-by: Zhao Yakui <yakui.z...@intel.com>
---
 include/drm/drmP.h |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 45b67d9..05e9c8f 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -89,6 +89,46 @@ struct drm_device;
 #define DRM_UT_DRIVER          0x02
 #define DRM_UT_KMS             0x04
 #define DRM_UT_MODE            0x08
+/*
+ * Four debug levels are defined.
+ * drm_core, drm_driver, drm_kms, drm_mode
+ * drm_core level can be used in the generic drm code. For example:
+ *     drm_ioctl, drm_mm, drm_memory
+ * The macro definiton of DRM_DEBUG is used.
+ *     DRM_DEBUG(fmt, args...)
+ *     The debug info by using the DRM_DEBUG can be obtained by adding
+ *     the boot option of "drm.debug=1".
+ *
+ * drm_driver level can be used in the specific drm driver. It is used
+ * to add the debug info related with the drm driver. For example:
+ *     i915_drv, i915_dma, i915_gem, radeon_gem,
+ *     The macro definition of DRM_DEBUG_DRIVER can be used.
+ *     DRM_DEBUG_DRIVER(prefix, fmt, args...) , the prefix is a string and
+ *     the different prefix can be used in the different file
+ *     The debug info by using the DRM_DEBUG_DRIVER can be obtained by
+ *     adding the boot option of "drm.debug=0x02"
+ *
+ * drm_kms level can be used in the KMS code related with specific drm driver.
+ * It is used to add the debug info related with KMS mode. For example:
+ * the connector/crtc
+ *     the marco definition of DRM_DEBUG_KMS can be used
+ *     DRM_DEBUG_KMS(prefix, fmt, args...) , the prefix is a string and
+ *     the different prefix can be used in the different file.
+ *     The debug info by using the DRM_DEBUG_KMS can be obtained by
+ *     adding the boot option of "drm.debug=0x04"
+ *
+ * drm_mode level can be used to add the debug info related with generic DRM
+ * mode. For example:
+ *     drm_modes.c, drm_crtc_helper.c
+ *     The macro definition of DRM_DEBUG_MODE can be used.
+ *     DRM_DEBUG_MODE(prefix, fmt, args...) , the prefix is a string and
+ *     the different prefix can be used in the different file.
+ *     The debug info by using the DRM_DEBUG_MODE can be obtained by
+ *     adding the boot option of "drm.debug=0x08"
+ *
+ * If we add the boot option of "drm.debug=0x0c", we can get the debug info by
+ * using the DRM_DEBUG_KMS and DRM_DEBUG_MODE.
+ */
 
 extern void drm_ut_debug_printk(unsigned int request_level,
                                const char *prefix,
-- 
1.5.4.5


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to