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>
This commit is contained in:
committed by
Alex Deucher
parent
9fd2da71c3
commit
c2223b2686
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user