From: Artem Grishin Date: Thu, 1 Jun 2023 16:52:16 +0000 (-0400) Subject: drm/amd/display: Bug fix in dcn315_populate_dml_pipes_from_context X-Git-Tag: v6.5-rc1~153^2~3^2~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec7282bd2688c6c741c79f8696a68c6c0403cf2d;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Bug fix in dcn315_populate_dml_pipes_from_context [Why] When iterating over all pipes in the loop, the CRB allocation algorithm may potentially skip some of the pipes. Previously, the current pipe index didn't get updated in this case, causing incorrect outcome. [How] Increment the pipe index when skipping over a pipe in the loop. Acked-by: Stylon Wang Signed-off-by: Artem Grishin Reviewed-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c index 0cc853964781c..f1153941907e6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c @@ -1742,6 +1742,7 @@ static int dcn315_populate_dml_pipes_from_context( /* Do not use asymetric crb if not enough for pstate support */ if (remaining_det_segs < 0) { pipes[pipe_cnt].pipe.src.det_size_override = 0; + pipe_cnt++; continue; }