drm/amd: Add debug mask for subviewport mclk switch
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Tue, 28 Jun 2022 21:26:35 +0000 (17:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:09:24 +0000 (16:09 -0400)
[Why&How]
Expose a new dc debug mask enum to force a subviewport memory clock switch
to facilitate easy testing.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/include/amd_shared.h

index 1bd65b4..863e757 100644 (file)
@@ -1560,6 +1560,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);
index 2e02a6f..1db21d1 100644 (file)
@@ -248,6 +248,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;