drm/amd: Add debug option to disable subvp
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Mon, 13 Jan 2025 22:05:16 +0000 (17:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Jan 2025 14:52:31 +0000 (09:52 -0500)
Some monitors flicker when subvp is enabled which maybe related to
an uncommon timing they use. To isolate such issues, add a debug
option to help isolate this the issue for debugging.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@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 0ec178ca7434a488345a7a0262b289f11709cb5a..4e8ad91bd87070ba6a8b6b063322b298e60818ba 100644 (file)
@@ -2034,6 +2034,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
        if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH)
                adev->dm.dc->debug.force_subvp_mclk_switch = true;
 
+       if (amdgpu_dc_debug_mask & DC_DISABLE_SUBVP)
+               adev->dm.dc->debug.force_disable_subvp = true;
+
        if (amdgpu_dc_debug_mask & DC_ENABLE_DML2) {
                adev->dm.dc->debug.using_dml2 = true;
                adev->dm.dc->debug.using_dml21 = true;
index 05bdb4e020ae32f1a1f5db4a8485e1d3eabfa3bf..c3e6dd4f4e00132fe62db6986cefc8af4466e58d 100644 (file)
@@ -349,6 +349,11 @@ enum DC_DEBUG_MASK {
         * @DC_DISABLE_HDMI_CEC: If set, disable HDMI-CEC feature in amdgpu driver.
         */
        DC_DISABLE_HDMI_CEC = 0x10000,
+
+       /*
+        * @DC_DISABLE_SUBVP: If set, disable DCN Sub-Viewport feature in amdgpu driver.
+        */
+       DC_DISABLE_SUBVP = 0x20000,
 };
 
 enum amd_dpm_forced_level;