Commit 7fbf451e authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher
Browse files

drm/amd/display: Reinit DPG when exiting dynamic ODM



[WHY]
DPG must be returned to initialized state when pipe is disabled.

[HOW]
Reinit DPG on unused pipes when exiting dynamic ODM.

Reviewed-by: default avatarAlvin Lee <Alvin.Lee2@amd.com>
Acked-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarDillon Varone <Dillon.Varone@amd.com>
Tested-by: default avatarMark Broadworth <mark.broadworth@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 26f2fe86
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -1079,6 +1079,29 @@ void dcn20_blank_pixel_data(
				0);
	}

	if (!blank && dc->debug.enable_single_display_2to1_odm_policy) {
		/* when exiting dynamic ODM need to reinit DPG state for unused pipes */
		struct pipe_ctx *old_odm_pipe = dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx].next_odm_pipe;

		odm_pipe = pipe_ctx->next_odm_pipe;

		while (old_odm_pipe) {
			if (!odm_pipe || old_odm_pipe->pipe_idx != odm_pipe->pipe_idx)
				dc->hwss.set_disp_pattern_generator(dc,
						old_odm_pipe,
						CONTROLLER_DP_TEST_PATTERN_VIDEOMODE,
						CONTROLLER_DP_COLOR_SPACE_UDEFINED,
						COLOR_DEPTH_888,
						NULL,
						0,
						0,
						0);
			old_odm_pipe = old_odm_pipe->next_odm_pipe;
			if (odm_pipe)
				odm_pipe = odm_pipe->next_odm_pipe;
		}
	}

	if (!blank)
		if (stream_res->abm) {
			dc->hwss.set_pipe(pipe_ctx);