diff options
| author | 2021-03-17 14:26:55 -0400 | |
|---|---|---|
| committer | 2021-04-09 16:41:39 -0400 | |
| commit | 7d707dddc95ce43b451beb14801f8c8f8bbfe133 (patch) | |
| tree | 440de1dd9745732972a9db7d6c96fc3979d99b22 | |
| parent | drm/amd/display: Change input parameter for set_drr (diff) | |
drm/amd/display: Use pwrseq instance to determine eDP instance
[Why & How]
Link index doesn't always correspond to the appropriate eDP instance.
We can assume lower link index is a lower eDP instance and set panel
control instance accordingly.
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Jake Wang <haonan.wang2@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index f9a33dc52c45..2cfb53387c55 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -1383,6 +1383,8 @@ static bool dc_link_construct(struct dc_link *link, struct dc_bios *bios = init_params->dc->ctx->dc_bios; const struct dc_vbios_funcs *bp_funcs = bios->funcs; struct bp_disp_connector_caps_info disp_connect_caps_info = { 0 }; + struct dc_link *edp_links[MAX_NUM_EDP]; + int edp_num; DC_LOGGER_INIT(dc_ctx->logger); @@ -1506,7 +1508,11 @@ static bool dc_link_construct(struct dc_link *link, (link->link_id.id == CONNECTOR_ID_EDP || link->link_id.id == CONNECTOR_ID_LVDS)) { panel_cntl_init_data.ctx = dc_ctx; - panel_cntl_init_data.inst = link->link_index; + get_edp_links(panel_cntl_init_data.ctx->dc, edp_links, &edp_num); + if ((edp_num > 1) && (link->link_index > edp_links[0]->link_index)) + panel_cntl_init_data.inst = 1; + else + panel_cntl_init_data.inst = 0; link->panel_cntl = link->dc->res_pool->funcs->panel_cntl_create( &panel_cntl_init_data); |
