All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: Add DRM_DEBUG_GEM
@ 2015-07-28 13:27 Chris Wilson
  2015-07-28 13:27 ` [PATCH 2/2] drm/i915: Soften error messages in i915_gem_object_create_from_data() Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2015-07-28 13:27 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Add a new debug value to distinguish and filter upon debug messages
emanating from GEM support code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 include/drm/drmP.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index f2d68d185274..e7b58e37c583 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -107,6 +107,11 @@ struct dma_buf_attachment;
  * ATOMIC: used in the atomic code.
  *	  This is the category used by the DRM_DEBUG_ATOMIC() macro.
  *
+ * GEM: used by portions of code backing the GEM interface, both in the
+ *      core (e.g. drm_gem.c) and vendor specific code.
+ *	This is the category used by the DRM_DEBUG_GEM() macro.
+ *
+ *
  * Enabling verbose debug messages is done through the drm.debug parameter,
  * each category being enabled by a bit.
  *
@@ -114,17 +119,18 @@ struct dma_buf_attachment;
  * drm.debug=0x2 will enable DRIVER messages
  * drm.debug=0x3 will enable CORE and DRIVER messages
  * ...
- * drm.debug=0xf will enable all messages
+ * drm.debug=0xff will enable all messages
  *
  * An interesting feature is that it's possible to enable verbose logging at
  * run-time by echoing the debug value in its sysfs node:
- *   # echo 0xf > /sys/module/drm/parameters/debug
+ *   # echo 0xff > /sys/module/drm/parameters/debug
  */
 #define DRM_UT_CORE 		0x01
 #define DRM_UT_DRIVER		0x02
 #define DRM_UT_KMS		0x04
 #define DRM_UT_PRIME		0x08
 #define DRM_UT_ATOMIC		0x10
+#define DRM_UT_GEM		0x20
 
 extern __printf(2, 3)
 void drm_ut_debug_printk(const char *function_name,
@@ -254,6 +260,11 @@ void drm_err(const char *format, ...);
 		if (unlikely(drm_debug & DRM_UT_ATOMIC))		\
 			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
+#define DRM_DEBUG_GEM(fmt, args...)					\
+	do {								\
+		if (unlikely(drm_debug & DRM_UT_GEM))			\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
+	} while (0)
 
 /*@}*/
 
-- 
2.4.6

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-28 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 13:27 [PATCH 1/2] drm: Add DRM_DEBUG_GEM Chris Wilson
2015-07-28 13:27 ` [PATCH 2/2] drm/i915: Soften error messages in i915_gem_object_create_from_data() Chris Wilson
2015-07-28 16:29   ` Dave Gordon
2015-07-28 16:34     ` Chris Wilson
2015-07-28 17:09       ` Dave Gordon
2015-07-28 17:18         ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.