Skip to content

Commit 80c6d68

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
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: Aurabindo Pillai <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ac0bb08 commit 80c6d68

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
16041604
if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0)
16051605
init_data.flags.allow_lttpr_non_transparent_mode.bits.DP2_0 = true;
16061606

1607+
/* Disable SubVP + DRR config by default */
1608+
init_data.flags.disable_subvp_drr = true;
1609+
if (amdgpu_dc_feature_mask & DC_ENABLE_SUBVP_DRR)
1610+
init_data.flags.disable_subvp_drr = false;
1611+
16071612
init_data.flags.seamless_boot_edp_requested = false;
16081613

16091614
if (check_seamless_boot_capability(adev)) {

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ struct dc_config {
409409
bool force_bios_enable_lttpr;
410410
uint8_t force_bios_fixed_vs;
411411
int sdpif_request_limit_words_per_umc;
412-
412+
bool disable_subvp_drr;
413413
};
414414

415415
enum visual_confirm {

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,10 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context, struc
880880
int16_t stretched_drr_us = 0;
881881
int16_t drr_stretched_vblank_us = 0;
882882
int16_t max_vblank_mallregion = 0;
883+
const struct dc_config *config = &dc->config;
884+
885+
if (config->disable_subvp_drr)
886+
return false;
883887

884888
// Find SubVP pipe
885889
for (i = 0; i < dc->res_pool->pipe_count; i++) {

drivers/gpu/drm/amd/include/amd_shared.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ enum DC_FEATURE_MASK {
240240
DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default
241241
DC_PSR_ALLOW_SMU_OPT = (1 << 7), //0x80, disabled by default
242242
DC_PSR_ALLOW_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by default
243+
DC_ENABLE_SUBVP_DRR = (1 << 9), // 0x200, disabled by default
243244
};
244245

245246
enum DC_DEBUG_MASK {

0 commit comments

Comments
 (0)