union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
- bool horizontal_mirror,
- bool visible)
+ bool horizontal_mirror)
{
REG_UPDATE(GRPH_ENABLE, GRPH_ENABLE, 1);
union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
- bool horizontal_mirror,
- bool visible);
+ bool horizontal_mirror);
void dce_mem_input_allocate_dmif(struct mem_input *mi,
uint32_t h_total,
&surface->public.plane_size,
surface->public.rotation,
NULL,
- false,
- pipe_ctx->surface->public.visible);
+ false);
+ if (mi->funcs->set_blank)
+ mi->funcs->set_blank(mi, pipe_ctx->surface->public.visible);
if (dc->public.config.gpu_vm_support)
mi->funcs->mem_input_program_pte_vm(
&surface->public.plane_size,
surface->public.rotation,
NULL,
- false,
- pipe_ctx->surface->public.visible);
+ false);
+ if (mi->funcs->set_blank)
+ mi->funcs->set_blank(mi, pipe_ctx->surface->public.visible);
if (dc->public.config.gpu_vm_support)
mi->funcs->mem_input_program_pte_vm(
union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
- bool horizotal_mirror,
- bool visible)
+ bool horizotal_mirror)
{
struct dce110_mem_input *mem_input110 = TO_DCE110_MEM_INPUT(mem_input);
unlock_master_tg_and_wait(dc->ctx, pipe_ctx->tg->inst);
- pipe_ctx->mi->funcs->disable_request(pipe_ctx->mi);
+ pipe_ctx->mi->funcs->set_blank(pipe_ctx->mi, true);
wait_no_outstanding_request(dc->ctx, pipe_ctx->pipe_idx);
pipe_ctx->xfm->funcs->transform_set_gamut_remap(pipe_ctx->xfm, &adjust);
}
+static bool is_lower_pipe_tree_visible(struct pipe_ctx *pipe_ctx)
+{
+ if (pipe_ctx->surface->public.visible)
+ return true;
+ if (pipe_ctx->bottom_pipe && is_lower_pipe_tree_visible(pipe_ctx->bottom_pipe))
+ return true;
+ return false;
+}
+
+static bool is_upper_pipe_tree_visible(struct pipe_ctx *pipe_ctx)
+{
+ if (pipe_ctx->surface->public.visible)
+ return true;
+ if (pipe_ctx->top_pipe && is_upper_pipe_tree_visible(pipe_ctx->top_pipe))
+ return true;
+ return false;
+}
+
+static bool is_pipe_tree_visible(struct pipe_ctx *pipe_ctx)
+{
+ if (pipe_ctx->surface->public.visible)
+ return true;
+ if (pipe_ctx->top_pipe && is_upper_pipe_tree_visible(pipe_ctx->top_pipe))
+ return true;
+ if (pipe_ctx->bottom_pipe && is_lower_pipe_tree_visible(pipe_ctx->bottom_pipe))
+ return true;
+ return false;
+}
+
static void update_dchubp_dpp(
struct core_dc *dc,
struct pipe_ctx *pipe_ctx,
&size,
surface->public.rotation,
&surface->public.dcc,
- surface->public.horizontal_mirror,
- surface->public.visible);
-
- /* Only support one plane for now. */
- pipe_ctx->tg->funcs->set_blank(pipe_ctx->tg, !surface->public.visible);
+ surface->public.horizontal_mirror);
+ mi->funcs->set_blank(mi, !is_pipe_tree_visible(pipe_ctx));
}
static void program_all_pipe_in_tree(
pipe_ctx->tg->funcs->program_global_sync(
pipe_ctx->tg);
+ pipe_ctx->tg->funcs->set_blank(pipe_ctx->tg, !is_pipe_tree_visible(pipe_ctx));
update_dchubp_dpp(dc, pipe_ctx, context);
+
+ /* Only support one plane for now. */
}
if (pipe_ctx->bottom_pipe != NULL)
#define FN(reg_name, field_name) \
mi->mi_shift->field_name, mi->mi_mask->field_name
-static void set_blank(struct dcn10_mem_input *mi, bool blank)
+static void dcn_mi_set_blank(struct mem_input *mem_input, bool blank)
{
+ struct dcn10_mem_input *mi = TO_DCN10_MEM_INPUT(mem_input);
uint32_t blank_en = blank ? 1 : 0;
REG_UPDATE_2(DCHUBP_CNTL,
HUBP_TTU_DISABLE, blank_en);
}
-
-static void disable_request(struct mem_input *mem_input)
-{
- struct dcn10_mem_input *mi = TO_DCN10_MEM_INPUT(mem_input);
-
- /* To disable the requestors, set blank_en to 1 */
- set_blank(mi, true);
-}
-
static void vready_workaround(struct mem_input *mem_input,
struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest)
{
union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
- bool horizontal_mirror,
- bool visible)
+ bool horizontal_mirror)
{
struct dcn10_mem_input *mi = TO_DCN10_MEM_INPUT(mem_input);
program_size_and_rotation(
mi, rotation, format, plane_size, dcc, horizontal_mirror);
program_pixel_format(mi, format);
-
- set_blank(mi, !visible);
}
static void program_requestor(
/* otg is locked when this func is called. Register are double buffered.
* disable the requestors is not needed
*/
- /* disable_request(mem_input); */
program_requestor(mem_input, rq_regs);
program_deadline(mem_input, dlg_attr, ttu_attr);
vready_workaround(mem_input, pipe_dest);
.mem_input_program_display_marks = mem_input_program_display_marks,
.allocate_mem_input = NULL,
.free_mem_input = NULL,
- .disable_request = disable_request,
.mem_input_program_surface_flip_and_addr =
mem_input_program_surface_flip_and_addr,
.mem_input_program_surface_config =
.program_watermarks = program_watermarks,
.mem_input_update_dchub = mem_input_update_dchub,
.mem_input_program_pte_vm = dcn_mem_input_program_pte_vm,
+ .set_blank = dcn_mi_set_blank,
};
struct _vcs_dpi_display_ttu_regs_st *ttu_regs,
struct _vcs_dpi_display_rq_regs_st *rq_regs,
struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest);
-
- void (*disable_request)(struct mem_input *mem_input);
-
#endif
void (*mem_input_program_display_marks)(
union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
- bool horizontal_mirror,
- bool visible);
+ bool horizontal_mirror);
bool (*mem_input_is_flip_pending)(struct mem_input *mem_input);
void (*mem_input_update_dchub)(struct mem_input *mem_input,
struct dchub_init_data *dh_data);
+
+ void (*set_blank)(struct mem_input *mi, bool blank);
};
#endif