Lines Matching defs:pipe_ctx

231 		struct pipe_ctx *pipe = &ctx->res_ctx.pipe_ctx[i];
354 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
356 if (pipe_ctx->stream && dc_state_get_pipe_subvp_type(context, pipe_ctx) == SUBVP_MAIN) {
375 struct pipe_ctx *top_pipe_to_program,
381 struct pipe_ctx *pipe;
385 pipe = &context->res_ctx.pipe_ctx[i];
406 pipe = &context->res_ctx.pipe_ctx[i];
440 struct pipe_ctx *pipe_ctx, const struct dc_stream_state *stream)
442 struct dpp *dpp_base = pipe_ctx->plane_res.dpp;
443 int mpcc_id = pipe_ctx->plane_res.hubp->inst;
444 struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
476 struct pipe_ctx *pipe_ctx, const struct dc_plane_state *plane_state)
478 struct dpp *dpp_base = pipe_ctx->plane_res.dpp;
479 int mpcc_id = pipe_ctx->plane_res.hubp->inst;
480 struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
518 struct pipe_ctx *pipe_ctx,
523 struct dpp *dpp_base = pipe_ctx->plane_res.dpp;
548 if (pipe_ctx->stream_res.opp &&
549 pipe_ctx->stream_res.opp->ctx &&
551 result = hws->funcs.set_mcm_luts(pipe_ctx, plane_state);
557 struct pipe_ctx *pipe_ctx,
560 int mpcc_id = pipe_ctx->plane_res.hubp->inst;
561 struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
566 if (resource_is_pipe_type(pipe_ctx, OPP_HEAD)) {
568 ret = dcn32_set_mpc_shaper_3dlut(pipe_ctx, stream);
572 else if (pipe_ctx->stream->out_transfer_func.type ==
601 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
616 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
640 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
700 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
966 static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)
968 struct display_stream_compressor *dsc = pipe_ctx->stream_res.dsc;
969 struct dc *dc = pipe_ctx->stream->ctx->dc;
970 struct dc_stream_state *stream = pipe_ctx->stream;
971 struct pipe_ctx *odm_pipe;
987 for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
1000 dsc_cfg.is_odm = pipe_ctx->next_odm_pipe ? true : false;
1006 dsc->funcs->dsc_enable(dsc, pipe_ctx->stream_res.opp->inst);
1009 for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) {
1024 DC_LOG_DSC("Setting optc DSC config for tg instance %d:", pipe_ctx->stream_res.tg->inst);
1025 pipe_ctx->stream_res.tg->funcs->set_dsc_config(pipe_ctx->stream_res.tg,
1031 pipe_ctx->stream_res.tg->funcs->set_dsc_config(
1032 pipe_ctx->stream_res.tg,
1037 dccg->funcs->set_ref_dscclk(dccg, pipe_ctx->stream_res.dsc->inst);
1038 dsc->funcs->dsc_disable(pipe_ctx->stream_res.dsc);
1039 for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) {
1049 * Given any pipe_ctx, return the total ODM combine factor, and optionally return
1052 static unsigned int get_odm_config(struct pipe_ctx *pipe_ctx, unsigned int *opp_instances)
1055 struct pipe_ctx *odm_pipe;
1058 for (odm_pipe = pipe_ctx; odm_pipe->prev_odm_pipe; odm_pipe = odm_pipe->prev_odm_pipe)
1075 void dcn32_update_odm(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
1077 struct pipe_ctx *odm_pipe;
1081 opp_cnt = get_odm_config(pipe_ctx, opp_inst);
1084 pipe_ctx->stream_res.tg->funcs->set_odm_combine(
1085 pipe_ctx->stream_res.tg,
1087 &pipe_ctx->stream->timing);
1089 pipe_ctx->stream_res.tg->funcs->set_odm_bypass(
1090 pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing);
1092 for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) {
1098 if (pipe_ctx->stream_res.dsc) {
1099 struct pipe_ctx *current_pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx];
1101 update_dsc_on_stream(pipe_ctx, pipe_ctx->stream->timing.flags.DSC);
1104 if (!pipe_ctx->next_odm_pipe && current_pipe_ctx->next_odm_pipe &&
1116 if (!resource_is_pipe_type(pipe_ctx, DPP_PIPE))
1121 dc->hwseq->funcs.blank_pixel_data(dc, pipe_ctx, true);
1124 unsigned int dcn32_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsigned int *k1_div, unsigned int *k2_div)
1126 struct dc_stream_state *stream = pipe_ctx->stream;
1131 odm_combine_factor = get_odm_config(pipe_ctx, NULL);
1133 if (stream->ctx->dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
1149 if ((odm_combine_factor == 2) || dcn32_is_dp_dig_pixel_rate_div_policy(pipe_ctx))
1160 void dcn32_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx)
1165 if (!pipe_ctx || !pipe_ctx->stream || !pipe_ctx->stream_res.stream_enc)
1168 odm_combine_factor = get_odm_config(pipe_ctx, NULL);
1169 if (optc2_is_two_pixels_per_containter(&pipe_ctx->stream->timing) || odm_combine_factor > 1
1170 || dcn32_is_dp_dig_pixel_rate_div_policy(pipe_ctx))
1173 if (pipe_ctx->stream_res.stream_enc->funcs->set_input_mode)
1174 pipe_ctx->stream_res.stream_enc->funcs->set_input_mode(pipe_ctx->stream_res.stream_enc,
1181 struct pipe_ctx *pipe = NULL;
1185 pipe = &dc->current_state->res_ctx.pipe_ctx[i];
1201 pipe = &dc->current_state->res_ctx.pipe_ctx[i];
1208 void dcn32_unblank_stream(struct pipe_ctx *pipe_ctx,
1212 struct dc_stream_state *stream = pipe_ctx->stream;
1215 struct pipe_ctx *odm_pipe;
1219 for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
1223 params.timing = pipe_ctx->stream->timing;
1227 if (link->dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
1229 pipe_ctx->stream_res.hpo_dp_stream_enc->funcs->dp_unblank(
1230 pipe_ctx->stream_res.hpo_dp_stream_enc,
1231 pipe_ctx->stream_res.tg->inst);
1232 } else if (dc_is_dp_signal(pipe_ctx->stream->signal)) {
1234 || dcn32_is_dp_dig_pixel_rate_div_policy(pipe_ctx)) {
1238 pipe_ctx->stream_res.stream_enc->funcs->dp_set_odm_combine(
1239 pipe_ctx->stream_res.stream_enc, pix_per_cycle > 1);
1240 pipe_ctx->stream_res.stream_enc->funcs->dp_unblank(link, pipe_ctx->stream_res.stream_enc, &params);
1247 bool dcn32_is_dp_dig_pixel_rate_div_policy(struct pipe_ctx *pipe_ctx)
1249 struct dc *dc = pipe_ctx->stream->ctx->dc;
1251 if (!is_h_timing_divisible_by_2(pipe_ctx->stream))
1254 if (dc_is_dp_signal(pipe_ctx->stream->signal) && !dc->link_srv->dp_is_128b_132b_signal(pipe_ctx) &&
1278 struct pipe_ctx *pipe_ctx = NULL;
1283 pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];
1284 if (resource_is_pipe_type(pipe_ctx, OPP_HEAD) && pipe_ctx->stream->link == link) {
1285 pipe_ctx->clock_source->funcs->program_pix_clk(
1286 pipe_ctx->clock_source,
1287 &pipe_ctx->stream_res.pix_clk_params,
1289 &pipe_ctx->link_config.dp_link_settings),
1290 &pipe_ctx->pll_settings);
1334 struct pipe_ctx *phantom_pipe)
1340 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
1365 void dcn32_apply_update_flags_for_phantom(struct pipe_ctx *phantom_pipe)
1446 struct pipe_ctx *pipe_ctx_old =
1447 &dc->current_state->res_ctx.pipe_ctx[i];
1448 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
1459 if (!pipe_ctx->stream || pipe_need_reprogram(pipe_ctx_old, pipe_ctx) ||
1460 (pipe_ctx->stream && dc_state_get_pipe_subvp_type(context, pipe_ctx) != SUBVP_PHANTOM)) {
1480 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
1481 struct pipe_ctx *old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
1498 struct pipe_ctx *pipe_ctx_old =
1499 &dc->current_state->res_ctx.pipe_ctx[i];
1500 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
1502 if (pipe_ctx->stream == NULL)
1505 if (dc_state_get_pipe_subvp_type(context, pipe_ctx) != SUBVP_PHANTOM)
1508 if (pipe_ctx->stream == pipe_ctx_old->stream &&
1509 pipe_ctx->stream->link->link_state_valid) {
1513 if (pipe_ctx_old->stream && !pipe_need_reprogram(pipe_ctx_old, pipe_ctx))
1516 if (pipe_ctx->top_pipe || pipe_ctx->prev_odm_pipe)
1521 pipe_ctx,
1668 const struct pipe_ctx *cur_pipe, *new_pipe;
1672 cur_pipe = &cur_ctx->res_ctx.pipe_ctx[i];
1673 new_pipe = &new_ctx->res_ctx.pipe_ctx[i];
1749 struct pipe_ctx *pipe;
1753 pipe = &context->res_ctx.pipe_ctx[i];