diff options
author | Roman Li <roman.li@amd.com> | 2020-02-26 17:30:29 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-05-05 13:11:13 -0400 |
commit | 5f6dbd54c05f38d30da9c1d310219808a69afd35 (patch) | |
tree | 0e373ae3f4c59e3e57ee3f94d62cd33f77c9b63f /drivers/gpu | |
parent | 8c076bc8d731ece31c7c932730c5581af50f47da (diff) | |
download | linux-stable-5f6dbd54c05f38d30da9c1d310219808a69afd35.tar.gz linux-stable-5f6dbd54c05f38d30da9c1d310219808a69afd35.tar.bz2 linux-stable-5f6dbd54c05f38d30da9c1d310219808a69afd35.zip |
drm/amd/display: fix counter in wait_for_no_pipes_pending
[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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index f47acf30acd2..0a12d13349c1 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -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; |