Skip to content

Commit a01b64f

Browse files
Swapnil Patelalexdeucher
authored andcommitted
drm/amd/display: Add dtbclk access to dcn315
[Why & How] Currently DCN315 clk manager is missing code to enable/disable dtbclk. Because of this, "optimized_required" flag is constantly set and this prevents FreeSync from engaging for certain high bandwidth display Modes which require DTBCLK. Reviewed-by: Dmytro Laktyushkin <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Swapnil Patel <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent be53bd4 commit a01b64f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
145145
*/
146146
clk_mgr_base->clks.zstate_support = new_clocks->zstate_support;
147147
if (safe_to_lower) {
148+
if (clk_mgr_base->clks.dtbclk_en && !new_clocks->dtbclk_en) {
149+
dcn315_smu_set_dtbclk(clk_mgr, false);
150+
clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
151+
}
148152
/* check that we're not already in lower */
149153
if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_LOW_POWER) {
150154
display_count = dcn315_get_active_display_cnt_wa(dc, context);
@@ -160,6 +164,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
160164
}
161165
}
162166
} else {
167+
if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) {
168+
dcn315_smu_set_dtbclk(clk_mgr, true);
169+
clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
170+
}
163171
/* check that we're not already in D0 */
164172
if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_MISSION_MODE) {
165173
union display_idle_optimization_u idle_info = { 0 };

0 commit comments

Comments
 (0)