Skip to content

Commit 1be2a90

Browse files
Jimmy Kizitoalexdeucher
authored andcommitted
drm/amd/display: Support mappable encoders when transmitting training patterns.
[Why & How] Add support for transmitting training pattern sequences for links whose encoders have been dynamically assigned. Signed-off-by: Jimmy Kizito <[email protected]> Reviewed-by: Jun Lei <[email protected]> Acked-by: Stylon Wang <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0cb1588 commit 1be2a90

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,16 @@ void dp_set_hw_test_pattern(
332332
uint32_t custom_pattern_size)
333333
{
334334
struct encoder_set_dp_phy_pattern_param pattern_param = {0};
335-
struct link_encoder *encoder = link->link_enc;
335+
struct link_encoder *encoder;
336+
337+
/* Access link encoder based on whether it is statically
338+
* or dynamically assigned to a link.
339+
*/
340+
if (link->is_dig_mapping_flexible &&
341+
link->dc->res_pool->funcs->link_encs_assign)
342+
encoder = link_enc_cfg_get_link_enc_used_by_link(link->dc->current_state, link);
343+
else
344+
encoder = link->link_enc;
336345

337346
pattern_param.dp_phy_pattern = test_pattern;
338347
pattern_param.custom_pattern = custom_pattern;

0 commit comments

Comments
 (0)