Advertisement
ReillyBrogan

0001-Reapply-drm-amd-display-disable-SubVP-DRR-to-prevent-67.patch

Feb 21st, 2024
42
0
40 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Reilly Brogan <reilly@reillybrogan.com>
  3. Date: Thu, 30 Nov 2023 16:26:27 -0600
  4. Subject: [PATCH] Reapply "drm/amd/display: disable SubVP + DRR to prevent
  5. underflow"
  6.  
  7. This reverts commit f38129bb081758176dd78304faaee95007fb8838.
  8.  
  9. Causes flickering on my AMD 7900xtx GPU. See https://gitlab.freedesktop.org/drm/amd/-/issues/2904
  10. ---
  11. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
  12. drivers/gpu/drm/amd/display/dc/dc.h | 1 +
  13. drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++++
  14. drivers/gpu/drm/amd/include/amd_shared.h | 1 +
  15. 4 files changed, 11 insertions(+)
  16.  
  17. diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
  18. index affc628004ff..7f9ce33340b9 100644
  19. --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
  20. +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
  21. @@ -1664,6 +1664,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
  22. if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0)
  23. init_data.flags.allow_lttpr_non_transparent_mode.bits.DP2_0 = true;
  24.  
  25. + /* Disable SubVP + DRR config by default */
  26. + init_data.flags.disable_subvp_drr = true;
  27. + if (amdgpu_dc_feature_mask & DC_ENABLE_SUBVP_DRR)
  28. + init_data.flags.disable_subvp_drr = false;
  29. +
  30. init_data.flags.seamless_boot_edp_requested = false;
  31.  
  32. if (amdgpu_device_seamless_boot_supported(adev)) {
  33. diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
  34. index 2cafd644baff..555d951a5fef 100644
  35. --- a/drivers/gpu/drm/amd/display/dc/dc.h
  36. +++ b/drivers/gpu/drm/amd/display/dc/dc.h
  37. @@ -428,6 +428,7 @@ struct dc_config {
  38. uint8_t force_bios_fixed_vs;
  39. int sdpif_request_limit_words_per_umc;
  40. bool use_old_fixed_vs_sequence;
  41. + bool disable_subvp_drr;
  42. bool dc_mode_clk_limit_support;
  43. bool EnableMinDispClkODM;
  44. bool enable_auto_dpm_test_logs;
  45. 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
  46. index 92e2ddc9ab7e..a6cceca78a7b 100644
  47. --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
  48. +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
  49. @@ -796,6 +796,10 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context)
  50. int16_t stretched_drr_us = 0;
  51. int16_t drr_stretched_vblank_us = 0;
  52. int16_t max_vblank_mallregion = 0;
  53. + const struct dc_config *config = &dc->config;
  54. +
  55. + if (config->disable_subvp_drr)
  56. + return false;
  57.  
  58. // Find SubVP pipe
  59. for (i = 0; i < dc->res_pool->pipe_count; i++) {
  60. diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
  61. index 579977f6ad52..b758882b9343 100644
  62. --- a/drivers/gpu/drm/amd/include/amd_shared.h
  63. +++ b/drivers/gpu/drm/amd/include/amd_shared.h
  64. @@ -244,6 +244,7 @@ enum DC_FEATURE_MASK {
  65. DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default
  66. DC_PSR_ALLOW_SMU_OPT = (1 << 7), //0x80, disabled by default
  67. DC_PSR_ALLOW_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by default
  68. + DC_ENABLE_SUBVP_DRR = (1 << 9), // 0x200, disabled by default
  69. };
  70.  
  71. enum DC_DEBUG_MASK {
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement