diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-22 06:24:16 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-23 05:19:49 -0500 |
commit | 17a38d9c254bf4e3b0d8b7ccd5c1988cb63730ff (patch) | |
tree | b1f985b6b75c86174e7c45e8e37c87fbfe32c385 /include/drm | |
parent | 7f50002fc602ba7870df554f91a76434c9404f5d (diff) |
drm: Add DRM_DEBUG_ATOMIC
Atomic state handling adds a lot of indirection and complexity between
simple updates and drivers. For easier debugging the diagnostic output
is therefore rather chatty. Which is great for tracking down atomic
issues, but really annoying otherwise.
Add a new DRM_DEBUG_ATOMIC to be able to filter this out.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index e928625a9da0..52999ba9fbaf 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -104,6 +104,9 @@ struct dma_buf_attachment; | |||
104 | * PRIME: used in the prime code. | 104 | * PRIME: used in the prime code. |
105 | * This is the category used by the DRM_DEBUG_PRIME() macro. | 105 | * This is the category used by the DRM_DEBUG_PRIME() macro. |
106 | * | 106 | * |
107 | * ATOMIC: used in the atomic code. | ||
108 | * This is the category used by the DRM_DEBUG_ATOMIC() macro. | ||
109 | * | ||
107 | * Enabling verbose debug messages is done through the drm.debug parameter, | 110 | * Enabling verbose debug messages is done through the drm.debug parameter, |
108 | * each category being enabled by a bit. | 111 | * each category being enabled by a bit. |
109 | * | 112 | * |
@@ -121,6 +124,7 @@ struct dma_buf_attachment; | |||
121 | #define DRM_UT_DRIVER 0x02 | 124 | #define DRM_UT_DRIVER 0x02 |
122 | #define DRM_UT_KMS 0x04 | 125 | #define DRM_UT_KMS 0x04 |
123 | #define DRM_UT_PRIME 0x08 | 126 | #define DRM_UT_PRIME 0x08 |
127 | #define DRM_UT_ATOMIC 0x10 | ||
124 | 128 | ||
125 | extern __printf(2, 3) | 129 | extern __printf(2, 3) |
126 | void drm_ut_debug_printk(const char *function_name, | 130 | void drm_ut_debug_printk(const char *function_name, |
@@ -207,6 +211,11 @@ void drm_err(const char *format, ...); | |||
207 | if (unlikely(drm_debug & DRM_UT_PRIME)) \ | 211 | if (unlikely(drm_debug & DRM_UT_PRIME)) \ |
208 | drm_ut_debug_printk(__func__, fmt, ##args); \ | 212 | drm_ut_debug_printk(__func__, fmt, ##args); \ |
209 | } while (0) | 213 | } while (0) |
214 | #define DRM_DEBUG_ATOMIC(fmt, args...) \ | ||
215 | do { \ | ||
216 | if (unlikely(drm_debug & DRM_UT_ATOMIC)) \ | ||
217 | drm_ut_debug_printk(__func__, fmt, ##args); \ | ||
218 | } while (0) | ||
210 | 219 | ||
211 | /*@}*/ | 220 | /*@}*/ |
212 | 221 | ||