Commit dcc2527d authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

drm/amd/display: increase dcn315 pstate change latency

[Why & How]
Update after new measurment came in
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 20c6168b
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
#define TO_CLK_MGR_DCN315(clk_mgr)\ #define TO_CLK_MGR_DCN315(clk_mgr)\
container_of(clk_mgr, struct clk_mgr_dcn315, base) container_of(clk_mgr, struct clk_mgr_dcn315, base)
#define UNSUPPORTED_DCFCLK 10000000
#define MIN_DPP_DISP_CLK 100000
static int dcn315_get_active_display_cnt_wa( static int dcn315_get_active_display_cnt_wa(
struct dc *dc, struct dc *dc,
struct dc_state *context) struct dc_state *context)
...@@ -147,6 +150,9 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base, ...@@ -147,6 +150,9 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
} }
} }
/* Lock pstate by requesting unsupported dcfclk if change is unsupported */
if (!new_clocks->p_state_change_support)
new_clocks->dcfclk_khz = UNSUPPORTED_DCFCLK;
if (should_set_clock(safe_to_lower, new_clocks->dcfclk_khz, clk_mgr_base->clks.dcfclk_khz)) { if (should_set_clock(safe_to_lower, new_clocks->dcfclk_khz, clk_mgr_base->clks.dcfclk_khz)) {
clk_mgr_base->clks.dcfclk_khz = new_clocks->dcfclk_khz; clk_mgr_base->clks.dcfclk_khz = new_clocks->dcfclk_khz;
dcn315_smu_set_hard_min_dcfclk(clk_mgr, clk_mgr_base->clks.dcfclk_khz); dcn315_smu_set_hard_min_dcfclk(clk_mgr, clk_mgr_base->clks.dcfclk_khz);
...@@ -160,10 +166,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base, ...@@ -160,10 +166,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow. // workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow.
if (!IS_DIAG_DC(dc->ctx->dce_environment)) { if (!IS_DIAG_DC(dc->ctx->dce_environment)) {
if (new_clocks->dppclk_khz < 100000) if (new_clocks->dppclk_khz < MIN_DPP_DISP_CLK)
new_clocks->dppclk_khz = 100000; new_clocks->dppclk_khz = MIN_DPP_DISP_CLK;
if (new_clocks->dispclk_khz < 100000) if (new_clocks->dispclk_khz < MIN_DPP_DISP_CLK)
new_clocks->dispclk_khz = 100000; new_clocks->dispclk_khz = MIN_DPP_DISP_CLK;
} }
if (should_set_clock(safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) { if (should_set_clock(safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) {
...@@ -276,7 +282,7 @@ static struct wm_table ddr5_wm_table = { ...@@ -276,7 +282,7 @@ static struct wm_table ddr5_wm_table = {
{ {
.wm_inst = WM_A, .wm_inst = WM_A,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 64.0, .pstate_latency_us = 129.0,
.sr_exit_time_us = 11.5, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 14.5, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
...@@ -284,7 +290,7 @@ static struct wm_table ddr5_wm_table = { ...@@ -284,7 +290,7 @@ static struct wm_table ddr5_wm_table = {
{ {
.wm_inst = WM_B, .wm_inst = WM_B,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 64.0, .pstate_latency_us = 129.0,
.sr_exit_time_us = 11.5, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 14.5, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
...@@ -292,7 +298,7 @@ static struct wm_table ddr5_wm_table = { ...@@ -292,7 +298,7 @@ static struct wm_table ddr5_wm_table = {
{ {
.wm_inst = WM_C, .wm_inst = WM_C,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 64.0, .pstate_latency_us = 129.0,
.sr_exit_time_us = 11.5, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 14.5, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
...@@ -300,7 +306,7 @@ static struct wm_table ddr5_wm_table = { ...@@ -300,7 +306,7 @@ static struct wm_table ddr5_wm_table = {
{ {
.wm_inst = WM_D, .wm_inst = WM_D,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 64.0, .pstate_latency_us = 129.0,
.sr_exit_time_us = 11.5, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 14.5, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
......
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