Commit d55a3606 authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher
Browse files

drm/amd/display: fix pipe topology logging error



[why]
There is a logging error in the recently added pipe topology log.
If the plane with index 0 uses MPC combine, the log shows that
as two separate planes.

[how]
Initialize plane idx as -1 and increment plane idx before logging
any primary dpp pipes of a plane.

Reviewed-by: default avatarDillon Varone <dillon.varone@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 07926ba8
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1996,8 +1996,8 @@ void resource_log_pipe_topology_update(struct dc *dc, struct dc_state *state)
		slice_count = resource_get_opp_heads_for_otg_master(otg_master,
				&state->res_ctx, opp_heads);
		for (slice_idx = 0; slice_idx < slice_count; slice_idx++) {
			plane_idx = -1;
			if (opp_heads[slice_idx]->plane_state) {
				plane_idx = 0;
				dpp_count = resource_get_dpp_pipes_for_opp_head(
						opp_heads[slice_idx],
						&state->res_ctx,
@@ -2005,15 +2005,14 @@ void resource_log_pipe_topology_update(struct dc *dc, struct dc_state *state)
				for (dpp_idx = 0; dpp_idx < dpp_count; dpp_idx++) {
					is_primary = !dpp_pipes[dpp_idx]->top_pipe ||
							dpp_pipes[dpp_idx]->top_pipe->plane_state != dpp_pipes[dpp_idx]->plane_state;
					if (is_primary)
						plane_idx++;
					resource_log_pipe(dc, dpp_pipes[dpp_idx],
							stream_idx, slice_idx,
							plane_idx, slice_count,
							is_primary);
					if (is_primary)
						plane_idx++;
				}
			} else {
				plane_idx = -1;
				resource_log_pipe(dc, opp_heads[slice_idx],
						stream_idx, slice_idx, plane_idx,
						slice_count, true);