Commit a9fad21a authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Mauro Carvalho Chehab

[media] mtk-vcodec: Show mtk driver error without DEBUG definition

A driver error message is shown without DEBUG definition
to find an error and debug easily.
Signed-off-by: default avatarHirokazu Honda <hiroh@chromium.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ba1f1f70
...@@ -32,6 +32,15 @@ extern int mtk_v4l2_dbg_level; ...@@ -32,6 +32,15 @@ extern int mtk_v4l2_dbg_level;
extern bool mtk_vcodec_dbg; extern bool mtk_vcodec_dbg;
#define mtk_v4l2_err(fmt, args...) \
pr_err("[MTK_V4L2][ERROR] %s:%d: " fmt "\n", __func__, __LINE__, \
##args)
#define mtk_vcodec_err(h, fmt, args...) \
pr_err("[MTK_VCODEC][ERROR][%d]: %s() " fmt "\n", \
((struct mtk_vcodec_ctx *)h->ctx)->id, __func__, ##args)
#if defined(DEBUG) #if defined(DEBUG)
#define mtk_v4l2_debug(level, fmt, args...) \ #define mtk_v4l2_debug(level, fmt, args...) \
...@@ -41,11 +50,6 @@ extern bool mtk_vcodec_dbg; ...@@ -41,11 +50,6 @@ extern bool mtk_vcodec_dbg;
level, __func__, __LINE__, ##args); \ level, __func__, __LINE__, ##args); \
} while (0) } while (0)
#define mtk_v4l2_err(fmt, args...) \
pr_err("[MTK_V4L2][ERROR] %s:%d: " fmt "\n", __func__, __LINE__, \
##args)
#define mtk_v4l2_debug_enter() mtk_v4l2_debug(3, "+") #define mtk_v4l2_debug_enter() mtk_v4l2_debug(3, "+")
#define mtk_v4l2_debug_leave() mtk_v4l2_debug(3, "-") #define mtk_v4l2_debug_leave() mtk_v4l2_debug(3, "-")
...@@ -57,22 +61,16 @@ extern bool mtk_vcodec_dbg; ...@@ -57,22 +61,16 @@ extern bool mtk_vcodec_dbg;
__func__, ##args); \ __func__, ##args); \
} while (0) } while (0)
#define mtk_vcodec_err(h, fmt, args...) \
pr_err("[MTK_VCODEC][ERROR][%d]: %s() " fmt "\n", \
((struct mtk_vcodec_ctx *)h->ctx)->id, __func__, ##args)
#define mtk_vcodec_debug_enter(h) mtk_vcodec_debug(h, "+") #define mtk_vcodec_debug_enter(h) mtk_vcodec_debug(h, "+")
#define mtk_vcodec_debug_leave(h) mtk_vcodec_debug(h, "-") #define mtk_vcodec_debug_leave(h) mtk_vcodec_debug(h, "-")
#else #else
#define mtk_v4l2_debug(level, fmt, args...) {} #define mtk_v4l2_debug(level, fmt, args...) {}
#define mtk_v4l2_err(fmt, args...) {}
#define mtk_v4l2_debug_enter() {} #define mtk_v4l2_debug_enter() {}
#define mtk_v4l2_debug_leave() {} #define mtk_v4l2_debug_leave() {}
#define mtk_vcodec_debug(h, fmt, args...) {} #define mtk_vcodec_debug(h, fmt, args...) {}
#define mtk_vcodec_err(h, fmt, args...) {}
#define mtk_vcodec_debug_enter(h) {} #define mtk_vcodec_debug_enter(h) {}
#define mtk_vcodec_debug_leave(h) {} #define mtk_vcodec_debug_leave(h) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment