From: Taimur Hassan Date: Wed, 13 Jul 2022 21:07:43 +0000 (-0400) Subject: drm/amd/display: Reset pipe count when iterating for DET override X-Git-Tag: v6.0-rc1~138^2~2^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f46e3f28f89b893685ec9204405677dac410d8ad;p=thirdparty%2Flinux.git drm/amd/display: Reset pipe count when iterating for DET override [Why] Coding error in DET allocation was resulting in too few DET segments being allocated, causing underflow. [How] Reset pipe count each time we begin iterating through pipes for a stream. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Taimur Hassan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c index 266c49884f044..b3f8503cea9c5 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c @@ -184,7 +184,8 @@ void dcn32_determine_det_override(struct dc_state *context, display_e2e_pipe_par if (context->stream_count > 0) { stream_segments = 18 / context->stream_count; - for (i = 0, count = 0; i < context->stream_count; i++) { + for (i = 0; i < context->stream_count; i++) { + count = 0; for (j = 0; j < pipe_cnt; j++) { if (context->res_ctx.pipe_ctx[j].stream == context->streams[i]) { count++;