Commit 80c6d680 authored by Aurabindo Pillai's avatar Aurabindo Pillai Committed by Alex Deucher

drm/amd/display: disable SubVP + DRR to prevent underflow

[Why&How]
Temporarily disable SubVP+DRR since Xorg has an architectural limitation
where freesync will not work in a multi monitor configuration. SubVP+DRR
requires that freesync be working.

Whether OS has variable refresh setting enabled or not, the state on
the crtc remains same unless an application requests VRR. Due to this,
there is no way to know whether freesync will actually work or not
while we are on the desktop from the kernel's perspective.

If userspace does not have a limitation with multi-display freesync (for
example wayland), then this feature can be enabled by adding a
dcfeaturemask option to amdgpu on the kernel cmdline like:

amdgpu.dcfeaturemask=0x200
Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ac0bb08d
...@@ -1604,6 +1604,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1604,6 +1604,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0) if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0)
init_data.flags.allow_lttpr_non_transparent_mode.bits.DP2_0 = true; init_data.flags.allow_lttpr_non_transparent_mode.bits.DP2_0 = true;
/* Disable SubVP + DRR config by default */
init_data.flags.disable_subvp_drr = true;
if (amdgpu_dc_feature_mask & DC_ENABLE_SUBVP_DRR)
init_data.flags.disable_subvp_drr = false;
init_data.flags.seamless_boot_edp_requested = false; init_data.flags.seamless_boot_edp_requested = false;
if (check_seamless_boot_capability(adev)) { if (check_seamless_boot_capability(adev)) {
......
...@@ -409,7 +409,7 @@ struct dc_config { ...@@ -409,7 +409,7 @@ struct dc_config {
bool force_bios_enable_lttpr; bool force_bios_enable_lttpr;
uint8_t force_bios_fixed_vs; uint8_t force_bios_fixed_vs;
int sdpif_request_limit_words_per_umc; int sdpif_request_limit_words_per_umc;
bool disable_subvp_drr;
}; };
enum visual_confirm { enum visual_confirm {
......
...@@ -880,6 +880,10 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context, struc ...@@ -880,6 +880,10 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context, struc
int16_t stretched_drr_us = 0; int16_t stretched_drr_us = 0;
int16_t drr_stretched_vblank_us = 0; int16_t drr_stretched_vblank_us = 0;
int16_t max_vblank_mallregion = 0; int16_t max_vblank_mallregion = 0;
const struct dc_config *config = &dc->config;
if (config->disable_subvp_drr)
return false;
// Find SubVP pipe // Find SubVP pipe
for (i = 0; i < dc->res_pool->pipe_count; i++) { for (i = 0; i < dc->res_pool->pipe_count; i++) {
......
...@@ -240,6 +240,7 @@ enum DC_FEATURE_MASK { ...@@ -240,6 +240,7 @@ enum DC_FEATURE_MASK {
DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default
DC_PSR_ALLOW_SMU_OPT = (1 << 7), //0x80, disabled by default DC_PSR_ALLOW_SMU_OPT = (1 << 7), //0x80, disabled by default
DC_PSR_ALLOW_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by default DC_PSR_ALLOW_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by default
DC_ENABLE_SUBVP_DRR = (1 << 9), // 0x200, disabled by default
}; };
enum DC_DEBUG_MASK { enum DC_DEBUG_MASK {
......
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