From: Aurabindo Pillai Date: Tue, 28 Jun 2022 21:26:35 +0000 (-0400) Subject: drm/amd: Add debug mask for subviewport mclk switch X-Git-Tag: v6.0-rc1~138^2~7^2~129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfb979f71736361ec564d47d0a41f07e09983e32;p=thirdparty%2Fkernel%2Flinux.git drm/amd: Add debug mask for subviewport mclk switch [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 Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- 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 1bd65b41ba4d9..863e757d1f3e6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -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); diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h index 2e02a6fc17176..1db21d13726dd 100644 --- a/drivers/gpu/drm/amd/include/amd_shared.h +++ b/drivers/gpu/drm/amd/include/amd_shared.h @@ -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;