/* un-mute audio */
/* TODO: audio should be per stream rather than per link */
- pipe_ctx->stream_enc->funcs->audio_mute_control(
- pipe_ctx->stream_enc, false);
+ pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
+ pipe_ctx->stream_res.stream_enc, false);
}
return status;
struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
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 fixed31_32 avg_time_slots_per_mtp;
struct fixed31_32 pbn;
&proposed_table,
true)) {
update_mst_stream_alloc_table(
- link, pipe_ctx->stream_enc, &proposed_table);
+ link, pipe_ctx->stream_res.stream_enc, &proposed_table);
}
else
dm_logger_write(link->ctx->logger, LOG_WARNING,
struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
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 fixed31_32 avg_time_slots_per_mtp = dal_fixed31_32_from_int(0);
uint8_t i;
false)) {
update_mst_stream_alloc_table(
- link, pipe_ctx->stream_enc, &proposed_table);
+ link, pipe_ctx->stream_res.stream_enc, &proposed_table);
}
else {
dm_logger_write(link->ctx->logger, LOG_WARNING,
int i;
for (i = 0; i < MAX_PIPES; i++) {
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];
break;
}
if (tail_pipe) {
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->stream_res.stream_enc = tail_pipe->stream_res.stream_enc;
free_pipe->audio = tail_pipe->audio;
free_pipe->clock_source = tail_pipe->clock_source;
free_pipe->top_pipe = tail_pipe;
copy_pipe_ctx(old_pipe_ctx, pipe_ctx);
/* Split pipe resource, do not acquire back end */
- if (!pipe_ctx->stream_enc)
+ if (!pipe_ctx->stream_res.stream_enc)
continue;
set_stream_engine_in_use(
&context->res_ctx, pool,
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc);
/* Switch to dp clock source only if there is
* no non dp stream that shares the same timing
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(
&context->res_ctx, pool, stream);
- if (!pipe_ctx->stream_enc)
+ if (!pipe_ctx->stream_res.stream_enc)
return DC_NO_STREAM_ENG_RESOURCE;
set_stream_engine_in_use(
&context->res_ctx, pool,
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc);
/* TODO: Add check if ASIC support and EDID audio */
if (!stream->sink->converter_disable_audio &&
&& pipe_ctx_old->stream != pipe_ctx->stream)
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;
if (is_timing_changed(pipe_ctx_old->stream, pipe_ctx->stream))
struct bp_crtc_source_select crtc_source_select = {0};
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;
/*TODO: Need to un-hardcode color depth, dp_audio and account for
* the case where signal and sink signal is different (translator
{
ASSERT(pipe_ctx->stream);
- if (pipe_ctx->stream_enc == NULL)
+ if (pipe_ctx->stream_res.stream_enc == NULL)
return; /* this is not root pipe */
if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->update_hdmi_info_packets(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->update_hdmi_info_packets(
+ pipe_ctx->stream_res.stream_enc,
&pipe_ctx->encoder_info_frame);
else if (dc_is_dp_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->update_dp_info_packets(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->update_dp_info_packets(
+ pipe_ctx->stream_res.stream_enc,
&pipe_ctx->encoder_info_frame);
}
/* enable audio only within mode set */
if (pipe_ctx->audio != NULL) {
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.
* disconnect them during disable_stream
* BY this, it is logic clean to separate stream and link */
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);
}
pipe_ctx->audio->funcs->az_disable(pipe_ctx->audio);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->dp_audio_disable(
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc->funcs->dp_audio_disable(
+ pipe_ctx->stream_res.stream_enc);
else
- pipe_ctx->stream_enc->funcs->hdmi_audio_disable(
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc->funcs->hdmi_audio_disable(
+ pipe_ctx->stream_res.stream_enc);
pipe_ctx->audio = NULL;
}
if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->stop_hdmi_info_packets(
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc->funcs->stop_hdmi_info_packets(
+ pipe_ctx->stream_res.stream_enc);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->stop_dp_info_packets(
- pipe_ctx->stream_enc);
+ pipe_ctx->stream_res.stream_enc->funcs->stop_dp_info_packets(
+ pipe_ctx->stream_res.stream_enc);
- pipe_ctx->stream_enc->funcs->audio_mute_control(
- pipe_ctx->stream_enc, true);
+ pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
+ pipe_ctx->stream_res.stream_enc, true);
/* blank at encoder level */
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,
- pipe_ctx->stream_enc->id,
+ pipe_ctx->stream_res.stream_enc->id,
false);
}
params.pixel_clk_khz =
pipe_ctx->stream->timing.pix_clk_khz;
params.link_settings.link_rate = link_settings->link_rate;
- pipe_ctx->stream_enc->funcs->dp_unblank(pipe_ctx->stream_enc, ¶ms);
+ pipe_ctx->stream_res.stream_enc->funcs->dp_unblank(pipe_ctx->stream_res.stream_enc, ¶ms);
}
void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
{
- if (pipe_ctx != NULL && pipe_ctx->stream_enc != NULL)
- pipe_ctx->stream_enc->funcs->set_avmute(pipe_ctx->stream_enc, enable);
+ if (pipe_ctx != NULL && pipe_ctx->stream_res.stream_enc != NULL)
+ 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)
struct audio_output *audio_output)
{
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;
pipe_ctx->stream->signal);
if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL)
- pipe_ctx->stream_enc->funcs->setup_stereo_sync(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->setup_stereo_sync(
+ pipe_ctx->stream_res.stream_enc,
pipe_ctx->stream_res.tg->inst,
stream->timing.timing_3d_format != TIMING_3D_FORMAT_NONE);
&stream->clamping);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->dp_set_stream_attribute(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->dp_set_stream_attribute(
+ pipe_ctx->stream_res.stream_enc,
&stream->timing,
stream->output_color_space);
if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->hdmi_set_stream_attribute(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->hdmi_set_stream_attribute(
+ pipe_ctx->stream_res.stream_enc,
&stream->timing,
stream->phy_pix_clk,
pipe_ctx->audio != NULL);
if (dc_is_dvi_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->dvi_set_stream_attribute(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->dvi_set_stream_attribute(
+ pipe_ctx->stream_res.stream_enc,
&stream->timing,
(pipe_ctx->stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) ?
true : false);
build_audio_output(pipe_ctx, &audio_output);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
- pipe_ctx->stream_enc->funcs->dp_audio_setup(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->dp_audio_setup(
+ pipe_ctx->stream_res.stream_enc,
pipe_ctx->audio->inst,
&pipe_ctx->stream->audio_info);
else
- pipe_ctx->stream_enc->funcs->hdmi_audio_setup(
- pipe_ctx->stream_enc,
+ pipe_ctx->stream_res.stream_enc->funcs->hdmi_audio_setup(
+ pipe_ctx->stream_res.stream_enc,
pipe_ctx->audio->inst,
&pipe_ctx->stream->audio_info,
&audio_output.crtc_info);