Commit 6b670fa9 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher
Browse files

drm/amd/display: Move TG to stream_res



find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipes->tg/pipes->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/ctx->tg->/ctx->stream_res\.tg->/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe->tg/pipe->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe_ctx->tg/pipe_ctx->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_ctx\[pipe_offset\]\.tg/pipe_ctx\[pipe_offset\]\.stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/grouped_pipes\[i\]->tg/grouped_pipes\[i\]->stream_^Cs\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/grouped_pipes\[0\]->tg/grouped_pipes\[0\]->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/grouped_pipes\[1\]->tg/grouped_pipes\[1\]->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe_ctx\[i\]->tg/pipe_ctx\[i\]->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe_ctx_old->tg/pipe_ctx_old->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe_set\[j\]->tg/pipe_set\[j\]->stream_res\.tg/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe_ctx\[i\]\.tg/pipe_ctx\[i\]\.stream_res\.tg/g'

Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a6a6cb34
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -846,7 +846,7 @@ static void program_timing_sync(
		for (j = 0; j < group_size; j++) {
			struct pipe_ctx *temp;

			if (!pipe_set[j]->tg->funcs->is_blanked(pipe_set[j]->tg)) {
			if (!pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
				if (j == 0)
					break;

@@ -859,7 +859,7 @@ static void program_timing_sync(

		/* remove any other unblanked pipes as they have already been synced */
		for (j = j + 1; j < group_size; j++) {
			if (!pipe_set[j]->tg->funcs->is_blanked(pipe_set[j]->tg)) {
			if (!pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
				group_size--;
				pipe_set[j] = pipe_set[group_size];
				j--;
+2 −2
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ void context_timing_trace(
				 || pipe_ctx->pipe_idx == underlay_idx)
			continue;

		pipe_ctx->tg->funcs->get_position(pipe_ctx->tg, &position);
		pipe_ctx->stream_res.tg->funcs->get_position(pipe_ctx->stream_res.tg, &position);
		h_pos[i] = position.horizontal_count;
		v_pos[i] = position.vertical_count;
	}
@@ -320,7 +320,7 @@ void context_timing_trace(
			continue;

		TIMING_TRACE("OTG_%d   H_tot:%d  V_tot:%d   H_pos:%d  V_pos:%d\n",
				pipe_ctx->tg->inst,
				pipe_ctx->stream_res.tg->inst,
				pipe_ctx->stream->timing.h_total,
				pipe_ctx->stream->timing.v_total,
				h_pos[i], v_pos[i]);
+3 −3
Original line number Diff line number Diff line
@@ -1398,7 +1398,7 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level,
					 */
					controller_id =
						core_dc->current_context->
						res_ctx.pipe_ctx[i].tg->inst +
						res_ctx.pipe_ctx[i].stream_res.tg->inst +
						1;
			}
		}
@@ -1504,7 +1504,7 @@ bool dc_link_setup_psr(struct dc_link *link,
				 */
				psr_context->controllerId =
					core_dc->current_context->res_ctx.
					pipe_ctx[i].tg->inst + 1;
					pipe_ctx[i].stream_res.tg->inst + 1;
				break;
			}
		}
@@ -1879,7 +1879,7 @@ void core_link_enable_stream(struct pipe_ctx *pipe_ctx)
	}

	/* turn off otg test pattern if enable */
	pipe_ctx->tg->funcs->set_test_pattern(pipe_ctx->tg,
	pipe_ctx->stream_res.tg->funcs->set_test_pattern(pipe_ctx->stream_res.tg,
			CONTROLLER_DP_TEST_PATTERN_VIDEOMODE,
			COLOR_DEPTH_UNDEFINED);

+2 −2
Original line number Diff line number Diff line
@@ -2375,7 +2375,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
		pipe_ctx->stream_res.opp->funcs->
			opp_program_bit_depth_reduction(pipe_ctx->stream_res.opp, &params);

		pipe_ctx->tg->funcs->set_test_pattern(pipe_ctx->tg,
		pipe_ctx->stream_res.tg->funcs->set_test_pattern(pipe_ctx->stream_res.tg,
				controller_test_pattern, color_depth);
	}
	break;
@@ -2388,7 +2388,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
		pipe_ctx->stream_res.opp->funcs->
			opp_program_bit_depth_reduction(pipe_ctx->stream_res.opp, &params);

		pipe_ctx->tg->funcs->set_test_pattern(pipe_ctx->tg,
		pipe_ctx->stream_res.tg->funcs->set_test_pattern(pipe_ctx->stream_res.tg,
				CONTROLLER_DP_TEST_PATTERN_VIDEOMODE,
				color_depth);
	}
+4 −4
Original line number Diff line number Diff line
@@ -1011,7 +1011,7 @@ static int acquire_first_split_pipe(
				pipe_ctx->bottom_pipe->top_pipe = pipe_ctx->top_pipe;

			memset(pipe_ctx, 0, sizeof(*pipe_ctx));
			pipe_ctx->tg = pool->timing_generators[i];
			pipe_ctx->stream_res.tg = pool->timing_generators[i];
			pipe_ctx->plane_res.mi = pool->mis[i];
			pipe_ctx->plane_res.ipp = pool->ipps[i];
			pipe_ctx->plane_res.xfm = pool->transforms[i];
@@ -1094,7 +1094,7 @@ bool resource_attach_surfaces_to_context(
		free_pipe->plane_state = plane_state;

		if (tail_pipe) {
			free_pipe->tg = tail_pipe->tg;
			free_pipe->stream_res.tg = tail_pipe->stream_res.tg;
			free_pipe->stream_res.opp = tail_pipe->stream_res.opp;
			free_pipe->stream_enc = tail_pipe->stream_enc;
			free_pipe->audio = tail_pipe->audio;
@@ -1241,7 +1241,7 @@ static int acquire_first_free_pipe(
		if (!res_ctx->pipe_ctx[i].stream) {
			struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];

			pipe_ctx->tg = pool->timing_generators[i];
			pipe_ctx->stream_res.tg = pool->timing_generators[i];
			pipe_ctx->plane_res.mi = pool->mis[i];
			pipe_ctx->plane_res.ipp = pool->ipps[i];
			pipe_ctx->plane_res.xfm = pool->transforms[i];
@@ -1532,7 +1532,7 @@ enum dc_status resource_map_pool_resources(
					pipe_ctx->audio);
		}

		context->stream_status[i].primary_otg_inst = pipe_ctx->tg->inst;
		context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst;
	}

	return DC_OK;
Loading