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@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>
This commit is contained in:
Guido Günther 2021-12-15 14:43:05 +01:00 committed by Christian Gmeiner
parent afbccdf8f9
commit b5eacfc469
1 changed files with 5 additions and 4 deletions

View File

@ -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) \