drm/amd/display: Don't compare same stream for synchronized vblank
authorAlvin Lee <alvin.lee2@amd.com>
Fri, 15 May 2020 22:18:20 +0000 (18:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2020 18:00:51 +0000 (14:00 -0400)
[Why]
When determining synchronzied vblank we don't need to compare the stream
with itself

[How]
If comparing same stream, continue to next iteration

Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index 4ffdbcbcdfd469522fdbaea92e1443bc5d8ca3a5..8bf7c5bc946cc1f53b23d525d6d730c773149a0b 100644 (file)
@@ -2015,6 +2015,10 @@ int dcn20_populate_dml_pipes_from_context(
                        pipe_cnt = i;
                        continue;
                }
+
+               if (res_ctx->pipe_ctx[pipe_cnt].stream == res_ctx->pipe_ctx[i].stream)
+                       continue;
+
                if (dc->debug.disable_timing_sync || !resource_are_streams_timing_synchronizable(
                                res_ctx->pipe_ctx[pipe_cnt].stream,
                                res_ctx->pipe_ctx[i].stream)) {