diff options
| author | Gabe Teeger <gabe.teeger@amd.com> | 2026-05-21 11:06:22 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-06-03 13:43:42 -0400 |
| commit | 7d447370678c4c4d335fd0422341b76f8cf8f3b3 (patch) | |
| tree | 7d4eede888ef066f7f887a1e4801c16157c3e8d3 /drivers/gpu/drm/amd/display/modules | |
| parent | 6750a2316f3f3b34016bcc425a0e99af1efb1c58 (diff) | |
| download | linux-next-7d447370678c4c4d335fd0422341b76f8cf8f3b3.tar.gz linux-next-7d447370678c4c4d335fd0422341b76f8cf8f3b3.zip | |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules')
| -rw-r--r-- | drivers/gpu/drm/amd/display/modules/power/power.c | 9 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/display/modules/power/power_abm.c | 16 |
2 files changed, 19 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/power/power.c b/drivers/gpu/drm/amd/display/modules/power/power.c index 1dd65bdf8cc9..5659a38b3366 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power.c +++ b/drivers/gpu/drm/amd/display/modules/power/power.c @@ -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); diff --git a/drivers/gpu/drm/amd/display/modules/power/power_abm.c b/drivers/gpu/drm/amd/display/modules/power/power_abm.c index b94dbb9e64a7..a1a0563598b5 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power_abm.c +++ b/drivers/gpu/drm/amd/display/modules/power/power_abm.c @@ -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; |
