Lines Matching defs:res_ctx

495 		struct resource_context *res_ctx,
502 res_ctx->clock_source_ref_count[i]--;
505 res_ctx->dp_clock_source_ref_count--;
509 struct resource_context *res_ctx,
516 res_ctx->clock_source_ref_count[i]++;
519 res_ctx->dp_clock_source_ref_count++;
523 struct resource_context *res_ctx,
530 return res_ctx->clock_source_ref_count[i];
533 return res_ctx->dp_clock_source_ref_count;
670 struct resource_context *res_ctx,
676 if (is_sharable_clk_src(&res_ctx->pipe_ctx[i], pipe_ctx))
677 return res_ctx->pipe_ctx[i].clock_source;
1437 void resource_build_test_pattern_params(struct resource_context *res_ctx,
1463 odm_cnt = resource_get_opp_heads_for_otg_master(otg_master, res_ctx, opp_heads);
1639 if (context->res_ctx.pipe_ctx[i].plane_state != NULL &&
1640 context->res_ctx.pipe_ctx[i].stream != NULL)
1641 if (!resource_build_scaling_params(&context->res_ctx.pipe_ctx[i]))
1649 struct resource_context *res_ctx,
1686 if (res_ctx->pipe_ctx[preferred_pipe_idx].stream == NULL) {
1687 secondary_pipe = &res_ctx->pipe_ctx[preferred_pipe_idx];
1698 if (res_ctx->pipe_ctx[i].stream == NULL) {
1699 secondary_pipe = &res_ctx->pipe_ctx[i];
1887 struct resource_context *res_ctx,
1893 if (res_ctx->pipe_ctx[i].stream == stream &&
1894 resource_is_pipe_type(&res_ctx->pipe_ctx[i], OTG_MASTER))
1895 return &res_ctx->pipe_ctx[i];
1901 struct resource_context *res_ctx,
1904 struct pipe_ctx *opp_head = &res_ctx->pipe_ctx[otg_master->pipe_idx];
1920 struct resource_context *res_ctx,
1923 struct pipe_ctx *pipe = &res_ctx->pipe_ctx[opp_head->pipe_idx];
1939 struct resource_context *res_ctx,
1946 pipe = &res_ctx->pipe_ctx[j];
2072 pipe_a = &state_a->res_ctx.pipe_ctx[i];
2073 pipe_b = &state_b->res_ctx.pipe_ctx[i];
2209 &state->res_ctx, opp_heads);
2215 &state->res_ctx,
2269 &state->res_ctx, state->streams[stream_idx]);
2281 &state->res_ctx, state->streams[phantom_stream_idx]);
2330 pipe = &context->res_ctx.pipe_ctx[i];
2338 resource_build_test_pattern_params(&context->res_ctx, otg_master);
2353 pipe = &context->res_ctx.pipe_ctx[i];
2361 struct resource_context *res_ctx,
2368 struct pipe_ctx *split_pipe = &res_ctx->pipe_ctx[i];
2396 struct resource_context *res_ctx,
2405 res_ctx->is_stream_enc_acquired[i] = acquired;
2410 struct resource_context *res_ctx,
2419 res_ctx->is_hpo_dp_stream_enc_acquired[i] = acquired;
2424 const struct resource_context *res_ctx,
2429 for (i = 0; i < ARRAY_SIZE(res_ctx->hpo_dp_link_enc_to_link_idx); i++)
2430 if (res_ctx->hpo_dp_link_enc_ref_cnts[i] > 0 &&
2431 res_ctx->hpo_dp_link_enc_to_link_idx[i] == link->link_index)
2437 static inline int find_free_hpo_dp_link_enc(const struct resource_context *res_ctx,
2442 for (i = 0; i < ARRAY_SIZE(res_ctx->hpo_dp_link_enc_ref_cnts); i++)
2443 if (res_ctx->hpo_dp_link_enc_ref_cnts[i] == 0)
2446 return (i < ARRAY_SIZE(res_ctx->hpo_dp_link_enc_ref_cnts) &&
2451 struct resource_context *res_ctx,
2455 res_ctx->hpo_dp_link_enc_to_link_idx[enc_index] = link_index;
2456 res_ctx->hpo_dp_link_enc_ref_cnts[enc_index] = 1;
2460 struct resource_context *res_ctx,
2463 res_ctx->hpo_dp_link_enc_ref_cnts[enc_index]++;
2467 struct resource_context *res_ctx,
2470 ASSERT(res_ctx->hpo_dp_link_enc_ref_cnts[enc_index] > 0);
2471 res_ctx->hpo_dp_link_enc_ref_cnts[enc_index]--;
2474 static bool add_hpo_dp_link_enc_to_ctx(struct resource_context *res_ctx,
2481 enc_index = find_acquired_hpo_dp_link_enc_for_link(res_ctx, stream->link);
2484 retain_hpo_dp_link_enc(res_ctx, enc_index);
2486 enc_index = find_free_hpo_dp_link_enc(res_ctx, pool);
2488 acquire_hpo_dp_link_enc(res_ctx, stream->link->link_index, enc_index);
2497 static void remove_hpo_dp_link_enc_from_ctx(struct resource_context *res_ctx,
2503 enc_index = find_acquired_hpo_dp_link_enc_for_link(res_ctx, stream->link);
2506 release_hpo_dp_link_enc(res_ctx, enc_index);
2525 &context->res_ctx, stream);
2534 &context->res_ctx,
2541 &context->res_ctx, pool,
2545 &context->res_ctx, otg_master, stream);
2549 &context->res_ctx,
2554 resource_unreference_clock_source(&context->res_ctx,
2661 &new_ctx->res_ctx, pool,
2665 sec_pipe = &new_ctx->res_ctx.pipe_ctx[pipe_idx];
2720 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
3014 &new_ctx->res_ctx, stream);
3049 &new_ctx->res_ctx, dpp_pipes);
3159 struct resource_context *res_ctx,
3167 res_ctx->is_audio_acquired[i] = acquired;
3172 struct resource_context *res_ctx,
3179 if (!res_ctx->is_hpo_dp_stream_enc_acquired[i] &&
3190 struct resource_context *res_ctx,
3203 if ((res_ctx->is_audio_acquired[i] == false) && (res_ctx->is_stream_enc_acquired[i] == true)) {
3212 if ((id < available_audio_count) && (res_ctx->is_audio_acquired[id] == false)) {
3217 if (res_ctx->is_audio_acquired[i] == false) {
3291 struct resource_context *res_ctx,
3324 if (!res_ctx->pipe_ctx[tg_inst].stream) {
3325 struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[tg_inst];
3344 pipe_ctx = &res_ctx->pipe_ctx[id_src[i]];
3388 res_ctx->pipe_ctx[id_src[0]].next_odm_pipe = &res_ctx->pipe_ctx[id_src[1]];
3389 res_ctx->pipe_ctx[id_src[0]].prev_odm_pipe = NULL;
3390 res_ctx->pipe_ctx[id_src[1]].next_odm_pipe = NULL;
3391 res_ctx->pipe_ctx[id_src[1]].prev_odm_pipe = &res_ctx->pipe_ctx[id_src[0]];
3463 &cur_ctx->res_ctx, &new_ctx->res_ctx, pool);
3470 &cur_ctx->res_ctx, &new_ctx->res_ctx, pool);
3478 &cur_ctx->res_ctx, &new_ctx->res_ctx, pool);
3480 pipe_idx = resource_find_any_free_pipe(&new_ctx->res_ctx, pool);
3482 pipe_ctx = &new_ctx->res_ctx.pipe_ctx[pipe_idx];
3504 pipe_idx = acquire_first_split_pipe(&new_ctx->res_ctx, pool, stream);
3528 &context->res_ctx,
3543 pipe_ctx = resource_get_otg_master_for_stream(&context->res_ctx, stream);
3550 &context->res_ctx, pool, stream);
3556 &context->res_ctx, pool,
3570 &context->res_ctx, pool, stream);
3576 &context->res_ctx, pool,
3579 if (!add_hpo_dp_link_enc_to_ctx(&context->res_ctx, pool, pipe_ctx, stream))
3589 &context->res_ctx, pool, pipe_ctx->stream_res.stream_enc->id, dc_ctx->dce_version);
3597 update_audio_usage(&context->res_ctx, pool,
3926 struct pipe_ctx *pipe_ctx = &new_ctx->res_ctx.pipe_ctx[j];
3947 &new_ctx->res_ctx,
3953 &new_ctx->res_ctx,
4366 struct resource_context *res_ctx,
4372 if (res_ctx->clock_source_ref_count[i] == 0)
4431 &context->res_ctx, stream);
4444 &context->res_ctx,
4450 &context->res_ctx,
4458 &context->res_ctx, pool,
4775 const struct resource_context *res_ctx,
4782 enc_index = find_acquired_hpo_dp_link_enc_for_link(res_ctx, link);
4785 enc_index = find_free_hpo_dp_link_enc(res_ctx, pool);
4798 const struct resource_context *res_ctx = &dc->current_state->res_ctx;
4803 link_res->hpo_dp_link_enc = get_temp_hpo_dp_link_enc(res_ctx,
4819 pipe_ctx_old = &dc->current_state->res_ctx.pipe_ctx[i];
4820 pipe_ctx = &context->res_ctx.pipe_ctx[i];
4830 pipe_ctx_syncd = &context->res_ctx.pipe_ctx[j];
4846 pipe_ctx = &context->res_ctx.pipe_ctx[disabled_master_pipe_idx];
4853 pipe_ctx_check = &context->res_ctx.pipe_ctx[i];
4882 pipe_ctx_reset = &context->res_ctx.pipe_ctx[i];
5030 dcn20_acquire_dsc(dc, &state->res_ctx, &sec_pipe->stream_res.dsc, pipe_idx);
5052 &context->res_ctx, dc->res_pool, pipe_ctx->stream);
5058 &context->res_ctx, dc->res_pool,
5064 if (!add_hpo_dp_link_enc_to_ctx(&context->res_ctx, dc->res_pool, pipe_ctx, pipe_ctx->stream))
5070 &context->res_ctx, dc->res_pool,
5076 remove_hpo_dp_link_enc_from_ctx(&context->res_ctx, pipe_ctx, pipe_ctx->stream);