Re: [PATCH] drm/amd: Add debug mask for subviewport mclk switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2022-06-30 14:28, Alex Deucher wrote:
On Tue, Jun 28, 2022 at 5:26 PM Aurabindo Pillai
<aurabindo.pillai@xxxxxxx> wrote:

[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch
to facilitate easy testing.


Is the debugfs support already plumbed in and this just enables you to
use it?  If it's in debugfs, do we really need a module parameter to
enable it or can it just be enabled by default and used via debugfs
when needed?

Sorry, I meant to put in debug mask, like in the title. Will fix that. There is no debugfs associated with this change. The change in DM is enough to enable this.

Alex

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@xxxxxxx>
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
  drivers/gpu/drm/amd/include/amd_shared.h          | 1 +
  2 files changed, 4 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 c9145864ed2b..7a034ca95be2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
         if (amdgpu_dc_debug_mask & DC_DISABLE_CLOCK_GATING)
                 adev->dm.dc->debug.disable_clock_gate = true;

+       if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH)
+               adev->dm.dc->debug.force_subvp_mclk_switch = true;
+
         r = dm_dmub_hw_init(adev);
         if (r) {
                 DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
index bcdf7453a403..b1c55dd7b498 100644
--- a/drivers/gpu/drm/amd/include/amd_shared.h
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {
         DC_DISABLE_DSC = 0x4,
         DC_DISABLE_CLOCK_GATING = 0x8,
         DC_DISABLE_PSR = 0x10,
+       DC_FORCE_SUBVP_MCLK_SWITCH = 0x20,
  };

  enum amd_dpm_forced_level;
--
2.36.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux