Unverified Commit 0076e85e authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11766 drm/amd/display: Check denominator crb_pipes before used

parents f8be47d4 274b9393
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1751,7 +1751,7 @@ static int dcn315_populate_dml_pipes_from_context(
				bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
						|| (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);

				if (remaining_det_segs > MIN_RESERVED_DET_SEGS)
				if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
					pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
							(crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
				if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {