mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
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:
parent
6750a2316f
commit
7d44737067
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user