]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: fix counter in wait_for_no_pipes_pending
authorRoman Li <roman.li@amd.com>
Wed, 26 Feb 2020 22:30:29 +0000 (17:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 May 2020 17:11:13 +0000 (13:11 -0400)
[Why]
Wait counter is not being reset for each pipe.

[How]
Move counter reset into pipe loop scope.

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Zhan Liu <Zhan.Liu@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index f47acf30acd256bcbd876ad7404442aa55f433b3..0a12d13349c1b4be699134b59149ed1f3b442c0a 100644 (file)
@@ -839,11 +839,10 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
 static void wait_for_no_pipes_pending(struct dc *dc, struct dc_state *context)
 {
        int i;
-       int count = 0;
-       struct pipe_ctx *pipe;
        PERF_TRACE();
        for (i = 0; i < MAX_PIPES; i++) {
-               pipe = &context->res_ctx.pipe_ctx[i];
+               int count = 0;
+               struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
 
                if (!pipe->plane_state)
                        continue;