]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Don't return false if no stream
authorAlvin Lee <Alvin.Lee2@amd.com>
Thu, 6 Oct 2022 21:26:49 +0000 (17:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2022 08:27:17 +0000 (09:27 +0100)
[ Upstream commit abe4d9f03fae76c9650b0d942faf6990b35c377b ]

pipe_ctx[i] exists even if the pipe is not
in use. If the pipe is not in use it will
always have a null stream, so don't return
false in this case.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c

index 1f195c5b3377d64eb482b4be63c17f05fea10663..13cd1f2e50ca31b9272ecd345c9f54fbf3d59ccf 100644 (file)
@@ -187,7 +187,7 @@ bool dcn32_all_pipes_have_stream_and_plane(struct dc *dc,
                struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
 
                if (!pipe->stream)
-                       return false;
+                       continue;
 
                if (!pipe->plane_state)
                        return false;