if (!dcb->funcs->is_accelerated_mode(dcb))
core_dc->hwss.enable_accelerated_mode(core_dc);
+ for (i = 0; i < core_dc->res_pool->pipe_count; i++) {
+ pipe = &context->res_ctx.pipe_ctx[i];
+ core_dc->hwss.wait_for_mpcc_disconnect(core_dc->res_pool, pipe);
+ }
result = core_dc->hwss.apply_ctx_to_hw(core_dc, context);
program_timing_sync(core_dc, context);
}
}
+ if (update_type > UPDATE_TYPE_FAST) {
+ for (i = 0; i < surface_count; i++) {
+ struct core_surface *surface = DC_SURFACE_TO_CORE(srf_updates[i].surface);
+
+ for (j = 0; j < core_dc->res_pool->pipe_count; j++) {
+ struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];
+
+ if (pipe_ctx->surface != surface)
+ continue;
+
+ core_dc->hwss.wait_for_mpcc_disconnect(core_dc->res_pool, pipe_ctx);
+ }
+ }
+ }
+
if (surface_count == 0)
core_dc->hwss.apply_ctx_for_surface(core_dc, NULL, context);
mpcc_cfg.bot_mpcc_id = 0xf;
mpcc_cfg.top_of_tree = !old_pipe_ctx->top_pipe;
old_pipe_ctx->mpcc->funcs->set(old_pipe_ctx->mpcc, &mpcc_cfg);
+ old_pipe_ctx->top_pipe->opp->mpcc_disconnect_pending[old_pipe_ctx->mpcc->inst] = true;
if (dc->public.debug.sanity_checks)
verify_allow_pstate_change_high(dc->hwseq);
*/
}
+static void dcn10_wait_for_mpcc_disconnect(struct resource_pool *res_pool, struct pipe_ctx *pipe_ctx)
+{
+ int i;
+ for (i = 0; i < MAX_PIPES; i++) {
+ if (!pipe_ctx->opp || !pipe_ctx->mpcc)
+ continue;
+
+ if (pipe_ctx->opp->mpcc_disconnect_pending[i]) {
+ pipe_ctx->mpcc->funcs->wait_for_idle(res_pool->mpcc[i]);
+ pipe_ctx->opp->mpcc_disconnect_pending[i] = false;
+ }
+ }
+}
+
static bool dcn10_dummy_display_power_gating(
struct core_dc *dc,
uint8_t controller_id,
.set_static_screen_control = set_static_screen_control,
.setup_stereo = dcn10_setup_stereo,
.set_avmute = dce110_set_avmute,
- .log_hw_state = dcn10_log_hw_state
+ .log_hw_state = dcn10_log_hw_state,
+ .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect
};
const struct dcn10_opp_shift *opp_shift,
const struct dcn10_opp_mask *opp_mask)
{
+ int i;
oppn10->base.ctx = ctx;
oppn10->base.inst = inst;
oppn10->base.funcs = &dcn10_opp_funcs;
+ for (i = 0; i < MAX_PIPES; i++)
+ oppn10->base.mpcc_disconnect_pending[i] = false;
+
oppn10->regs = regs;
oppn10->opp_shift = opp_shift;
oppn10->opp_mask = opp_mask;
struct core_stream;
-#define MAX_PIPES 6
#define MAX_CLOCK_SOURCES 7
-
/********* core_surface **********/
#define DC_SURFACE_TO_CORE(dc_surface) \
container_of(dc_surface, struct core_surface, public)
/******************************************************************************
* Data types shared between different Virtual HW blocks
******************************************************************************/
+
+#define MAX_PIPES 6
+
struct gamma_curve {
uint32_t offset;
uint32_t segments_num;
struct dc_context *ctx;
uint32_t inst;
struct pwl_params regamma_params;
+ bool mpcc_disconnect_pending[MAX_PIPES];
const struct opp_funcs *funcs;
};
void (*set_avmute)(struct pipe_ctx *pipe_ctx, bool enable);
void (*log_hw_state)(struct core_dc *dc);
+
+ void (*wait_for_mpcc_disconnect)(struct resource_pool *res_pool, struct pipe_ctx *pipe_ctx);
};
void color_space_to_black_color(