Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 9b4c15a07c03dff9978776bed9be7ac7a229cff6 Mon Sep 17 00:00:00 2001
- From: Reilly Brogan <reilly@reillybrogan.com>
- Date: Thu, 30 Nov 2023 16:26:27 -0600
- Subject: [PATCH] Reapply "drm/amd/display: disable SubVP + DRR to prevent
- underflow"
- This reverts commit f38129bb081758176dd78304faaee95007fb8838.
- Causes flickering on my AMD 7900xtx GPU. See https://gitlab.freedesktop.org/drm/amd/-/issues/2904
- ---
- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
- drivers/gpu/drm/amd/display/dc/dc.h | 1 +
- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++++
- drivers/gpu/drm/amd/include/amd_shared.h | 1 +
- 4 files changed, 11 insertions(+)
- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
- index 5737c3fcf161..f44ed0c182c7 100644
- --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
- +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
- @@ -1671,6 +1671,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
- if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0)
- 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;
- if (check_seamless_boot_capability(adev)) {
- diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
- index 3f33740e2f65..b68bdb351f22 100644
- --- a/drivers/gpu/drm/amd/display/dc/dc.h
- +++ b/drivers/gpu/drm/amd/display/dc/dc.h
- @@ -423,6 +423,7 @@ struct dc_config {
- uint8_t force_bios_fixed_vs;
- int sdpif_request_limit_words_per_umc;
- bool use_old_fixed_vs_sequence;
- + bool disable_subvp_drr;
- bool dc_mode_clk_limit_support;
- };
- diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
- index cf3b400c8619..4d279244657e 100644
- --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
- +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
- @@ -879,6 +879,10 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context)
- int16_t stretched_drr_us = 0;
- int16_t drr_stretched_vblank_us = 0;
- int16_t max_vblank_mallregion = 0;
- + const struct dc_config *config = &dc->config;
- +
- + if (config->disable_subvp_drr)
- + return false;
- // Find SubVP pipe
- for (i = 0; i < dc->res_pool->pipe_count; i++) {
- diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
- index abe829bbd54a..7787ebea1ce6 100644
- --- a/drivers/gpu/drm/amd/include/amd_shared.h
- +++ b/drivers/gpu/drm/amd/include/amd_shared.h
- @@ -240,6 +240,7 @@ enum DC_FEATURE_MASK {
- 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_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by default
- + DC_ENABLE_SUBVP_DRR = (1 << 9), // 0x200, disabled by default
- };
- enum DC_DEBUG_MASK {
- --
- 2.43.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement