drm/amd/display: Add logs for debugging outbox
authorCruise <Cruise.Hung@amd.com>
Thu, 18 Jul 2024 04:55:02 +0000 (12:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 27 Jul 2024 21:35:33 +0000 (17:35 -0400)
The DP tunnel AUX reply is received through Outbox1. Print the Outbox1
status if an issue occurs.

Signed-off-by: Cruise <Cruise.Hung@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
drivers/gpu/drm/amd/display/dmub/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c

index fb33918..41270fa 100644 (file)
@@ -979,6 +979,9 @@ void dc_dmub_srv_log_diagnostic_data(struct dc_dmub_srv *dc_dmub_srv)
        DC_LOG_DEBUG("    inbox0_rptr        : %08x", diag_data.inbox0_rptr);
        DC_LOG_DEBUG("    inbox0_wptr        : %08x", diag_data.inbox0_wptr);
        DC_LOG_DEBUG("    inbox0_size        : %08x", diag_data.inbox0_size);
+       DC_LOG_DEBUG("    outbox1_rptr       : %08x", diag_data.outbox1_rptr);
+       DC_LOG_DEBUG("    outbox1_wptr       : %08x", diag_data.outbox1_wptr);
+       DC_LOG_DEBUG("    outbox1_size       : %08x", diag_data.outbox1_size);
        DC_LOG_DEBUG("    is_enabled         : %d", diag_data.is_dmcub_enabled);
        DC_LOG_DEBUG("    is_soft_reset      : %d", diag_data.is_dmcub_soft_reset);
        DC_LOG_DEBUG("    is_secure_reset    : %d", diag_data.is_dmcub_secure_reset);
index 6589bb9..cd70453 100644 (file)
@@ -330,6 +330,9 @@ struct dmub_diagnostic_data {
        uint32_t inbox0_rptr;
        uint32_t inbox0_wptr;
        uint32_t inbox0_size;
+       uint32_t outbox1_rptr;
+       uint32_t outbox1_wptr;
+       uint32_t outbox1_size;
        uint32_t gpint_datain0;
        struct dmub_srv_debug timeout_info;
        uint8_t is_dmcub_enabled : 1;
index 662c34e..d9f31b1 100644 (file)
@@ -449,6 +449,10 @@ void dmub_dcn31_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnosti
        diag_data->inbox0_wptr = REG_READ(DMCUB_INBOX0_WPTR);
        diag_data->inbox0_size = REG_READ(DMCUB_INBOX0_SIZE);
 
+       diag_data->outbox1_rptr = REG_READ(DMCUB_OUTBOX1_RPTR);
+       diag_data->outbox1_wptr = REG_READ(DMCUB_OUTBOX1_WPTR);
+       diag_data->outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
+
        REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
        diag_data->is_dmcub_enabled = is_dmub_enabled;
 
index e1da270..9600b7f 100644 (file)
@@ -459,6 +459,10 @@ void dmub_dcn32_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnosti
        diag_data->inbox0_wptr = REG_READ(DMCUB_INBOX0_WPTR);
        diag_data->inbox0_size = REG_READ(DMCUB_INBOX0_SIZE);
 
+       diag_data->outbox1_rptr = REG_READ(DMCUB_OUTBOX1_RPTR);
+       diag_data->outbox1_wptr = REG_READ(DMCUB_OUTBOX1_WPTR);
+       diag_data->outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
+
        REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
        diag_data->is_dmcub_enabled = is_dmub_enabled;
 
index 916ed02..746696b 100644 (file)
@@ -502,6 +502,10 @@ void dmub_dcn35_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnosti
        diag_data->inbox0_wptr = REG_READ(DMCUB_INBOX0_WPTR);
        diag_data->inbox0_size = REG_READ(DMCUB_INBOX0_SIZE);
 
+       diag_data->outbox1_rptr = REG_READ(DMCUB_OUTBOX1_RPTR);
+       diag_data->outbox1_wptr = REG_READ(DMCUB_OUTBOX1_WPTR);
+       diag_data->outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
+
        REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
        diag_data->is_dmcub_enabled = is_dmub_enabled;
 
index cf139e9..39a8cb6 100644 (file)
@@ -444,6 +444,10 @@ void dmub_dcn401_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnost
        diag_data->inbox0_wptr = REG_READ(DMCUB_INBOX0_WPTR);
        diag_data->inbox0_size = REG_READ(DMCUB_INBOX0_SIZE);
 
+       diag_data->outbox1_rptr = REG_READ(DMCUB_OUTBOX1_RPTR);
+       diag_data->outbox1_wptr = REG_READ(DMCUB_OUTBOX1_WPTR);
+       diag_data->outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
+
        REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
        diag_data->is_dmcub_enabled = is_dmub_enabled;