drm/amd/display: Apply correct panel mode when reinitializing hardware
authorMichael Mityushkin <michael.mityushkin@amd.com>
Thu, 30 Mar 2023 15:35:08 +0000 (11:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Apr 2023 02:34:29 +0000 (22:34 -0400)
commit56d8ce9d8c17bea955b0c2551ee86149486890ae
tree27742316288043ff1cf4b6a353ef70d4e3ff1397
parent3cf7cd3f770a0b89dc5f06e19edb52e65b93b214
drm/amd/display: Apply correct panel mode when reinitializing hardware

[Why]
When link training during engine recovery, ASSR might fail causing panel
mode to be reset to default. This should not happen for eDP as it
will prevent the panel from turning back on.

[How]
Added dp_panel_mode to struct dc_link to remember previously applied
panel mode. Do not reset panel mode to default while performing link
training if previously used panel mode = eDP.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Michael Mityushkin <michael.mityushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c