drm/amd/display: Enable PSR and Replay on DCN4 variant and fix AUX instance

[Why]
Enable PSR and Panel Replay on a DCN4 variant for display power
savings. On links without native I2C (no DDC pin), the AUX channel
must use aux_hw_inst to avoid NULL pointer access during PSR and
Replay setup.

[How]
Enable PSR and Replay in the DCN4 variant panel config defaults.
Add no_ddc_pin check in dp_setup_panel_replay(),
edp_setup_freesync_replay(), and fsft_send_msg_to_fw() to use
link->aux_hw_inst when dp_connector_no_native_i2c and no_ddc_pin
are set.

Reviewed-by: Matthew Stewart <matthew.stewart2@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Signed-off-by: George Zhang <george.zhang@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Gabe Teeger
2026-06-05 16:21:29 -04:00
committed by Alex Deucher
parent 98c692c5c4
commit 68737239e8
2 changed files with 13 additions and 4 deletions

View File

@@ -119,7 +119,11 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s
if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
replay_context.aux_inst = link->ddc->ddc_pin->hw_info.ddc_channel;
if (dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
replay_context.aux_inst = (enum channel_id) link->aux_hw_inst;
} else {
replay_context.aux_inst = link->ddc->ddc_pin->hw_info.ddc_channel;
}
replay_context.digbe_inst = link->link_enc->transmitter;
replay_context.digfe_inst = link->link_enc->preferred_engine;

View File

@@ -788,10 +788,11 @@ bool edp_setup_psr(struct dc_link *link,
}
}
if (dc->config.dp_connector_no_native_i2c && link->no_ddc_pin)
if (dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
psr_context->channel = (enum channel_id)link->aux_hw_inst;
else
} else {
psr_context->channel = link->ddc->ddc_pin->hw_info.ddc_channel;
}
psr_context->transmitterId = link->link_enc->transmitter;
psr_context->engineId = link->link_enc->preferred_engine;
@@ -1024,7 +1025,11 @@ bool edp_setup_freesync_replay(struct dc_link *link, const struct dc_stream_stat
if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
replay_context.aux_inst = link->ddc->ddc_pin->hw_info.ddc_channel;
if (dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
replay_context.aux_inst = (enum channel_id) link->aux_hw_inst;
} else {
replay_context.aux_inst = link->ddc->ddc_pin->hw_info.ddc_channel;
}
replay_context.digbe_inst = link->link_enc->transmitter;
replay_context.digfe_inst = link->link_enc->preferred_engine;