Skip to contentSkip to conversation

drm/amd/display: disable FPO and SubVP for older DMUB versions on DCN32x

PATCH In review Hamza Mahfooz 3 participants 3 messages Dec 15, 2023

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

PATCH 1/1 drm/amd/display: disable FPO and SubVP for older DMUB versions on DCN32x

There have recently been changes that break backwards compatibility, that were introduced into DMUB firmware (for DCN32x) concerning FPO and SubVP. So, since those are just power optimization features, we can just disable them unless the user is using a new enough version of DMUB firmware.

---
 drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +6 -0
index 5c323718ec90..0f0972ad441a 100644
@@ -960,6 +960,12 @@ void dcn32_init_hw(struct dc *dc)
 		dc->caps.dmub_caps.subvp_psr = dc->ctx->dmub_srv->dmub->feature_caps.subvp_psr_support;
 		dc->caps.dmub_caps.gecc_enable = dc->ctx->dmub_srv->dmub->feature_caps.gecc_enable;
 		dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch;
+
+		if (dc->ctx->dmub_srv->dmub->fw_version <
+		    DMUB_FW_VERSION(7, 0, 35)) {
+			dc->debug.force_disable_subvp = true;
+			dc->debug.disable_fpo_optimizations = true;
+		}
 	}
 }
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Hamza Mahfooz

There have recently been changes that break backwards compatibility,

Please start an internal thread with the DMUB guys about this. We shouldn't really break backwards compatibility with FW. Include Alex D. and myself, please.

Quoted 5 lines

that were introduced into DMUB firmware (for DCN32x) concerning FPO and SubVP. So, since those are just power optimization features, we can just disable them unless the user is using a new enough version of DMUB firmware.

I don't really like disabling this and don't fully understand whether this won't break something else. But we also shouldn't crash, so this change is

Harry

Quoted 27 lines
---
 drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +6 -0
index 5c323718ec90..0f0972ad441a 100644
@@ -960,6 +960,12 @@ void dcn32_init_hw(struct dc *dc)
 		dc->caps.dmub_caps.subvp_psr = dc->ctx->dmub_srv->dmub->feature_caps.subvp_psr_support;
 		dc->caps.dmub_caps.gecc_enable = dc->ctx->dmub_srv->dmub->feature_caps.gecc_enable;
 		dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch;
+
+		if (dc->ctx->dmub_srv->dmub->fw_version <
+		    DMUB_FW_VERSION(7, 0, 35)) {
+			dc->debug.force_disable_subvp = true;
+			dc->debug.disable_fpo_optimizations = true;
+		}
 	}
 }
 
Reviewed-by on v1 1/1
#2 lore raw
In reply to Hamza Mahfooz
Quoted 6 lines · Hamza Mahfooz

There have recently been changes that break backwards compatibility, that were introduced into DMUB firmware (for DCN32x) concerning FPO and SubVP. So, since those are just power optimization features, we can just disable them unless the user is using a new enough version of DMUB firmware.

Quoted 6 lines
Quoted 9 lines
---
  drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +0 -0
index 5c323718ec90..0f0972ad441a 100644

drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c void dcn32_init_hw(struct dc *dc) · line 968

Quoted 9 lines
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +6 -0
@@ -960,6 +960,12 @@ void dcn32_init_hw(struct dc *dc)
  		dc->caps.dmub_caps.subvp_psr = dc->ctx->dmub_srv->dmub->feature_caps.subvp_psr_support;
  		dc->caps.dmub_caps.gecc_enable = dc->ctx->dmub_srv->dmub->feature_caps.gecc_enable;
  		dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch;
+
+		if (dc->ctx->dmub_srv->dmub->fw_version <
+		    DMUB_FW_VERSION(7, 0, 35)) {
+			dc->debug.force_disable_subvp = true;
+			dc->debug.disable_fpo_optimizations = true;
+		}

One potential improvement would be to emit a message in this case to let the user know that this has happened and if they upgrade their firmware they can get additional power optimizations.

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +0 -0
  	}
  }