From b5eacfc469832c93b51ae930782c59d656453774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 15 Dec 2021 14:43:05 +0100 Subject: [PATCH] etnaviv/drm: Use mesa_log* for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes sure errors, warnings and info messages don't get compiled out in non debug builds. Signed-off-by: Guido Günther Reviewed-by: Christian Gmeiner Acked-by: Lucas Stach Part-of: --- 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 #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) \