drm/amd/display: Handle aux_inst for connectors without DDC pin

[Why & How]
Must use an alternative codepath to access AUX channel when
link->no_ddc_pin is set.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Signed-off-by: Matthew Stewart <Matthew.Stewart2@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Gabe Teeger 2026-05-21 11:06:22 -04:00 committed by Alex Deucher
parent 6750a2316f
commit 7d44737067
2 changed files with 19 additions and 6 deletions

View File

@ -464,6 +464,7 @@ bool mod_power_notify_mode_change(struct mod_power *mod_power,
struct dc_link *link = NULL;
struct dc *dc = NULL;
unsigned int panel_inst = 0;
uint8_t aux_inst = 0;
if ((mod_power == NULL) || (stream == NULL))
return false;
@ -482,8 +483,12 @@ bool mod_power_notify_mode_change(struct mod_power *mod_power,
link = dc_stream_get_link(stream);
if (link != NULL && dc_get_edp_link_panel_inst(dc, link, &panel_inst)) {
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
uint8_t aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
aux_inst = (uint8_t)link->aux_hw_inst;
} else {
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
}
mod_power_update_backlight_on_mode_change(core_power, link, panel_inst, aux_inst, is_hdr);

View File

@ -849,8 +849,12 @@ bool mod_power_set_backlight_nits(struct mod_power *mod_power,
core_power = MOD_POWER_TO_CORE(mod_power);
link = dc_stream_get_link(stream);
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
aux_inst = (uint8_t)link->aux_hw_inst;
} else {
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
}
if (!dc_get_edp_link_panel_inst(core_power->dc, stream->link, &panel_inst))
return false;
@ -937,8 +941,12 @@ bool mod_power_set_backlight_percent(struct mod_power *mod_power,
core_power = MOD_POWER_TO_CORE(mod_power);
link = dc_stream_get_link(stream);
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) {
aux_inst = (uint8_t)link->aux_hw_inst;
} else {
ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF);
aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel;
}
if (!dc_get_edp_link_panel_inst(core_power->dc, stream->link, &panel_inst))
return false;