]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/display: Add link index in AUX and dpms
authorCruise Hung <Cruise.Hung@amd.com>
Fri, 22 Aug 2025 07:45:03 +0000 (15:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Sep 2025 21:38:40 +0000 (17:38 -0400)
[Why & How]
Add the link index in DP AUX transfer and DPMS functions.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Cruise Hung <Cruise.Hung@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
drivers/gpu/drm/amd/display/dc/link/link_detection.c
drivers/gpu/drm/amd/display/dc/link/link_dpms.c

index bb4ac5042c803a492e04d0d83f93dc8989aa3fa3..673bb87d2c17217f1df93c97dc8ef0a0559a6bff 100644 (file)
@@ -725,14 +725,18 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
        for (i = 0; i < AUX_MAX_RETRIES; i++) {
                DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
                                        LOG_FLAG_I2cAux_DceAux,
-                                       "dce_aux_transfer_with_retries: link_index=%u: START: retry %d of %d: address=0x%04x length=%u write=%d mot=%d",
+                                       "dce_aux_transfer_with_retries: link_index=%u: START: retry %d of %d: "
+                                       "address=0x%04x length=%u write=%d mot=%d is_i2c=%d is_dpia=%d ddc_hw_inst=%d",
                                        ddc && ddc->link ? ddc->link->link_index : UINT_MAX,
                                        i + 1,
                                        (int)AUX_MAX_RETRIES,
                                        payload->address,
                                        payload->length,
                                        (unsigned int) payload->write,
-                                       (unsigned int) payload->mot);
+                                       (unsigned int) payload->mot,
+                                       payload->i2c_over_aux,
+                                       (ddc->link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) ? true : false,
+                                       ddc->link->ddc_hw_inst);
                if (payload->write)
                        dce_aux_log_payload("  write", payload->data, payload->length, 16);
 
@@ -746,7 +750,9 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
 
                DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
                                        LOG_FLAG_I2cAux_DceAux,
-                                       "dce_aux_transfer_with_retries: link_index=%u: END: retry %d of %d: address=0x%04x length=%u write=%d mot=%d: ret=%d operation_result=%d payload->reply=%u",
+                                       "dce_aux_transfer_with_retries: link_index=%u: END: retry %d of %d: "
+                                       "address=0x%04x length=%u write=%d mot=%d: ret=%d operation_result=%d "
+                                       "payload->reply=%u  is_i2c=%d is_dpia=%d ddc_hw_inst=%d",
                                        ddc && ddc->link ? ddc->link->link_index : UINT_MAX,
                                        i + 1,
                                        (int)AUX_MAX_RETRIES,
@@ -756,7 +762,10 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
                                        (unsigned int) payload->mot,
                                        ret,
                                        (int)operation_result,
-                                       (unsigned int) *payload->reply);
+                                       (unsigned int) *payload->reply,
+                                       payload->i2c_over_aux,
+                                       (ddc->link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) ? true : false,
+                                       ddc->link->ddc_hw_inst);
                if (!payload->write)
                        dce_aux_log_payload("  read", payload->data, ret > 0 ? ret : 0, 16);
 
index 827b630daf49a4002dcd6a5748315c0271df9d07..b717e430051a0c83a465c6a15e03e45e65792c75 100644 (file)
@@ -656,7 +656,7 @@ static bool wait_for_entering_dp_alt_mode(struct dc_link *link)
                return true;
 
        is_in_alt_mode = link->link_enc->funcs->is_in_alt_mode(link->link_enc);
-       DC_LOG_DC("DP Alt mode state on HPD: %d\n", is_in_alt_mode);
+       DC_LOG_DC("DP Alt mode state on HPD: %d  Link=%d\n", is_in_alt_mode, link->link_index);
 
        if (is_in_alt_mode)
                return true;
index cb80b4599936001cd6a7f8c681889bf160c3ea5c..08ee8d2f777b6c67401f6b1196293494fef58287 100644 (file)
@@ -2358,9 +2358,9 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
        if (pipe_ctx->stream->sink) {
                if (pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_VIRTUAL &&
                        pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_NONE) {
-                       DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x\n", __func__,
+                       DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x link=%d\n", __func__,
                        pipe_ctx->stream->sink->edid_caps.display_name,
-                       pipe_ctx->stream->signal);
+                       pipe_ctx->stream->signal, link->link_index);
                }
        }
 
@@ -2473,9 +2473,10 @@ void link_set_dpms_on(
        if (pipe_ctx->stream->sink) {
                if (pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_VIRTUAL &&
                        pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_NONE) {
-                       DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x\n", __func__,
+                       DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x link=%d\n", __func__,
                        pipe_ctx->stream->sink->edid_caps.display_name,
-                       pipe_ctx->stream->signal);
+                       pipe_ctx->stream->signal,
+                       link->link_index);
                }
        }