]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
drm/amd/display: define DC_LOGGER for logger
[linux.git] / drivers / gpu / drm / amd / display / dc / dce / dce_link_encoder.c
index e063a50a577121d0ad67551f9e7e43e60ff06ea3..f0d63ac7724afc34441c7222123eaa9516d6b603 100644 (file)
@@ -56,6 +56,8 @@
 
 #define CTX \
        enc110->base.ctx
+#define DC_LOGGER \
+       enc110->base.ctx->logger
 
 #define REG(reg)\
        (enc110->link_regs->reg)
@@ -809,7 +811,6 @@ void dce110_link_encoder_hw_init(
        struct link_encoder *enc)
 {
        struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
-       struct dc_context *ctx = enc110->base.ctx;
        struct bp_transmitter_control cntl = { 0 };
        enum bp_result result;
 
@@ -827,8 +828,7 @@ void dce110_link_encoder_hw_init(
        result = link_transmitter_control(enc110, &cntl);
 
        if (result != BP_RESULT_OK) {
-               DC_LOG_ERROR(ctx->logger,
-                       "%s: Failed to execute VBIOS command table!\n",
+               DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
                        __func__);
                BREAK_TO_DEBUGGER();
                return;
@@ -904,7 +904,6 @@ void dce110_link_encoder_enable_tmds_output(
        uint32_t pixel_clock)
 {
        struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
-       struct dc_context *ctx = enc110->base.ctx;
        struct bp_transmitter_control cntl = { 0 };
        enum bp_result result;
 
@@ -928,8 +927,7 @@ void dce110_link_encoder_enable_tmds_output(
        result = link_transmitter_control(enc110, &cntl);
 
        if (result != BP_RESULT_OK) {
-               DC_LOG_ERROR(ctx->logger,
-                       "%s: Failed to execute VBIOS command table!\n",
+               DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
                        __func__);
                BREAK_TO_DEBUGGER();
        }
@@ -942,7 +940,6 @@ void dce110_link_encoder_enable_dp_output(
        enum clock_source_id clock_source)
 {
        struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
-       struct dc_context *ctx = enc110->base.ctx;
        struct bp_transmitter_control cntl = { 0 };
        enum bp_result result;
 
@@ -969,8 +966,7 @@ void dce110_link_encoder_enable_dp_output(
        result = link_transmitter_control(enc110, &cntl);
 
        if (result != BP_RESULT_OK) {
-               DC_LOG_ERROR(ctx->logger,
-                       "%s: Failed to execute VBIOS command table!\n",
+               DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
                        __func__);
                BREAK_TO_DEBUGGER();
        }
@@ -983,7 +979,6 @@ void dce110_link_encoder_enable_dp_mst_output(
        enum clock_source_id clock_source)
 {
        struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
-       struct dc_context *ctx = enc110->base.ctx;
        struct bp_transmitter_control cntl = { 0 };
        enum bp_result result;
 
@@ -1010,8 +1005,7 @@ void dce110_link_encoder_enable_dp_mst_output(
        result = link_transmitter_control(enc110, &cntl);
 
        if (result != BP_RESULT_OK) {
-               DC_LOG_ERROR(ctx->logger,
-                       "%s: Failed to execute VBIOS command table!\n",
+               DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
                        __func__);
                BREAK_TO_DEBUGGER();
        }
@@ -1025,7 +1019,6 @@ void dce110_link_encoder_disable_output(
        enum signal_type signal)
 {
        struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
-       struct dc_context *ctx = enc110->base.ctx;
        struct bp_transmitter_control cntl = { 0 };
        enum bp_result result;
 
@@ -1053,8 +1046,7 @@ void dce110_link_encoder_disable_output(
        result = link_transmitter_control(enc110, &cntl);
 
        if (result != BP_RESULT_OK) {
-               DC_LOG_ERROR(ctx->logger,
-                       "%s: Failed to execute VBIOS command table!\n",
+               DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
                        __func__);
                BREAK_TO_DEBUGGER();
                return;