]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Bug fix in dcn315_populate_dml_pipes_from_context
authorArtem Grishin <artem.grishin@amd.com>
Thu, 1 Jun 2023 16:52:16 +0000 (12:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2023 14:44:41 +0000 (10:44 -0400)
[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 <stylon.wang@amd.com>
Signed-off-by: Artem Grishin <artem.grishin@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c

index 0cc853964781c5684af4ae07395942686b460d93..f1153941907e6a14dd243cc4b17964bed5e8c625 100644 (file)
@@ -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;
                        }