Skip to content

Commit e01f07c

Browse files
LoAnChenalexdeucher
authored andcommitted
drm/amd/display: Fix seamless boot sequence
[WHY] When the system powers up eDP with external monitors in seamless boot sequence, stutter get enabled before TTU and HUBP registers being programmed, which resulting in underflow. [HOW] Enable TTU in hubp_init. Change the sequence that do not perpare_bandwidth and optimize_bandwidth while having seamless boot streams. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Lo-an Chen <[email protected]> Signed-off-by: Paul Hsieh <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8adbb2a commit e01f07c

File tree

8 files changed

+15
-6
lines changed

8 files changed

+15
-6
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
21332133

21342134
dc_enable_stereo(dc, context, dc_streams, context->stream_count);
21352135

2136-
if (context->stream_count > get_seamless_boot_stream_count(context) ||
2136+
if (get_seamless_boot_stream_count(context) == 0 ||
21372137
context->stream_count == 0) {
21382138
/* Must wait for no flips to be pending before doing optimize bw */
21392139
hwss_wait_for_no_pipes_pending(dc, context);

drivers/gpu/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ bool hubbub3_program_watermarks(
129129
REG_UPDATE(DCHUBBUB_ARB_DF_REQ_OUTSTAND,
130130
DCHUBBUB_ARB_MIN_REQ_OUTSTAND, 0x1FF);
131131

132-
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
132+
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
133+
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
133134

134135
return wm_pending;
135136
}

drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ static bool hubbub31_program_watermarks(
750750
REG_UPDATE(DCHUBBUB_ARB_DF_REQ_OUTSTAND,
751751
DCHUBBUB_ARB_MIN_REQ_OUTSTAND, 0x1FF);*/
752752

753-
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
753+
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
754+
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
754755
return wm_pending;
755756
}
756757

drivers/gpu/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ static bool hubbub32_program_watermarks(
786786
REG_UPDATE(DCHUBBUB_ARB_DF_REQ_OUTSTAND,
787787
DCHUBBUB_ARB_MIN_REQ_OUTSTAND, 0x1FF);*/
788788

789-
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
789+
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
790+
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
790791

791792
hubbub32_force_usr_retraining_allow(hubbub, hubbub->ctx->dc->debug.force_usr_allow);
792793

drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ static bool hubbub35_program_watermarks(
326326
DCHUBBUB_ARB_MIN_REQ_OUTSTAND_COMMIT_THRESHOLD, 0xA);/*hw delta*/
327327
REG_UPDATE(DCHUBBUB_ARB_HOSTVM_CNTL, DCHUBBUB_ARB_MAX_QOS_COMMIT_THRESHOLD, 0xF);
328328

329-
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
329+
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
330+
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
330331

331332
hubbub32_force_usr_retraining_allow(hubbub, hubbub->ctx->dc->debug.force_usr_allow);
332333

drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ void hubp3_init(struct hubp *hubp)
500500
//hubp[i].HUBPREQ_DEBUG.HUBPREQ_DEBUG[26] = 1;
501501
REG_WRITE(HUBPREQ_DEBUG, 1 << 26);
502502

503+
REG_UPDATE(DCHUBP_CNTL, HUBP_TTU_DISABLE, 0);
504+
503505
hubp_reset(hubp);
504506
}
505507

drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ void hubp32_init(struct hubp *hubp)
168168
{
169169
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
170170
REG_WRITE(HUBPREQ_DEBUG_DB, 1 << 8);
171+
172+
REG_UPDATE(DCHUBP_CNTL, HUBP_TTU_DISABLE, 0);
171173
}
172174
static struct hubp_funcs dcn32_hubp_funcs = {
173175
.hubp_enable_tripleBuffer = hubp2_enable_triplebuffer,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ void dcn35_init_hw(struct dc *dc)
236236
}
237237

238238
hws->funcs.init_pipes(dc, dc->current_state);
239-
if (dc->res_pool->hubbub->funcs->allow_self_refresh_control)
239+
if (dc->res_pool->hubbub->funcs->allow_self_refresh_control &&
240+
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter)
240241
dc->res_pool->hubbub->funcs->allow_self_refresh_control(dc->res_pool->hubbub,
241242
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
242243
}

0 commit comments

Comments
 (0)