drm: msm: dp: update logging support

Modify the macros to use default kernel logging function if DRM log
levels are not explicitly set. This helps in being able to selectively
enable function or file level logs.

Change-Id: I4f894a2ecf314a3a5fc0bb22a75a0e10dae31e07
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Aravind Venkateswaran
2019-11-05 13:26:48 -08:00
gecommit door Tatenda Chipeperekwa
bovenliggende 47cc800aff
commit 69631c415c

Bestand weergeven

@@ -13,13 +13,33 @@
#include "dp_display.h" #include "dp_display.h"
#include "dp_pll.h" #include "dp_pll.h"
#define DP_WARN(fmt, ...) DRM_WARN("[msm-dp-warn] "fmt, ##__VA_ARGS__) #define DP_DEBUG(fmt, ...) \
#define DP_ERR(fmt, ...) DRM_DEV_ERROR(NULL, "[msm-dp-error]" fmt, \ do { \
##__VA_ARGS__) if (unlikely(drm_debug & DRM_UT_KMS)) \
#define DP_INFO(fmt, ...) DRM_DEV_INFO(NULL, "[msm-dp-info] "fmt, \ DRM_DEBUG("[msm-dp-debug][%-4d]"fmt, current->pid, \
##__VA_ARGS__) ##__VA_ARGS__); \
#define DP_DEBUG(fmt, ...) DRM_DEV_DEBUG_DP(NULL, "[msm-dp-debug] "fmt, \ else \
##__VA_ARGS__) pr_debug("[drm:%s][msm-dp-debug][%-4d]"fmt, __func__,\
current->pid, ##__VA_ARGS__); \
} while (0)
#define DP_INFO(fmt, ...) \
do { \
if (unlikely(drm_debug & DRM_UT_KMS)) \
DRM_INFO("[msm-dp-info][%-4d]"fmt, current->pid, \
##__VA_ARGS__); \
else \
pr_info("[drm:%s][msm-dp-info][%-4d]"fmt, __func__, \
current->pid, ##__VA_ARGS__); \
} while (0)
#define DP_WARN(fmt, ...) \
pr_warn("[drm:%s][msm-dp-warn][%-4d]"fmt, __func__, \
current->pid, ##__VA_ARGS__)
#define DP_ERR(fmt, ...) \
pr_err("[drm:%s][msm-dp-err][%-4d]"fmt, __func__, \
current->pid, ##__VA_ARGS__)
/** /**
* struct dp_debug * struct dp_debug