Skip to content

Commit b7f839d

Browse files
committed
drm/amdgpu/display: use blanked rather than plane state for sync groups
We may end up with no planes set yet, depending on the ordering, but we should have the proper blanking state which is either handled by either DPG or TG depending on the hardware generation. Check both to determine the proper blanked state. Bug: https://gitlab.freedesktop.org/drm/amd/issues/781 Fixes: 5fc0cbf ("drm/amd/display: determine if a pipe is synced by plane state") Cc: [email protected] Reviewed-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 14ed1c9 commit b7f839d

File tree

1 file changed

+20
-4
lines changed
  • drivers/gpu/drm/amd/display/dc/core

1 file changed

+20
-4
lines changed

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,9 +1016,17 @@ static void program_timing_sync(
10161016
}
10171017
}
10181018

1019-
/* set first pipe with plane as master */
1019+
/* set first unblanked pipe as master */
10201020
for (j = 0; j < group_size; j++) {
1021-
if (pipe_set[j]->plane_state) {
1021+
bool is_blanked;
1022+
1023+
if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked)
1024+
is_blanked =
1025+
pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp);
1026+
else
1027+
is_blanked =
1028+
pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg);
1029+
if (!is_blanked) {
10221030
if (j == 0)
10231031
break;
10241032

@@ -1039,9 +1047,17 @@ static void program_timing_sync(
10391047
status->timing_sync_info.master = false;
10401048

10411049
}
1042-
/* remove any other pipes with plane as they have already been synced */
1050+
/* remove any other unblanked pipes as they have already been synced */
10431051
for (j = j + 1; j < group_size; j++) {
1044-
if (pipe_set[j]->plane_state) {
1052+
bool is_blanked;
1053+
1054+
if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked)
1055+
is_blanked =
1056+
pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp);
1057+
else
1058+
is_blanked =
1059+
pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg);
1060+
if (!is_blanked) {
10451061
group_size--;
10461062
pipe_set[j] = pipe_set[group_size];
10471063
j--;

0 commit comments

Comments
 (0)