Skip to contentSkip to conversation

drm/amd: Add debug option to disable subvp

PATCH In review [email protected] 2 participants 2 messages Jan 14, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Add debug option to disable subvp

From: Aurabindo Pillai <[email protected]>

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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 drivers/gpu/drm/amd/include/amd_shared.h          | 5 +++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
index e0c977e28626..fe75fbced027 100644
@@ -2033,6 +2033,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;
drivers/gpu/drm/amd/include/amd_shared.h +5 -0
index 05bdb4e020ae..c3e6dd4f4e00 100644
@@ -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;
Signature · 1 line
2.48.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Tue, Jan 14, 2025 at 1:31 PM <[email protected]> wrote:

From: Aurabindo Pillai <[email protected]>

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.

Quoted 38 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 drivers/gpu/drm/amd/include/amd_shared.h          | 5 +++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
index e0c977e28626..fe75fbced027 100644
@@ -2033,6 +2033,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;
drivers/gpu/drm/amd/include/amd_shared.h +5 -1
index 05bdb4e020ae..c3e6dd4f4e00 100644
@@ -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;
--

2.48.0