From: Alvin Lee Date: Fri, 15 May 2020 22:18:20 +0000 (-0400) Subject: drm/amd/display: Don't compare same stream for synchronized vblank X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~1446^2~25^2~434 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=d294353e7ea815ad000f755419fd0cec01f01245;p=linux.git drm/amd/display: Don't compare same stream for synchronized vblank [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 Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 4ffdbcbcdfd4..8bf7c5bc946c 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -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)) {