Mesa (main): etnaviv/drm: Use mesa_log* for debugging

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 22 08:42:53 UTC 2021


Module: Mesa
Branch: main
Commit: b5eacfc469832c93b51ae930782c59d656453774
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5eacfc469832c93b51ae930782c59d656453774

Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Dec 15 14:43:05 2021 +0100

etnaviv/drm: Use mesa_log* for debugging

This makes sure errors, warnings and info messages don't get
compiled out in non debug builds.

Signed-off-by: Guido Günther <agx at sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Acked-by: Lucas Stach <l.stach at pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

---

 src/etnaviv/drm/etnaviv_priv.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h
index e4666aee181..d2f88f78059 100644
--- a/src/etnaviv/drm/etnaviv_priv.h
+++ b/src/etnaviv/drm/etnaviv_priv.h
@@ -40,6 +40,7 @@
 #include <xf86drm.h>
 
 #include "util/list.h"
+#include "util/log.h"
 #include "util/macros.h"
 #include "util/simple_mtx.h"
 #include "util/timespec.h"
@@ -192,17 +193,17 @@ struct etna_perfmon_signal
 extern int etna_mesa_debug;
 
 #define INFO_MSG(fmt, ...) \
-		do { debug_printf("[I] "fmt " (%s:%d)\n", \
+		do { mesa_logi(fmt " (%s:%d)", \
 				##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
 #define DEBUG_MSG(fmt, ...) \
 		do if (etna_mesa_debug & ETNA_DRM_MSGS) { \
-		     debug_printf("[D] "fmt " (%s:%d)\n", \
+		     mesa_logd(fmt " (%s:%d)", \
 				##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
 #define WARN_MSG(fmt, ...) \
-		do { debug_printf("[W] "fmt " (%s:%d)\n", \
+		do { mesa_logw(fmt " (%s:%d)", \
 				##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
 #define ERROR_MSG(fmt, ...) \
-		do { debug_printf("[E] " fmt " (%s:%d)\n", \
+		do { mesa_loge(fmt " (%s:%d)", \
 				##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
 
 #define DEBUG_BO(msg, bo)						\



More information about the mesa-commit mailing list