diff options
author | Lespiau, Damien <damien.lespiau@intel.com> | 2014-03-24 11:53:08 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-03-27 22:56:59 -0400 |
commit | 1414b76c1e76fb32f4cf0df7ea54f129789e445f (patch) | |
tree | 6a12c66b2624a03bd67185d407b9c882b65a8e71 /include/drm | |
parent | 90bde571ad194adb039cb92a11a5b346f15eb610 (diff) |
drm: Refresh the explanation of debug categories
That comment wasn't super-readable, so I tried to improve it:
- Put the comment before the values it's documenting
- Add a mention to PRIME
- Reword things a bit to be a lighter read
- Add a note about the option to set the debug value at run-time
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index daac00a93126..47f956ea9d02 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -88,41 +88,38 @@ struct videomode; | |||
88 | #include <drm/drm_hashtab.h> | 88 | #include <drm/drm_hashtab.h> |
89 | #include <drm/drm_mm.h> | 89 | #include <drm/drm_mm.h> |
90 | 90 | ||
91 | #define DRM_UT_CORE 0x01 | ||
92 | #define DRM_UT_DRIVER 0x02 | ||
93 | #define DRM_UT_KMS 0x04 | ||
94 | #define DRM_UT_PRIME 0x08 | ||
95 | /* | 91 | /* |
96 | * Three debug levels are defined. | 92 | * 4 debug categories are defined: |
97 | * drm_core, drm_driver, drm_kms | 93 | * |
98 | * drm_core level can be used in the generic drm code. For example: | 94 | * CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, drm_memory.c, ... |
99 | * drm_ioctl, drm_mm, drm_memory | 95 | * This is the category used by the DRM_DEBUG() macro. |
100 | * The macro definition of DRM_DEBUG is used. | 96 | * |
101 | * DRM_DEBUG(fmt, args...) | 97 | * DRIVER: Used in the vendor specific part of the driver: i915, radeon, ... |
102 | * The debug info by using the DRM_DEBUG can be obtained by adding | 98 | * This is the category used by the DRM_DEBUG_DRIVER() macro. |
103 | * the boot option of "drm.debug=1". | ||
104 | * | 99 | * |
105 | * drm_driver level can be used in the specific drm driver. It is used | 100 | * KMS: used in the modesetting code. |
106 | * to add the debug info related with the drm driver. For example: | 101 | * This is the category used by the DRM_DEBUG_KMS() macro. |
107 | * i915_drv, i915_dma, i915_gem, radeon_drv, | ||
108 | * The macro definition of DRM_DEBUG_DRIVER can be used. | ||
109 | * DRM_DEBUG_DRIVER(fmt, args...) | ||
110 | * The debug info by using the DRM_DEBUG_DRIVER can be obtained by | ||
111 | * adding the boot option of "drm.debug=0x02" | ||
112 | * | 102 | * |
113 | * drm_kms level can be used in the KMS code related with specific drm driver. | 103 | * PRIME: used in the prime code. |
114 | * It is used to add the debug info related with KMS mode. For example: | 104 | * This is the category used by the DRM_DEBUG_PRIME() macro. |
115 | * the connector/crtc , | ||
116 | * The macro definition of DRM_DEBUG_KMS can be used. | ||
117 | * DRM_DEBUG_KMS(fmt, args...) | ||
118 | * The debug info by using the DRM_DEBUG_KMS can be obtained by | ||
119 | * adding the boot option of "drm.debug=0x04" | ||
120 | * | 105 | * |
121 | * If we add the boot option of "drm.debug=0x06", we can get the debug info by | 106 | * Enabling verbose debug messages is done through the drm.debug parameter, |
122 | * using the DRM_DEBUG_KMS and DRM_DEBUG_DRIVER. | 107 | * each category being enabled by a bit. |
123 | * If we add the boot option of "drm.debug=0x05", we can get the debug info by | 108 | * |
124 | * using the DRM_DEBUG_KMS and DRM_DEBUG. | 109 | * drm.debug=0x1 will enable CORE messages |
110 | * drm.debug=0x2 will enable DRIVER messages | ||
111 | * drm.debug=0x3 will enable CORE and DRIVER messages | ||
112 | * ... | ||
113 | * drm.debug=0xf will enable all messages | ||
114 | * | ||
115 | * An interesting feature is that it's possible to enable verbose logging at | ||
116 | * run-time by echoing the debug value in its sysfs node: | ||
117 | * # echo 0xf > /sys/module/drm/parameters/debug | ||
125 | */ | 118 | */ |
119 | #define DRM_UT_CORE 0x01 | ||
120 | #define DRM_UT_DRIVER 0x02 | ||
121 | #define DRM_UT_KMS 0x04 | ||
122 | #define DRM_UT_PRIME 0x08 | ||
126 | 123 | ||
127 | extern __printf(4, 5) | 124 | extern __printf(4, 5) |
128 | void drm_ut_debug_printk(unsigned int request_level, | 125 | void drm_ut_debug_printk(unsigned int request_level, |