Skip to content

Commit 56d8ce9

Browse files
Michael Mityushkinalexdeucher
authored andcommitted
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>
1 parent 3cf7cd3 commit 56d8ce9

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,7 @@ struct dc_link {
14541454

14551455
struct ddc_service *ddc;
14561456

1457+
enum dp_panel_mode panel_mode;
14571458
bool aux_mode;
14581459

14591460
/* Private to DC core */

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,10 @@ bool perform_link_training_with_retries(
15961596
* Report and continue with eDP panel mode to
15971597
* perform eDP link training with right settings
15981598
*/
1599-
cp_psp->funcs.enable_assr(cp_psp->handle, link);
1599+
bool result;
1600+
result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
1601+
if (!result && link->panel_mode != DP_PANEL_MODE_EDP)
1602+
panel_mode = DP_PANEL_MODE_DEFAULT;
16001603
}
16011604
}
16021605

drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
8383
ASSERT(result == DC_OK);
8484
}
8585
}
86+
link->panel_mode = panel_mode;
8687
DC_LOG_DETECTION_DP_CAPS("Link: %d eDP panel mode supported: %d "
8788
"eDP panel mode enabled: %d \n",
8889
link->link_index,

0 commit comments

Comments
 (0)