Skip to content

Commit 0d57dd1

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Add more checks for DSC / HUBP ONO guarantees
[WHY] For non-zero DSC instances it's possible that the HUBP domain required to drive it for sequential ONO ASICs isn't met, potentially causing the logic to the tile to enter an undefined state leading to a system hang. [HOW] Add more checks to ensure that the HUBP domain matching the DSC instance is appropriately powered. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Duncan Ma <duncan.ma@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit da63df0) Cc: stable@vger.kernel.org
1 parent d358a51 commit 0d57dd1

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,15 @@ void dcn35_calc_blocks_to_gate(struct dc *dc, struct dc_state *context,
10471047
if (dc->caps.sequential_ono) {
10481048
update_state->pg_pipe_res_update[PG_HUBP][pipe_ctx->stream_res.dsc->inst] = false;
10491049
update_state->pg_pipe_res_update[PG_DPP][pipe_ctx->stream_res.dsc->inst] = false;
1050+
1051+
/* All HUBP/DPP instances must be powered if the DSC inst != HUBP inst */
1052+
if (!pipe_ctx->top_pipe && pipe_ctx->plane_res.hubp &&
1053+
pipe_ctx->plane_res.hubp->inst != pipe_ctx->stream_res.dsc->inst) {
1054+
for (j = 0; j < dc->res_pool->pipe_count; ++j) {
1055+
update_state->pg_pipe_res_update[PG_HUBP][j] = false;
1056+
update_state->pg_pipe_res_update[PG_DPP][j] = false;
1057+
}
1058+
}
10501059
}
10511060
}
10521061

@@ -1193,6 +1202,25 @@ void dcn35_calc_blocks_to_ungate(struct dc *dc, struct dc_state *context,
11931202
update_state->pg_pipe_res_update[PG_HDMISTREAM][0] = true;
11941203

11951204
if (dc->caps.sequential_ono) {
1205+
for (i = 0; i < dc->res_pool->pipe_count; i++) {
1206+
struct pipe_ctx *new_pipe = &context->res_ctx.pipe_ctx[i];
1207+
1208+
if (new_pipe->stream_res.dsc && !new_pipe->top_pipe &&
1209+
update_state->pg_pipe_res_update[PG_DSC][new_pipe->stream_res.dsc->inst]) {
1210+
update_state->pg_pipe_res_update[PG_HUBP][new_pipe->stream_res.dsc->inst] = true;
1211+
update_state->pg_pipe_res_update[PG_DPP][new_pipe->stream_res.dsc->inst] = true;
1212+
1213+
/* All HUBP/DPP instances must be powered if the DSC inst != HUBP inst */
1214+
if (new_pipe->plane_res.hubp &&
1215+
new_pipe->plane_res.hubp->inst != new_pipe->stream_res.dsc->inst) {
1216+
for (j = 0; j < dc->res_pool->pipe_count; ++j) {
1217+
update_state->pg_pipe_res_update[PG_HUBP][j] = true;
1218+
update_state->pg_pipe_res_update[PG_DPP][j] = true;
1219+
}
1220+
}
1221+
}
1222+
}
1223+
11961224
for (i = dc->res_pool->pipe_count - 1; i >= 0; i--) {
11971225
if (update_state->pg_pipe_res_update[PG_HUBP][i] &&
11981226
update_state->pg_pipe_res_update[PG_DPP][i]) {

0 commit comments

Comments
 (0)