Commit 4c6e7598 authored by Yongqiang Sun's avatar Yongqiang Sun Committed by Alex Deucher

drm/amd/display: disable dcc when reset front end.

Signed-off-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9edba557
...@@ -825,6 +825,8 @@ static void reset_front_end_for_pipe( ...@@ -825,6 +825,8 @@ static void reset_front_end_for_pipe(
if (!pipe_ctx->surface) if (!pipe_ctx->surface)
return; return;
pipe_ctx->mi->funcs->dcc_control(pipe_ctx->mi, false, false);
lock_otg_master_update(dc->ctx, pipe_ctx->tg->inst); lock_otg_master_update(dc->ctx, pipe_ctx->tg->inst);
/* TODO: build stream pipes group id. For now, use stream otg /* TODO: build stream pipes group id. For now, use stream otg
......
...@@ -369,16 +369,22 @@ static bool mem_input_program_surface_flip_and_addr( ...@@ -369,16 +369,22 @@ static bool mem_input_program_surface_flip_and_addr(
return true; return true;
} }
static void program_control(struct dcn10_mem_input *mi, static void dcc_control(struct mem_input *mem_input, bool enable,
struct dc_plane_dcc_param *dcc) bool independent_64b_blks)
{ {
uint32_t dcc_en = dcc->enable ? 1 : 0; uint32_t dcc_en = enable ? 1 : 0;
uint32_t dcc_ind_64b_blk = dcc->grph.independent_64b_blks ? 1 : 0; uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0;
struct dcn10_mem_input *mi = TO_DCN10_MEM_INPUT(mem_input);
REG_UPDATE_2(DCSURF_SURFACE_CONTROL, REG_UPDATE_2(DCSURF_SURFACE_CONTROL,
PRIMARY_SURFACE_DCC_EN, dcc_en, PRIMARY_SURFACE_DCC_EN, dcc_en,
PRIMARY_SURFACE_DCC_IND_64B_BLK, dcc_ind_64b_blk); PRIMARY_SURFACE_DCC_IND_64B_BLK, dcc_ind_64b_blk);
}
static void program_control(struct dcn10_mem_input *mi,
struct dc_plane_dcc_param *dcc)
{
dcc_control(&mi->base, dcc->enable, dcc->grph.independent_64b_blks);
} }
static void mem_input_program_surface_config( static void mem_input_program_surface_config(
...@@ -1072,6 +1078,7 @@ static struct mem_input_funcs dcn10_mem_input_funcs = { ...@@ -1072,6 +1078,7 @@ static struct mem_input_funcs dcn10_mem_input_funcs = {
.mem_input_update_dchub = mem_input_update_dchub, .mem_input_update_dchub = mem_input_update_dchub,
.mem_input_program_pte_vm = dcn_mem_input_program_pte_vm, .mem_input_program_pte_vm = dcn_mem_input_program_pte_vm,
.set_blank = dcn_mi_set_blank, .set_blank = dcn_mi_set_blank,
.dcc_control = dcc_control,
}; };
......
...@@ -86,6 +86,9 @@ struct mem_input_funcs { ...@@ -86,6 +86,9 @@ struct mem_input_funcs {
struct _vcs_dpi_display_ttu_regs_st *ttu_regs, struct _vcs_dpi_display_ttu_regs_st *ttu_regs,
struct _vcs_dpi_display_rq_regs_st *rq_regs, struct _vcs_dpi_display_rq_regs_st *rq_regs,
struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest); struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest);
void (*dcc_control)(struct mem_input *mem_input, bool enable,
bool independent_64b_blks);
#endif #endif
void (*mem_input_program_display_marks)( void (*mem_input_program_display_marks)(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment