Commit 8e9c4c8c authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Move stream_enc 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->stream_enc/pipes->stream_res\.stream_enc/g'

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

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe->stream_enc/pipe->stream_res\.stream_enc/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->stream_enc/pipe_ctx->stream_res\.stream_enc/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\]\.stream_enc/pipe_ctx\[pipe_offset\]\.stream_res\.stream_enc/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\]->stream_enc/grouped_pipes\[i\]->stream_^Cs\.stream_enc/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\]->stream_enc/grouped_pipes\[0\]->stream_res\.stream_enc/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\]->stream_enc/grouped_pipes\[1\]->stream_res\.stream_enc/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\]->stream_enc/pipe_ctx\[i\]->stream_res\.stream_enc/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->stream_enc/pipe_ctx_old->stream_res\.stream_enc/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\]->stream_enc/pipe_set\[j\]->stream_res\.stream_enc/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\]\.stream_enc/pipe_ctx\[i\]\.stream_res\.stream_enc/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipes\[i\]\.stream_enc/pipes\[i\]\.stream_res\.stream_enc/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 6b670fa9
...@@ -161,7 +161,7 @@ static bool stream_adjust_vmin_vmax(struct dc *dc, ...@@ -161,7 +161,7 @@ static bool stream_adjust_vmin_vmax(struct dc *dc,
for (i = 0; i < MAX_PIPES; i++) { for (i = 0; i < MAX_PIPES; i++) {
struct pipe_ctx *pipe = &core_dc->current_context->res_ctx.pipe_ctx[i]; struct pipe_ctx *pipe = &core_dc->current_context->res_ctx.pipe_ctx[i];
if (pipe->stream == stream && pipe->stream_enc) { if (pipe->stream == stream && pipe->stream_res.stream_enc) {
core_dc->hwss.set_drr(&pipe, 1, vmin, vmax); core_dc->hwss.set_drr(&pipe, 1, vmin, vmax);
/* build and update the info frame */ /* build and update the info frame */
...@@ -189,7 +189,7 @@ static bool stream_get_crtc_position(struct dc *dc, ...@@ -189,7 +189,7 @@ static bool stream_get_crtc_position(struct dc *dc,
struct pipe_ctx *pipe = struct pipe_ctx *pipe =
&core_dc->current_context->res_ctx.pipe_ctx[i]; &core_dc->current_context->res_ctx.pipe_ctx[i];
if (pipe->stream == stream && pipe->stream_enc) { if (pipe->stream == stream && pipe->stream_res.stream_enc) {
core_dc->hwss.get_position(&pipe, 1, &position); core_dc->hwss.get_position(&pipe, 1, &position);
*v_pos = position.vertical_count; *v_pos = position.vertical_count;
......
...@@ -1311,8 +1311,8 @@ static enum dc_status enable_link(struct pipe_ctx *pipe_ctx) ...@@ -1311,8 +1311,8 @@ static enum dc_status enable_link(struct pipe_ctx *pipe_ctx)
/* un-mute audio */ /* un-mute audio */
/* TODO: audio should be per stream rather than per link */ /* TODO: audio should be per stream rather than per link */
pipe_ctx->stream_enc->funcs->audio_mute_control( pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
pipe_ctx->stream_enc, false); pipe_ctx->stream_res.stream_enc, false);
} }
return status; return status;
...@@ -1699,7 +1699,7 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) ...@@ -1699,7 +1699,7 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct dc_stream_state *stream = pipe_ctx->stream; struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link; struct dc_link *link = stream->sink->link;
struct link_encoder *link_encoder = link->link_enc; struct link_encoder *link_encoder = link->link_enc;
struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; struct stream_encoder *stream_encoder = pipe_ctx->stream_res.stream_enc;
struct dp_mst_stream_allocation_table proposed_table = {0}; struct dp_mst_stream_allocation_table proposed_table = {0};
struct fixed31_32 avg_time_slots_per_mtp; struct fixed31_32 avg_time_slots_per_mtp;
struct fixed31_32 pbn; struct fixed31_32 pbn;
...@@ -1718,7 +1718,7 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) ...@@ -1718,7 +1718,7 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx)
&proposed_table, &proposed_table,
true)) { true)) {
update_mst_stream_alloc_table( update_mst_stream_alloc_table(
link, pipe_ctx->stream_enc, &proposed_table); link, pipe_ctx->stream_res.stream_enc, &proposed_table);
} }
else else
dm_logger_write(link->ctx->logger, LOG_WARNING, dm_logger_write(link->ctx->logger, LOG_WARNING,
...@@ -1781,7 +1781,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) ...@@ -1781,7 +1781,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct dc_stream_state *stream = pipe_ctx->stream; struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link; struct dc_link *link = stream->sink->link;
struct link_encoder *link_encoder = link->link_enc; struct link_encoder *link_encoder = link->link_enc;
struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; struct stream_encoder *stream_encoder = pipe_ctx->stream_res.stream_enc;
struct dp_mst_stream_allocation_table proposed_table = {0}; struct dp_mst_stream_allocation_table proposed_table = {0};
struct fixed31_32 avg_time_slots_per_mtp = dal_fixed31_32_from_int(0); struct fixed31_32 avg_time_slots_per_mtp = dal_fixed31_32_from_int(0);
uint8_t i; uint8_t i;
...@@ -1808,7 +1808,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) ...@@ -1808,7 +1808,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
false)) { false)) {
update_mst_stream_alloc_table( update_mst_stream_alloc_table(
link, pipe_ctx->stream_enc, &proposed_table); link, pipe_ctx->stream_res.stream_enc, &proposed_table);
} }
else { else {
dm_logger_write(link->ctx->logger, LOG_WARNING, dm_logger_write(link->ctx->logger, LOG_WARNING,
......
...@@ -2464,7 +2464,7 @@ bool dc_link_dp_set_test_pattern( ...@@ -2464,7 +2464,7 @@ bool dc_link_dp_set_test_pattern(
* MuteAudioEndpoint(pPathMode->pDisplayPath, true); * MuteAudioEndpoint(pPathMode->pDisplayPath, true);
*/ */
/* Blank stream */ /* Blank stream */
pipes->stream_enc->funcs->dp_blank(pipe_ctx->stream_enc); pipes->stream_res.stream_enc->funcs->dp_blank(pipe_ctx->stream_res.stream_enc);
} }
dp_set_hw_test_pattern(link, test_pattern, dp_set_hw_test_pattern(link, test_pattern,
......
...@@ -243,12 +243,12 @@ void dp_retrain_link_dp_test(struct dc_link *link, ...@@ -243,12 +243,12 @@ void dp_retrain_link_dp_test(struct dc_link *link,
if (pipes[i].stream != NULL && if (pipes[i].stream != NULL &&
pipes[i].stream->sink != NULL && pipes[i].stream->sink != NULL &&
pipes[i].stream->sink->link != NULL && pipes[i].stream->sink->link != NULL &&
pipes[i].stream_enc != NULL && pipes[i].stream_res.stream_enc != NULL &&
pipes[i].stream->sink->link == link) { pipes[i].stream->sink->link == link) {
dm_delay_in_microseconds(link->ctx, 100); dm_delay_in_microseconds(link->ctx, 100);
pipes[i].stream_enc->funcs->dp_blank( pipes[i].stream_res.stream_enc->funcs->dp_blank(
pipes[i].stream_enc); pipes[i].stream_res.stream_enc);
/* disable any test pattern that might be active */ /* disable any test pattern that might be active */
dp_set_hw_test_pattern(link, dp_set_hw_test_pattern(link,
......
...@@ -925,7 +925,7 @@ struct pipe_ctx *resource_get_head_pipe_for_stream( ...@@ -925,7 +925,7 @@ struct pipe_ctx *resource_get_head_pipe_for_stream(
int i; int i;
for (i = 0; i < MAX_PIPES; i++) { for (i = 0; i < MAX_PIPES; i++) {
if (res_ctx->pipe_ctx[i].stream == stream && if (res_ctx->pipe_ctx[i].stream == stream &&
res_ctx->pipe_ctx[i].stream_enc) { res_ctx->pipe_ctx[i].stream_res.stream_enc) {
return &res_ctx->pipe_ctx[i]; return &res_ctx->pipe_ctx[i];
break; break;
} }
...@@ -1096,7 +1096,7 @@ bool resource_attach_surfaces_to_context( ...@@ -1096,7 +1096,7 @@ bool resource_attach_surfaces_to_context(
if (tail_pipe) { if (tail_pipe) {
free_pipe->stream_res.tg = tail_pipe->stream_res.tg; free_pipe->stream_res.tg = tail_pipe->stream_res.tg;
free_pipe->stream_res.opp = tail_pipe->stream_res.opp; free_pipe->stream_res.opp = tail_pipe->stream_res.opp;
free_pipe->stream_enc = tail_pipe->stream_enc; free_pipe->stream_res.stream_enc = tail_pipe->stream_res.stream_enc;
free_pipe->audio = tail_pipe->audio; free_pipe->audio = tail_pipe->audio;
free_pipe->clock_source = tail_pipe->clock_source; free_pipe->clock_source = tail_pipe->clock_source;
free_pipe->top_pipe = tail_pipe; free_pipe->top_pipe = tail_pipe;
...@@ -1461,12 +1461,12 @@ enum dc_status resource_map_pool_resources( ...@@ -1461,12 +1461,12 @@ enum dc_status resource_map_pool_resources(
copy_pipe_ctx(old_pipe_ctx, pipe_ctx); copy_pipe_ctx(old_pipe_ctx, pipe_ctx);
/* Split pipe resource, do not acquire back end */ /* Split pipe resource, do not acquire back end */
if (!pipe_ctx->stream_enc) if (!pipe_ctx->stream_res.stream_enc)
continue; continue;
set_stream_engine_in_use( set_stream_engine_in_use(
&context->res_ctx, pool, &context->res_ctx, pool,
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
/* Switch to dp clock source only if there is /* Switch to dp clock source only if there is
* no non dp stream that shares the same timing * no non dp stream that shares the same timing
...@@ -1503,16 +1503,16 @@ enum dc_status resource_map_pool_resources( ...@@ -1503,16 +1503,16 @@ enum dc_status resource_map_pool_resources(
pipe_ctx = &context->res_ctx.pipe_ctx[pipe_idx]; pipe_ctx = &context->res_ctx.pipe_ctx[pipe_idx];
pipe_ctx->stream_enc = pipe_ctx->stream_res.stream_enc =
find_first_free_match_stream_enc_for_link( find_first_free_match_stream_enc_for_link(
&context->res_ctx, pool, stream); &context->res_ctx, pool, stream);
if (!pipe_ctx->stream_enc) if (!pipe_ctx->stream_res.stream_enc)
return DC_NO_STREAM_ENG_RESOURCE; return DC_NO_STREAM_ENG_RESOURCE;
set_stream_engine_in_use( set_stream_engine_in_use(
&context->res_ctx, pool, &context->res_ctx, pool,
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
/* TODO: Add check if ASIC support and EDID audio */ /* TODO: Add check if ASIC support and EDID audio */
if (!stream->sink->converter_disable_audio && if (!stream->sink->converter_disable_audio &&
...@@ -2382,7 +2382,7 @@ bool pipe_need_reprogram( ...@@ -2382,7 +2382,7 @@ bool pipe_need_reprogram(
&& pipe_ctx_old->stream != pipe_ctx->stream) && pipe_ctx_old->stream != pipe_ctx->stream)
return true; return true;
if (pipe_ctx_old->stream_enc != pipe_ctx->stream_enc) if (pipe_ctx_old->stream_res.stream_enc != pipe_ctx->stream_res.stream_enc)
return true; return true;
if (is_timing_changed(pipe_ctx_old->stream, pipe_ctx->stream)) if (is_timing_changed(pipe_ctx_old->stream, pipe_ctx->stream))
......
...@@ -659,7 +659,7 @@ static enum dc_status bios_parser_crtc_source_select( ...@@ -659,7 +659,7 @@ static enum dc_status bios_parser_crtc_source_select(
struct bp_crtc_source_select crtc_source_select = {0}; struct bp_crtc_source_select crtc_source_select = {0};
const struct dc_sink *sink = pipe_ctx->stream->sink; const struct dc_sink *sink = pipe_ctx->stream->sink;
crtc_source_select.engine_id = pipe_ctx->stream_enc->id; crtc_source_select.engine_id = pipe_ctx->stream_res.stream_enc->id;
crtc_source_select.controller_id = pipe_ctx->pipe_idx + 1; crtc_source_select.controller_id = pipe_ctx->pipe_idx + 1;
/*TODO: Need to un-hardcode color depth, dp_audio and account for /*TODO: Need to un-hardcode color depth, dp_audio and account for
* the case where signal and sink signal is different (translator * the case where signal and sink signal is different (translator
...@@ -684,16 +684,16 @@ void dce110_update_info_frame(struct pipe_ctx *pipe_ctx) ...@@ -684,16 +684,16 @@ void dce110_update_info_frame(struct pipe_ctx *pipe_ctx)
{ {
ASSERT(pipe_ctx->stream); ASSERT(pipe_ctx->stream);
if (pipe_ctx->stream_enc == NULL) if (pipe_ctx->stream_res.stream_enc == NULL)
return; /* this is not root pipe */ return; /* this is not root pipe */
if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->update_hdmi_info_packets( pipe_ctx->stream_res.stream_enc->funcs->update_hdmi_info_packets(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
&pipe_ctx->encoder_info_frame); &pipe_ctx->encoder_info_frame);
else if (dc_is_dp_signal(pipe_ctx->stream->signal)) else if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->update_dp_info_packets( pipe_ctx->stream_res.stream_enc->funcs->update_dp_info_packets(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
&pipe_ctx->encoder_info_frame); &pipe_ctx->encoder_info_frame);
} }
...@@ -731,7 +731,7 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx) ...@@ -731,7 +731,7 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx)
/* enable audio only within mode set */ /* enable audio only within mode set */
if (pipe_ctx->audio != NULL) { if (pipe_ctx->audio != NULL) {
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dp_audio_enable(pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc->funcs->dp_audio_enable(pipe_ctx->stream_res.stream_enc);
} }
/* For MST, there are multiply stream go to only one link. /* For MST, there are multiply stream go to only one link.
...@@ -739,7 +739,7 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx) ...@@ -739,7 +739,7 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx)
* disconnect them during disable_stream * disconnect them during disable_stream
* BY this, it is logic clean to separate stream and link */ * BY this, it is logic clean to separate stream and link */
link->link_enc->funcs->connect_dig_be_to_fe(link->link_enc, link->link_enc->funcs->connect_dig_be_to_fe(link->link_enc,
pipe_ctx->stream_enc->id, true); pipe_ctx->stream_res.stream_enc->id, true);
} }
...@@ -752,11 +752,11 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx) ...@@ -752,11 +752,11 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
pipe_ctx->audio->funcs->az_disable(pipe_ctx->audio); pipe_ctx->audio->funcs->az_disable(pipe_ctx->audio);
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dp_audio_disable( pipe_ctx->stream_res.stream_enc->funcs->dp_audio_disable(
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
else else
pipe_ctx->stream_enc->funcs->hdmi_audio_disable( pipe_ctx->stream_res.stream_enc->funcs->hdmi_audio_disable(
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
pipe_ctx->audio = NULL; pipe_ctx->audio = NULL;
...@@ -768,24 +768,24 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx) ...@@ -768,24 +768,24 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
} }
if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->stop_hdmi_info_packets( pipe_ctx->stream_res.stream_enc->funcs->stop_hdmi_info_packets(
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->stop_dp_info_packets( pipe_ctx->stream_res.stream_enc->funcs->stop_dp_info_packets(
pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc);
pipe_ctx->stream_enc->funcs->audio_mute_control( pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
pipe_ctx->stream_enc, true); pipe_ctx->stream_res.stream_enc, true);
/* blank at encoder level */ /* blank at encoder level */
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dp_blank(pipe_ctx->stream_enc); pipe_ctx->stream_res.stream_enc->funcs->dp_blank(pipe_ctx->stream_res.stream_enc);
link->link_enc->funcs->connect_dig_be_to_fe( link->link_enc->funcs->connect_dig_be_to_fe(
link->link_enc, link->link_enc,
pipe_ctx->stream_enc->id, pipe_ctx->stream_res.stream_enc->id,
false); false);
} }
...@@ -799,14 +799,14 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx, ...@@ -799,14 +799,14 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
params.pixel_clk_khz = params.pixel_clk_khz =
pipe_ctx->stream->timing.pix_clk_khz; pipe_ctx->stream->timing.pix_clk_khz;
params.link_settings.link_rate = link_settings->link_rate; params.link_settings.link_rate = link_settings->link_rate;
pipe_ctx->stream_enc->funcs->dp_unblank(pipe_ctx->stream_enc, &params); pipe_ctx->stream_res.stream_enc->funcs->dp_unblank(pipe_ctx->stream_res.stream_enc, &params);
} }
void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable) void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
{ {
if (pipe_ctx != NULL && pipe_ctx->stream_enc != NULL) if (pipe_ctx != NULL && pipe_ctx->stream_res.stream_enc != NULL)
pipe_ctx->stream_enc->funcs->set_avmute(pipe_ctx->stream_enc, enable); pipe_ctx->stream_res.stream_enc->funcs->set_avmute(pipe_ctx->stream_res.stream_enc, enable);
} }
static enum audio_dto_source translate_to_dto_source(enum controller_id crtc_id) static enum audio_dto_source translate_to_dto_source(enum controller_id crtc_id)
...@@ -834,7 +834,7 @@ static void build_audio_output( ...@@ -834,7 +834,7 @@ static void build_audio_output(
struct audio_output *audio_output) struct audio_output *audio_output)
{ {
const struct dc_stream_state *stream = pipe_ctx->stream; const struct dc_stream_state *stream = pipe_ctx->stream;
audio_output->engine_id = pipe_ctx->stream_enc->id; audio_output->engine_id = pipe_ctx->stream_res.stream_enc->id;
audio_output->signal = pipe_ctx->stream->signal; audio_output->signal = pipe_ctx->stream->signal;
...@@ -1071,8 +1071,8 @@ static enum dc_status apply_single_controller_ctx_to_hw( ...@@ -1071,8 +1071,8 @@ static enum dc_status apply_single_controller_ctx_to_hw(
pipe_ctx->stream->signal); pipe_ctx->stream->signal);
if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL) if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL)
pipe_ctx->stream_enc->funcs->setup_stereo_sync( pipe_ctx->stream_res.stream_enc->funcs->setup_stereo_sync(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
pipe_ctx->stream_res.tg->inst, pipe_ctx->stream_res.tg->inst,
stream->timing.timing_3d_format != TIMING_3D_FORMAT_NONE); stream->timing.timing_3d_format != TIMING_3D_FORMAT_NONE);
...@@ -1084,21 +1084,21 @@ static enum dc_status apply_single_controller_ctx_to_hw( ...@@ -1084,21 +1084,21 @@ static enum dc_status apply_single_controller_ctx_to_hw(
&stream->clamping); &stream->clamping);
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dp_set_stream_attribute( pipe_ctx->stream_res.stream_enc->funcs->dp_set_stream_attribute(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
&stream->timing, &stream->timing,
stream->output_color_space); stream->output_color_space);
if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->hdmi_set_stream_attribute( pipe_ctx->stream_res.stream_enc->funcs->hdmi_set_stream_attribute(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
&stream->timing, &stream->timing,
stream->phy_pix_clk, stream->phy_pix_clk,
pipe_ctx->audio != NULL); pipe_ctx->audio != NULL);
if (dc_is_dvi_signal(pipe_ctx->stream->signal)) if (dc_is_dvi_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dvi_set_stream_attribute( pipe_ctx->stream_res.stream_enc->funcs->dvi_set_stream_attribute(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
&stream->timing, &stream->timing,
(pipe_ctx->stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) ? (pipe_ctx->stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) ?
true : false); true : false);
...@@ -1860,13 +1860,13 @@ enum dc_status dce110_apply_ctx_to_hw( ...@@ -1860,13 +1860,13 @@ enum dc_status dce110_apply_ctx_to_hw(
build_audio_output(pipe_ctx, &audio_output); build_audio_output(pipe_ctx, &audio_output);
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
pipe_ctx->stream_enc->funcs->dp_audio_setup( pipe_ctx->stream_res.stream_enc->funcs->dp_audio_setup(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
pipe_ctx->audio->inst, pipe_ctx->audio->inst,
&pipe_ctx->stream->audio_info); &pipe_ctx->stream->audio_info);
else else
pipe_ctx->stream_enc->funcs->hdmi_audio_setup( pipe_ctx->stream_res.stream_enc->funcs->hdmi_audio_setup(
pipe_ctx->stream_enc, pipe_ctx->stream_res.stream_enc,
pipe_ctx->audio->inst, pipe_ctx->audio->inst,
&pipe_ctx->stream->audio_info, &pipe_ctx->stream->audio_info,
&audio_output.crtc_info); &audio_output.crtc_info);
......
...@@ -770,7 +770,7 @@ static void reset_back_end_for_pipe( ...@@ -770,7 +770,7 @@ static void reset_back_end_for_pipe(
{ {
int i; int i;
if (pipe_ctx->stream_enc == NULL) { if (pipe_ctx->stream_res.stream_enc == NULL) {
pipe_ctx->stream = NULL; pipe_ctx->stream = NULL;
return; return;
} }
......
...@@ -155,6 +155,7 @@ struct resource_pool { ...@@ -155,6 +155,7 @@ struct resource_pool {
struct stream_resource { struct stream_resource {
struct output_pixel_processor *opp; struct output_pixel_processor *opp;
struct timing_generator *tg; struct timing_generator *tg;
struct stream_encoder *stream_enc;
}; };
struct plane_resource { struct plane_resource {
...@@ -172,7 +173,6 @@ struct pipe_ctx { ...@@ -172,7 +173,6 @@ struct pipe_ctx {
struct plane_resource plane_res; struct plane_resource plane_res;
struct stream_resource stream_res; struct stream_resource stream_res;
struct stream_encoder *stream_enc;
struct display_clock *dis_clk; struct display_clock *dis_clk;
struct clock_source *clock_source; struct clock_source *clock_source;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment