mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
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:
parent
afbccdf8f9
commit
b5eacfc469
1 changed files with 5 additions and 4 deletions
|
|
@ -40,6 +40,7 @@
|
||||||
#include <xf86drm.h>
|
#include <xf86drm.h>
|
||||||
|
|
||||||
#include "util/list.h"
|
#include "util/list.h"
|
||||||
|
#include "util/log.h"
|
||||||
#include "util/macros.h"
|
#include "util/macros.h"
|
||||||
#include "util/simple_mtx.h"
|
#include "util/simple_mtx.h"
|
||||||
#include "util/timespec.h"
|
#include "util/timespec.h"
|
||||||
|
|
@ -192,17 +193,17 @@ struct etna_perfmon_signal
|
||||||
extern int etna_mesa_debug;
|
extern int etna_mesa_debug;
|
||||||
|
|
||||||
#define INFO_MSG(fmt, ...) \
|
#define INFO_MSG(fmt, ...) \
|
||||||
do { debug_printf("[I] "fmt " (%s:%d)\n", \
|
do { mesa_logi(fmt " (%s:%d)", \
|
||||||
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
||||||
#define DEBUG_MSG(fmt, ...) \
|
#define DEBUG_MSG(fmt, ...) \
|
||||||
do if (etna_mesa_debug & ETNA_DRM_MSGS) { \
|
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)
|
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
||||||
#define WARN_MSG(fmt, ...) \
|
#define WARN_MSG(fmt, ...) \
|
||||||
do { debug_printf("[W] "fmt " (%s:%d)\n", \
|
do { mesa_logw(fmt " (%s:%d)", \
|
||||||
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
||||||
#define ERROR_MSG(fmt, ...) \
|
#define ERROR_MSG(fmt, ...) \
|
||||||
do { debug_printf("[E] " fmt " (%s:%d)\n", \
|
do { mesa_loge(fmt " (%s:%d)", \
|
||||||
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
##__VA_ARGS__, __FUNCTION__, __LINE__); } while (0)
|
||||||
|
|
||||||
#define DEBUG_BO(msg, bo) \
|
#define DEBUG_BO(msg, bo) \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue