aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
diff options
context:
space:
mode:
authorWenjing Liu <wenjing.liu@amd.com>2023-09-14 12:42:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-09-26 17:00:22 -0400
commitd849434977a8a5926c449c761fa9869071091f6a (patch)
tree7308d811f4062f8652aae596082fcb1ca8f57711 /drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
parentdrm/amd/display: add primary pipe check when building slice table for dcn3x (diff)
downloadwireguard-linux-d849434977a8a5926c449c761fa9869071091f6a.tar.xz
wireguard-linux-d849434977a8a5926c449c761fa9869071091f6a.zip
drm/amd/display: fix incorrect odm change detection logic
[why] The current ODM change detection only compares first two ODM slices. If there are 4 ODM slices and the change is within the last two slices, the logic fails to detect ODM change and cause us to skip ODM programming unexpectedly. [how] Add a is ODM topology changed resource interface to check any ODM topology changes with a more generic method. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 321fa01a33b0..21b94adab575 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -1433,13 +1433,9 @@ static void dcn20_detect_pipe_changes(struct pipe_ctx *old_pipe, struct pipe_ctx
}
/* Detect top pipe only changes */
- if (!new_pipe->top_pipe && !new_pipe->prev_odm_pipe) {
+ if (resource_is_pipe_type(new_pipe, OTG_MASTER)) {
/* Detect odm changes */
- if ((old_pipe->next_odm_pipe && new_pipe->next_odm_pipe
- && old_pipe->next_odm_pipe->pipe_idx != new_pipe->next_odm_pipe->pipe_idx)
- || (!old_pipe->next_odm_pipe && new_pipe->next_odm_pipe)
- || (old_pipe->next_odm_pipe && !new_pipe->next_odm_pipe)
- || old_pipe->stream_res.opp != new_pipe->stream_res.opp)
+ if (resource_is_odm_topology_changed(new_pipe, old_pipe))
new_pipe->update_flags.bits.odm = 1;
/* Detect global sync changes */