]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Add stay count and bstatus to HDCP log
authorIsabel Zhang <isabel.zhang@amd.com>
Fri, 21 Feb 2020 23:01:59 +0000 (18:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Mar 2020 17:48:59 +0000 (13:48 -0400)
[Why]
So the values of stay count and bstatus can be easily viewed during
debugging.

[How]
Add stay count and bstatus values to be outputted in HDCP log

Signed-off-by: Isabel Zhang <isabel.zhang@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h

index 6e844825ad23d0d0e8ffabaf62c1740fa97b23fa..d3192b9d0c3d8fb209a938bc1e0c795f8e13d944 100644 (file)
 /* default logs */
 #define HDCP_ERROR_TRACE(hdcp, status) \
                HDCP_LOG_ERR(hdcp, \
-                       "[Link %d] WARNING %s IN STATE %s", \
+                       "[Link %d] WARNING %s IN STATE %s STAY COUNT %d", \
                        hdcp->config.index, \
                        mod_hdcp_status_to_str(status), \
-                       mod_hdcp_state_id_to_str(hdcp->state.id))
+                       mod_hdcp_state_id_to_str(hdcp->state.id), \
+                       hdcp->state.stay_count)
 #define HDCP_HDCP1_ENABLED_TRACE(hdcp, displayIndex) \
                HDCP_LOG_VER(hdcp, \
                        "[Link %d] HDCP 1.4 enabled on display %d", \
                                sizeof(hdcp->auth.msg.hdcp1.bksv)); \
                HDCP_DDC_READ_TRACE(hdcp, "BCAPS", &hdcp->auth.msg.hdcp1.bcaps, \
                                sizeof(hdcp->auth.msg.hdcp1.bcaps)); \
+               HDCP_DDC_READ_TRACE(hdcp, "BSTATUS", \
+                               (uint8_t *)&hdcp->auth.msg.hdcp1.bstatus, \
+                               sizeof(hdcp->auth.msg.hdcp1.bstatus)); \
                HDCP_DDC_WRITE_TRACE(hdcp, "AN", hdcp->auth.msg.hdcp1.an, \
                                sizeof(hdcp->auth.msg.hdcp1.an)); \
                HDCP_DDC_WRITE_TRACE(hdcp, "AKSV", hdcp->auth.msg.hdcp1.aksv, \