From: Cruise <[email protected]>

The DP tunnel AUX reply is received through Outbox1. Print the Outbox1
status if an issue occurs.

Signed-off-by: Cruise <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Reviewed-by: Wayne Lin <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c       | 3 +++
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h        | 3 +++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c  | 4 ++++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c  | 4 ++++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c  | 4 ++++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c | 4 ++++
 6 files changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c 
b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
index fb3391854eed..41270fade5f2 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/display/dmub/dmub_srv.h 
b/drivers/gpu/drm/amd/display/dmub/dmub_srv.h
index 6589bb9aea6b..cd70453aeae0 100644
--- a/drivers/gpu/drm/amd/display/dmub/dmub_srv.h
+++ b/drivers/gpu/drm/amd/display/dmub/dmub_srv.h
@@ -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;
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
index 662c34e9495c..d9f31b191c69 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
@@ -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;
 
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
index e1da270502cc..9600b7f858b0 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
@@ -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;
 
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c
index 916ed022e96b..746696b6f09a 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c
@@ -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;
 
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c
index cf139e9cc20e..39a8cb6d7523 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c
@@ -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;
 
-- 
2.43.0

Reply via email to