Skip to contentSkip to conversation

drm/amd/display: explicitly update clocks when DC is set to D3

PATCH Superseded Mario Limonciello 2 participants 2 messages Jan 4, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: explicitly update clocks when DC is set to D3

The WA from commit 5965280abd30 ("drm/amd/display: Apply w/a for hard hang on HPD") causes a regression in s0ix where the system will fail to resume properly. This may be because an HPD was active the last time clocks were updated but clocks didn't get updated again during s0ix.

So add an extra call to update clocks as part of the suspend routine:
dm_suspend->dc_set_power_state->clk_mgr_optimize_pwr_state

Cc Qingqing Zhuo <[email protected]>
Fixes 5965280abd30 ("drm/amd/display: Apply w/a for hard hang on HPD")
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
index 91c4874473d6..6968ad6c5a64 100644
@@ -3299,6 +3299,8 @@ void dc_set_power_state(
 		}
 
 		break;
+	case DC_ACPI_CM_POWER_STATE_D3:
+		clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);
 	default:
 		ASSERT(dc->current_state->stream_count == 0);
 		/* Zero out the current context so that on resume we start with
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 22 lines · Mario Limonciello

The WA from commit 5965280abd30 ("drm/amd/display: Apply w/a for hard hang on HPD") causes a regression in s0ix where the system will fail to resume properly. This may be because an HPD was active the last time clocks were updated but clocks didn't get updated again during s0ix.

So add an extra call to update clocks as part of the suspend routine:
dm_suspend->dc_set_power_state->clk_mgr_optimize_pwr_state

Cc Qingqing Zhuo <[email protected]>
Fixes 5965280abd30 ("drm/amd/display: Apply w/a for hard hang on HPD")
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 91c4874473d6..6968ad6c5a64 100644

drivers/gpu/drm/amd/display/dc/core/dc.c void dc_set_power_state( · line 3303

Quoted 5 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -3299,6 +3299,8 @@ void dc_set_power_state(
 		}
 
 		break;
+	case DC_ACPI_CM_POWER_STATE_D3:
+		clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);

We probably want a "fallthrough;" statement here.

Harry

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
 	default:
 		ASSERT(dc->current_state->stream_count == 0);
 		/* Zero out the current context so that on resume we start with