etnaviv: Use mesa_log*

Makes it consistent with the DRM bits

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
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 15:14:36 +01:00 committed by Christian Gmeiner
parent 01bb981d57
commit 7440fbd596
1 changed files with 14 additions and 14 deletions

View File

@ -25,7 +25,7 @@
#ifndef H_ETNA_DEBUG
#define H_ETNA_DEBUG
#include "util/u_debug.h"
#include "util/log.h"
#include <stdint.h>
#include <stdio.h>
@ -62,24 +62,24 @@ extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */
#define DBG_ENABLED(flag) unlikely(etna_mesa_debug & (flag))
#define DBG_F(flag, fmt, ...) \
do { \
if (etna_mesa_debug & (flag)) \
debug_printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, \
##__VA_ARGS__); \
#define DBG_F(flag, fmt, ...) \
do { \
if (etna_mesa_debug & (flag)) \
mesa_logd("%s:%d: " fmt, __FUNCTION__, __LINE__, \
##__VA_ARGS__); \
} while (0)
#define DBG(fmt, ...) \
do { \
if (etna_mesa_debug & ETNA_DBG_MSGS) \
debug_printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, \
##__VA_ARGS__); \
#define DBG(fmt, ...) \
do { \
if (etna_mesa_debug & ETNA_DBG_MSGS) \
mesa_logd("%s:%d: " fmt, __FUNCTION__, __LINE__, \
##__VA_ARGS__); \
} while (0)
/* A serious bug, show this even in non-debug mode */
#define BUG(fmt, ...) \
do { \
printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \
#define BUG(fmt, ...) \
do { \
mesa_loge("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while (0)
#endif