Commit 6ba5a269 authored by Alvin Lee's avatar Alvin Lee Committed by Alex Deucher

drm/amd/display: Update vactive margin and max vblank for fpo + vactive

[Description]
- Some 1920x1080@60hz displays have VBLANK time > 600us which we
  still want to accept for FPO + Vactive configs based on testing
	- Increase max VBLANK time to 1000us to allow these configs
	  for FPO + Vactive
- Increase minimum vactive switch margin for FPO + Vactive to 200us
	- Based on testing, 1920x1080@120hz can have a switch margin
	  of ~160us which requires significantly longer FPO stretch
	  margin (5ms) which we don't want to accept for now
- Also move margins into debug option
Reviewed-by: default avatarJun Lei <jun.lei@amd.com>
Reviewed-by: default avatarNevenko Stupar <nevenko.stupar@amd.com>
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1d8355ad
...@@ -893,6 +893,8 @@ struct dc_debug_options { ...@@ -893,6 +893,8 @@ struct dc_debug_options {
bool minimize_dispclk_using_odm; bool minimize_dispclk_using_odm;
bool disable_subvp_high_refresh; bool disable_subvp_high_refresh;
bool disable_dp_plus_plus_wa; bool disable_dp_plus_plus_wa;
uint32_t fpo_vactive_min_active_margin_us;
uint32_t fpo_vactive_max_blank_us;
}; };
struct gpu_info_soc_bounding_box_v1_0; struct gpu_info_soc_bounding_box_v1_0;
......
...@@ -730,6 +730,8 @@ static const struct dc_debug_options debug_defaults_drv = { ...@@ -730,6 +730,8 @@ static const struct dc_debug_options debug_defaults_drv = {
.disable_boot_optimizations = false, .disable_boot_optimizations = false,
.disable_subvp_high_refresh = true, .disable_subvp_high_refresh = true,
.disable_dp_plus_plus_wa = true, .disable_dp_plus_plus_wa = true,
.fpo_vactive_min_active_margin_us = 200,
.fpo_vactive_max_blank_us = 1000,
}; };
static const struct dc_debug_options debug_defaults_diags = { static const struct dc_debug_options debug_defaults_diags = {
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#define DCN3_2_MBLK_HEIGHT_8BPE 64 #define DCN3_2_MBLK_HEIGHT_8BPE 64
#define DCN3_2_VMIN_DISPCLK_HZ 717000000 #define DCN3_2_VMIN_DISPCLK_HZ 717000000
#define DCN3_2_DCFCLK_DS_INIT_KHZ 10000 // Choose 10Mhz for init DCFCLK DS freq #define DCN3_2_DCFCLK_DS_INIT_KHZ 10000 // Choose 10Mhz for init DCFCLK DS freq
#define DCN3_2_MIN_ACTIVE_SWITCH_MARGIN_FPO_US 100 // Only allow FPO + Vactive if active margin >= 100
#define SUBVP_HIGH_REFRESH_LIST_LEN 3 #define SUBVP_HIGH_REFRESH_LIST_LEN 3
#define DCN3_2_MAX_SUBVP_PIXEL_RATE_MHZ 1800 #define DCN3_2_MAX_SUBVP_PIXEL_RATE_MHZ 1800
......
...@@ -626,7 +626,7 @@ struct dc_stream_state *dcn32_can_support_mclk_switch_using_fw_based_vblank_stre ...@@ -626,7 +626,7 @@ struct dc_stream_state *dcn32_can_support_mclk_switch_using_fw_based_vblank_stre
DC_FP_END(); DC_FP_END();
DC_FP_START(); DC_FP_START();
is_fpo_vactive = dcn32_find_vactive_pipe(dc, context, DCN3_2_MIN_ACTIVE_SWITCH_MARGIN_FPO_US); is_fpo_vactive = dcn32_find_vactive_pipe(dc, context, dc->debug.fpo_vactive_min_active_margin_us);
DC_FP_END(); DC_FP_END();
if (!is_fpo_vactive || dc->debug.disable_fpo_vactive) if (!is_fpo_vactive || dc->debug.disable_fpo_vactive)
return NULL; return NULL;
......
...@@ -728,6 +728,8 @@ static const struct dc_debug_options debug_defaults_drv = { ...@@ -728,6 +728,8 @@ static const struct dc_debug_options debug_defaults_drv = {
.disable_fpo_vactive = false, .disable_fpo_vactive = false,
.disable_boot_optimizations = false, .disable_boot_optimizations = false,
.disable_subvp_high_refresh = true, .disable_subvp_high_refresh = true,
.fpo_vactive_min_active_margin_us = 200,
.fpo_vactive_max_blank_us = 1000,
}; };
static const struct dc_debug_options debug_defaults_diags = { static const struct dc_debug_options debug_defaults_diags = {
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define DC_LOGGER_INIT(logger) #define DC_LOGGER_INIT(logger)
static const unsigned int MAX_FPO_VACTIVE_BLANK_US = 600;
static const struct subvp_high_refresh_list subvp_high_refresh_list = { static const struct subvp_high_refresh_list subvp_high_refresh_list = {
.min_refresh = 120, .min_refresh = 120,
.max_refresh = 165, .max_refresh = 165,
...@@ -2937,7 +2936,7 @@ bool dcn32_find_vactive_pipe(struct dc *dc, const struct dc_state *context, uint ...@@ -2937,7 +2936,7 @@ bool dcn32_find_vactive_pipe(struct dc *dc, const struct dc_state *context, uint
blank_us = ((pipe->stream->timing.v_total - pipe->stream->timing.v_addressable) * pipe->stream->timing.h_total / blank_us = ((pipe->stream->timing.v_total - pipe->stream->timing.v_addressable) * pipe->stream->timing.h_total /
(double)(pipe->stream->timing.pix_clk_100hz * 100)) * 1000000; (double)(pipe->stream->timing.pix_clk_100hz * 100)) * 1000000;
if (vba->ActiveDRAMClockChangeLatencyMarginPerState[vba->VoltageLevel][vba->maxMpcComb][vba->pipe_plane[pipe_idx]] >= vactive_margin_req_us && if (vba->ActiveDRAMClockChangeLatencyMarginPerState[vba->VoltageLevel][vba->maxMpcComb][vba->pipe_plane[pipe_idx]] >= vactive_margin_req_us &&
!(pipe->stream->vrr_active_variable || pipe->stream->vrr_active_fixed) && blank_us < MAX_FPO_VACTIVE_BLANK_US) { !(pipe->stream->vrr_active_variable || pipe->stream->vrr_active_fixed) && blank_us < dc->debug.fpo_vactive_max_blank_us) {
vactive_found = true; vactive_found = true;
break; break;
} }
......
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