AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Add debug option to disable idle optimizations
@ 2024-10-15 17:41 Aurabindo Pillai
  2024-10-16 21:05 ` Rodrigo Siqueira Jordao
  0 siblings, 1 reply; 2+ messages in thread
From: Aurabindo Pillai @ 2024-10-15 17:41 UTC (permalink / raw)
  To: amd-gfx; +Cc: rodrigo.siqueira, hamza.mahfooz, harry.wentland, Aurabindo Pillai

For debugging purposes, add a runtime override to disable display scanout
from MALL cache (MALL Static Screen) by disallowing the driver from
triggering the idle power optimizations when desktop is idle.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
 drivers/gpu/drm/amd/include/amd_shared.h          | 5 +++++
 2 files changed, 9 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 c5487bb7c6b8..bb0e9deebcc5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2012,6 +2012,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		adev->dm.dc->debug.using_dml21 = true;
 	}
 
+	if (amdgpu_dc_debug_mask & DC_DISABLE_IDLE_POWER_OPTIMIZATIONS) {
+		adev->dm.dc->debug.disable_idle_power_optimizations = true;
+	}
+
 	adev->dm.dc->debug.visual_confirm = amdgpu_dc_visual_confirm;
 
 	/* TODO: Remove after DP2 receiver gets proper support of Cable ID feature */
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
index 7eefcb0f5070..fba3f2f1327e 100644
--- a/drivers/gpu/drm/amd/include/amd_shared.h
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
@@ -344,6 +344,11 @@ enum DC_DEBUG_MASK {
 	 * eDP display from ACPI _DDC method.
 	 */
 	DC_DISABLE_ACPI_EDID = 0x8000,
+	/**
+	 * @DC_DISABLE_IDLE_POWER_OPTIMISATION: Disables certain power
+	 * optimizations when desktop is in idle state
+	 */
+	DC_DISABLE_IDLE_POWER_OPTIMIZATIONS = 0x10000,
 };
 
 enum amd_dpm_forced_level;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-16 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 17:41 [PATCH] drm/amd/display: Add debug option to disable idle optimizations Aurabindo Pillai
2024-10-16 21:05 ` Rodrigo Siqueira Jordao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox