Skip to content

Commit eab8e58

Browse files
Roman Ligregkh
authored andcommitted
drm/amd/display: Enable power gating before init_pipes
[ Upstream commit 58e16c7 ] [Why] In init_hw() we call init_pipes() before enabling power gating. init_pipes() tries to power gate dsc but it may fail because required force-ons are not released yet. As a result with dsc config the following errors observed on resume: "REG_WAIT timeout 1us * 1000 tries - dcn20_dsc_pg_control" "REG_WAIT timeout 1us * 1000 tries - dcn20_dpp_pg_control" "REG_WAIT timeout 1us * 1000 tries - dcn20_hubp_pg_control" [How] Move enable_power_gating_plane() before init_pipes() in init_hw() Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Reviewed-by: Eric Yang <Eric.Yang2@amd.com> Acked-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Roman Li <Roman.Li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d8860f1 commit eab8e58

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,9 @@ void dcn10_init_hw(struct dc *dc)
14391439
}
14401440
}
14411441

1442+
if (hws->funcs.enable_power_gating_plane)
1443+
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
1444+
14421445
/* If taking control over from VBIOS, we may want to optimize our first
14431446
* mode set, so we need to skip powering down pipes until we know which
14441447
* pipes we want to use.
@@ -1491,8 +1494,6 @@ void dcn10_init_hw(struct dc *dc)
14911494

14921495
REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
14931496
}
1494-
if (hws->funcs.enable_power_gating_plane)
1495-
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
14961497

14971498
if (dc->clk_mgr->funcs->notify_wm_ranges)
14981499
dc->clk_mgr->funcs->notify_wm_ranges(dc->clk_mgr);

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@ void dcn30_init_hw(struct dc *dc)
570570
}
571571
}
572572

573+
if (hws->funcs.enable_power_gating_plane)
574+
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
575+
573576
/* If taking control over from VBIOS, we may want to optimize our first
574577
* mode set, so we need to skip powering down pipes until we know which
575578
* pipes we want to use.
@@ -647,8 +650,6 @@ void dcn30_init_hw(struct dc *dc)
647650

648651
REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
649652
}
650-
if (hws->funcs.enable_power_gating_plane)
651-
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
652653

653654
if (!dcb->funcs->is_accelerated_mode(dcb) && dc->res_pool->hubbub->funcs->init_watermarks)
654655
dc->res_pool->hubbub->funcs->init_watermarks(dc->res_pool->hubbub);

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ void dcn31_init_hw(struct dc *dc)
204204
}
205205
}
206206

207+
if (hws->funcs.enable_power_gating_plane)
208+
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
209+
207210
/* If taking control over from VBIOS, we may want to optimize our first
208211
* mode set, so we need to skip powering down pipes until we know which
209212
* pipes we want to use.
@@ -287,8 +290,6 @@ void dcn31_init_hw(struct dc *dc)
287290

288291
REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
289292
}
290-
if (hws->funcs.enable_power_gating_plane)
291-
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
292293

293294
if (!dcb->funcs->is_accelerated_mode(dcb) && dc->res_pool->hubbub->funcs->init_watermarks)
294295
dc->res_pool->hubbub->funcs->init_watermarks(dc->res_pool->hubbub);

0 commit comments

Comments
 (0)