drm/amd/display: Use MACROS instead of dm_logger
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Fri, 23 Feb 2018 19:32:53 +0000 (14:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Mar 2018 20:08:45 +0000 (15:08 -0500)
Use DC_LOGGER macro for logs.

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_debug.c
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
drivers/gpu/drm/amd/display/dc/dml/dml_logger.h

index c15565092ca8ab0023b92344e25845ec2755c45e..f82275eb81bcafdea147ea22593ed0cd11d468e6 100644 (file)
 #include "hw_sequencer.h"
 
 #include "resource.h"
+#define DC_LOGGER \
+       logger
 
 #define SURFACE_TRACE(...) do {\
                if (dc->debug.surface_trace) \
-                       dm_logger_write(logger, \
-                                       LOG_IF_TRACE, \
-                                       ##__VA_ARGS__); \
+                       DC_LOG_IF_TRACE(__VA_ARGS__); \
 } while (0)
 
 #define TIMING_TRACE(...) do {\
        if (dc->debug.timing_trace) \
-               dm_logger_write(logger, \
-                               LOG_SYNC, \
-                               ##__VA_ARGS__); \
+               DC_LOG_SYNC(__VA_ARGS__); \
 } while (0)
 
 #define CLOCK_TRACE(...) do {\
        if (dc->debug.clock_trace) \
-               dm_logger_write(logger, \
-                               LOG_BANDWIDTH_CALCS, \
-                               ##__VA_ARGS__); \
+               DC_LOG_BANDWIDTH_CALCS(__VA_ARGS__); \
 } while (0)
 
 void pre_surface_trace(
index 81776e4797ed8770fe63d58925fad264fec1e965..8167cad7bcf742b445012ba1a846f9b3ad966910 100644 (file)
@@ -767,8 +767,7 @@ void dce110_link_encoder_construct(
                                bp_cap_info.DP_HBR3_EN;
                enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN;
        } else {
-               dm_logger_write(enc110->base.ctx->logger, LOG_WARNING,
-                               "%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
+               DC_LOG_WARNING("%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
                                __func__,
                                result);
        }
index 7c22f3d75cd4ed368cd5172f4a2df55d24c67833..465859b77248e3d764d5fe05e6b05fb0549b7afc 100644 (file)
 #ifndef __DML_LOGGER_H_
 #define __DML_LOGGER_H_
 
-#define dml_print(str, ...) {dm_logger_write(mode_lib->logger, LOG_DML, str, ##__VA_ARGS__); }
-#define DTRACE(str, ...) {dm_logger_write(mode_lib->logger, LOG_DML, str, ##__VA_ARGS__); }
+#define DC_LOGGER \
+       mode_lib->logger
+
+#define dml_print(str, ...) {DC_LOG_DML(str, ##__VA_ARGS__); }
+#define DTRACE(str, ...) {DC_LOG_DML(str, ##__VA_ARGS__); }
 
 #endif