Skip to contentSkip to conversation

drm/amd/display: disable power gating for DCN314

PATCH In review Hamza Mahfooz 2 participants 3 messages Jun 14, 2023 – Jun 15, 2023

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

PATCH 1/2 drm/amd/display: disable power gating for DCN314

From: Daniel Miess <[email protected]>

[Why]
Power gating is causing error messages on some DCN314 systems

[How]
Force disable power gating for DCN314

Fixes 6d642c58a814 ("drm/amd/display: Re-enable DPP/HUBP Power Gating")
---
 .../gpu/drm/amd/display/dc/dcn314/dcn314_resource.c  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +5 -7
index a840b008d660..ef49b4d7742f 100644
@@ -1883,13 +1883,6 @@ static bool dcn314_resource_construct(
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
 
-	/* Disable pipe power gating when unsupported */
-	if (ctx->asic_id.hw_internal_rev == 0x01 ||
-			ctx->asic_id.hw_internal_rev == 0x80) {
-		dc->debug.disable_dpp_power_gate = true;
-		dc->debug.disable_hubp_power_gate = true;
-	}
-
 	/* read VBIOS LTTPR caps */
 	{
 		if (ctx->dc_bios->funcs->get_lttpr_caps) {
@@ -1910,6 +1903,11 @@ static bool dcn314_resource_construct(
 		dc->debug = debug_defaults_drv;
 	else
 		dc->debug = debug_defaults_diags;
+
+	/* Disable pipe power gating */
+	dc->debug.disable_dpp_power_gate = true;
+	dc->debug.disable_hubp_power_gate = true;
+
 	// Init the vm_helper
 	if (dc->vm_helper)
 		vm_helper_init(dc->vm_helper, 16);
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/2 drm/amd/display: disable RCO for DCN314

From: Daniel Miess <[email protected]>

[Why]
RCO is causing error messages on some DCN314 systems

[How]
Force disable RCO for DCN314

Fixes 0e1961c93839 ("drm/amd/display: Enable dcn314 DPP RCO")
---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c     | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +1 -1
index cf23d7bc560a..0746ed31d1d1 100644
@@ -332,7 +332,7 @@ static void dccg314_dpp_root_clock_control(
 {
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 
-	if (dccg->dpp_clock_gated[dpp_inst] == clock_on)
+	if (dccg->dpp_clock_gated[dpp_inst] != clock_on)
 		return;
 
 	if (clock_on) {
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +3 -0
index ef49b4d7742f..6a9024aa3285 100644
@@ -1908,6 +1908,9 @@ static bool dcn314_resource_construct(
 	dc->debug.disable_dpp_power_gate = true;
 	dc->debug.disable_hubp_power_gate = true;
 
+	/* Disable root clock optimization */
+	dc->debug.root_clock_optimization.u32All = 0;
+
 	// Init the vm_helper
 	if (dc->vm_helper)
 		vm_helper_init(dc->vm_helper, 16);
Signature · 1 line
2.40.1
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amd/display: disable RCO for DCN314

Quoted 5 lines · Hamza Mahfooz

From: Daniel Miess <[email protected]>

[Why]
RCO is causing error messages on some DCN314 systems

Quoted 7 lines

[How]
Force disable RCO for DCN314

Fixes 0e1961c93839 ("drm/amd/display: Enable dcn314 DPP RCO")

Series is

Harry

Quoted 32 lines
---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c     | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +1 -1
index cf23d7bc560a..0746ed31d1d1 100644
@@ -332,7 +332,7 @@ static void dccg314_dpp_root_clock_control(
 {
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 
-	if (dccg->dpp_clock_gated[dpp_inst] == clock_on)
+	if (dccg->dpp_clock_gated[dpp_inst] != clock_on)
 		return;
 
 	if (clock_on) {
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +3 -0
index ef49b4d7742f..6a9024aa3285 100644
@@ -1908,6 +1908,9 @@ static bool dcn314_resource_construct(
 	dc->debug.disable_dpp_power_gate = true;
 	dc->debug.disable_hubp_power_gate = true;
 
+	/* Disable root clock optimization */
+	dc->debug.root_clock_optimization.u32All = 0;
+
 	// Init the vm_helper
 	if (dc->vm_helper)
 		vm_helper_init(dc->vm_helper, 16);