Skip to content

Commit c2223b2

Browse files
Cruise Hungalexdeucher
authored andcommitted
drm/amd/display: Add link index in AUX and dpms
[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>
1 parent 9fd2da7 commit c2223b2

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

drivers/gpu/drm/amd/display/dc/dce/dce_aux.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,18 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
725725
for (i = 0; i < AUX_MAX_RETRIES; i++) {
726726
DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
727727
LOG_FLAG_I2cAux_DceAux,
728-
"dce_aux_transfer_with_retries: link_index=%u: START: retry %d of %d: address=0x%04x length=%u write=%d mot=%d",
728+
"dce_aux_transfer_with_retries: link_index=%u: START: retry %d of %d: "
729+
"address=0x%04x length=%u write=%d mot=%d is_i2c=%d is_dpia=%d ddc_hw_inst=%d",
729730
ddc && ddc->link ? ddc->link->link_index : UINT_MAX,
730731
i + 1,
731732
(int)AUX_MAX_RETRIES,
732733
payload->address,
733734
payload->length,
734735
(unsigned int) payload->write,
735-
(unsigned int) payload->mot);
736+
(unsigned int) payload->mot,
737+
payload->i2c_over_aux,
738+
(ddc->link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) ? true : false,
739+
ddc->link->ddc_hw_inst);
736740
if (payload->write)
737741
dce_aux_log_payload(" write", payload->data, payload->length, 16);
738742

@@ -746,7 +750,9 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
746750

747751
DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
748752
LOG_FLAG_I2cAux_DceAux,
749-
"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",
753+
"dce_aux_transfer_with_retries: link_index=%u: END: retry %d of %d: "
754+
"address=0x%04x length=%u write=%d mot=%d: ret=%d operation_result=%d "
755+
"payload->reply=%u is_i2c=%d is_dpia=%d ddc_hw_inst=%d",
750756
ddc && ddc->link ? ddc->link->link_index : UINT_MAX,
751757
i + 1,
752758
(int)AUX_MAX_RETRIES,
@@ -756,7 +762,10 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
756762
(unsigned int) payload->mot,
757763
ret,
758764
(int)operation_result,
759-
(unsigned int) *payload->reply);
765+
(unsigned int) *payload->reply,
766+
payload->i2c_over_aux,
767+
(ddc->link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) ? true : false,
768+
ddc->link->ddc_hw_inst);
760769
if (!payload->write)
761770
dce_aux_log_payload(" read", payload->data, ret > 0 ? ret : 0, 16);
762771

drivers/gpu/drm/amd/display/dc/link/link_detection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ static bool wait_for_entering_dp_alt_mode(struct dc_link *link)
656656
return true;
657657

658658
is_in_alt_mode = link->link_enc->funcs->is_in_alt_mode(link->link_enc);
659-
DC_LOG_DC("DP Alt mode state on HPD: %d\n", is_in_alt_mode);
659+
DC_LOG_DC("DP Alt mode state on HPD: %d Link=%d\n", is_in_alt_mode, link->link_index);
660660

661661
if (is_in_alt_mode)
662662
return true;

drivers/gpu/drm/amd/display/dc/link/link_dpms.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,9 +2358,9 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
23582358
if (pipe_ctx->stream->sink) {
23592359
if (pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_VIRTUAL &&
23602360
pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_NONE) {
2361-
DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x\n", __func__,
2361+
DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x link=%d\n", __func__,
23622362
pipe_ctx->stream->sink->edid_caps.display_name,
2363-
pipe_ctx->stream->signal);
2363+
pipe_ctx->stream->signal, link->link_index);
23642364
}
23652365
}
23662366

@@ -2473,9 +2473,10 @@ void link_set_dpms_on(
24732473
if (pipe_ctx->stream->sink) {
24742474
if (pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_VIRTUAL &&
24752475
pipe_ctx->stream->sink->sink_signal != SIGNAL_TYPE_NONE) {
2476-
DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x\n", __func__,
2476+
DC_LOG_DC("%s pipe_ctx dispname=%s signal=%x link=%d\n", __func__,
24772477
pipe_ctx->stream->sink->edid_caps.display_name,
2478-
pipe_ctx->stream->signal);
2478+
pipe_ctx->stream->signal,
2479+
link->link_index);
24792480
}
24802481
}
24812482

0 commit comments

Comments
 (0)