Commit 1dbac201 authored by Yongqiang Sun's avatar Yongqiang Sun Committed by Alex Deucher

drm/amd/display: Added disconnect dchub.

Add disable ttu interface to dcn10, when remove
mpc, disable ttu as well.
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 d75aee4b
...@@ -56,6 +56,14 @@ void hubp1_set_blank(struct hubp *hubp, bool blank) ...@@ -56,6 +56,14 @@ void hubp1_set_blank(struct hubp *hubp, bool blank)
} }
} }
static void hubp1_disconnect(struct hubp *hubp)
{
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
REG_UPDATE(DCHUBP_CNTL,
HUBP_TTU_DISABLE, 1);
}
static void hubp1_set_hubp_blank_en(struct hubp *hubp, bool blank) static void hubp1_set_hubp_blank_en(struct hubp *hubp, bool blank)
{ {
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp); struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
...@@ -933,6 +941,7 @@ static struct hubp_funcs dcn10_hubp_funcs = { ...@@ -933,6 +941,7 @@ static struct hubp_funcs dcn10_hubp_funcs = {
.set_hubp_blank_en = hubp1_set_hubp_blank_en, .set_hubp_blank_en = hubp1_set_hubp_blank_en,
.set_cursor_attributes = hubp1_cursor_set_attributes, .set_cursor_attributes = hubp1_cursor_set_attributes,
.set_cursor_position = hubp1_cursor_set_position, .set_cursor_position = hubp1_cursor_set_position,
.hubp_disconnect = hubp1_disconnect,
}; };
/*****************************************/ /*****************************************/
......
...@@ -2019,6 +2019,7 @@ static void dcn10_apply_ctx_for_surface( ...@@ -2019,6 +2019,7 @@ static void dcn10_apply_ctx_for_surface(
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i]; struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
struct pipe_ctx *old_pipe_ctx = struct pipe_ctx *old_pipe_ctx =
&dc->current_state->res_ctx.pipe_ctx[i]; &dc->current_state->res_ctx.pipe_ctx[i];
struct hubp *hubp = dc->res_pool->hubps[i];
if (!pipe_ctx->plane_state && !old_pipe_ctx->plane_state) if (!pipe_ctx->plane_state && !old_pipe_ctx->plane_state)
continue; continue;
...@@ -2067,6 +2068,9 @@ static void dcn10_apply_ctx_for_surface( ...@@ -2067,6 +2068,9 @@ static void dcn10_apply_ctx_for_surface(
"[debug_mpo: apply_ctx disconnect pending on mpcc %d]\n", "[debug_mpo: apply_ctx disconnect pending on mpcc %d]\n",
old_pipe_ctx->mpcc->inst);*/ old_pipe_ctx->mpcc->inst);*/
if (hubp->funcs->hubp_disconnect)
hubp->funcs->hubp_disconnect(hubp);
if (dc->debug.sanity_checks) if (dc->debug.sanity_checks)
verify_allow_pstate_change_high(dc->hwseq); verify_allow_pstate_change_high(dc->hwseq);
......
...@@ -100,6 +100,8 @@ struct hubp_funcs { ...@@ -100,6 +100,8 @@ struct hubp_funcs {
const struct dc_cursor_position *pos, const struct dc_cursor_position *pos,
const struct dc_cursor_mi_param *param); const struct dc_cursor_mi_param *param);
void (*hubp_disconnect)(struct hubp *hubp);
}; };
#endif #endif
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