Skip to contentSkip to conversation

drm/amd/pm: disable the SMU13 OD feature support temporarily

PATCH In review Evan Quan 2 participants 2 messages Jul 24, 2023

Subsystems (3)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH v2 1/1 drm/amd/pm: disable the SMU13 OD feature support temporarily

The existing OD interface cannot support the growing demand for more OD features. We are in the transition to a new OD mechanism. So, disable the SMU13 OD feature support temporarily. And this should be reverted when the new OD mechanism online.

--
v1->v2:
- comment out other unneeded members altogether(Guchun)

---
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c  | 15 ++++++++++++---
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c  | 10 +++++++---
 2 files changed, 19 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +12 -3
index 60d2684478a0..160362540a03 100644
@@ -348,18 +348,27 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu)
 	if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_MACO)
 		smu_baco->maco_support = true;
 
+	/*
+	 * We are in the transition to a new OD mechanism.
+	 * Disable the OD feature support for SMU13 temporarily.
+	 * TODO: get this reverted when new OD mechanism online
+	 */
+#if 0
 	if (!overdrive_lowerlimits->FeatureCtrlMask ||
 	    !overdrive_upperlimits->FeatureCtrlMask)
 		smu->od_enabled = false;
 
-	table_context->thermal_controller_type =
-		powerplay_table->thermal_controller_type;
-
 	/*
 	 * Instead of having its own buffer space and get overdrive_table copied,
 	 * smu->od_settings just points to the actual overdrive_table
 	 */
 	smu->od_settings = &powerplay_table->overdrive_table;
+#else
+	smu->od_enabled = false;
+#endif
+
+	table_context->thermal_controller_type =
+		powerplay_table->thermal_controller_type;
 
 	return 0;
 }
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +7 -3
index ebb961f60316..f12850acfa12 100644
@@ -338,18 +338,22 @@ static int smu_v13_0_7_check_powerplay_table(struct smu_context *smu)
 	if (smu_baco->platform_support && (BoardTable->HsrEnabled || BoardTable->VddqOffEnabled))
 		smu_baco->maco_support = true;
 
+#if 0
 	if (!overdrive_lowerlimits->FeatureCtrlMask ||
 	    !overdrive_upperlimits->FeatureCtrlMask)
 		smu->od_enabled = false;
 
-	table_context->thermal_controller_type =
-		powerplay_table->thermal_controller_type;
-
 	/*
 	 * Instead of having its own buffer space and get overdrive_table copied,
 	 * smu->od_settings just points to the actual overdrive_table
 	 */
 	smu->od_settings = &powerplay_table->overdrive_table;
+#else
+	smu->od_enabled = false;
+#endif
+
+	table_context->thermal_controller_type =
+		powerplay_table->thermal_controller_type;
 
 	return 0;
 }
Signature · 1 line
2.34.1
#1 lore raw

[Public]

Looks good to me. Reviewed-by: Guchun Chen <[email protected]>

Quoted 99 lines

-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Monday, July 24, 2023 11:21 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH V2] drm/amd/pm: disable the SMU13 OD feature support temporarily

The existing OD interface cannot support the growing demand for more OD features. We are in the transition to a new OD mechanism. So, disable the SMU13 OD feature support temporarily. And this should be reverted when the new OD mechanism online.

--
v1->v2:
- comment out other unneeded members altogether(Guchun)

---
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c  | 15
++++++++++++---  .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
| 10 +++++++---
 2 files changed, 19 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +12 -3
index 60d2684478a0..160362540a03 100644
@@ -348,18 +348,27 @@ static int
 smu_v13_0_0_check_powerplay_table(struct smu_context *smu)
      if (powerplay_table->platform_caps &
 SMU_13_0_0_PP_PLATFORM_CAP_MACO)
              smu_baco->maco_support = true;
 
+     /*
+      * We are in the transition to a new OD mechanism.
+      * Disable the OD feature support for SMU13 temporarily.
+      * TODO: get this reverted when new OD mechanism online
+      */
+#if 0
      if (!overdrive_lowerlimits->FeatureCtrlMask ||
          !overdrive_upperlimits->FeatureCtrlMask)
              smu->od_enabled = false;
 
-     table_context->thermal_controller_type =
-             powerplay_table->thermal_controller_type;
-
      /*
       * Instead of having its own buffer space and get overdrive_table
 copied,
       * smu->od_settings just points to the actual overdrive_table
       */
      smu->od_settings = &powerplay_table->overdrive_table;
+#else
+     smu->od_enabled = false;
+#endif
+
+     table_context->thermal_controller_type =
+             powerplay_table->thermal_controller_type;
      return 0;

}

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +7 -3
index ebb961f60316..f12850acfa12 100644
@@ -338,18 +338,22 @@ static int
 smu_v13_0_7_check_powerplay_table(struct smu_context *smu)
      if (smu_baco->platform_support && (BoardTable->HsrEnabled ||
 BoardTable->VddqOffEnabled))
              smu_baco->maco_support = true;
 
+#if 0
      if (!overdrive_lowerlimits->FeatureCtrlMask ||
          !overdrive_upperlimits->FeatureCtrlMask)
              smu->od_enabled = false;
 
-     table_context->thermal_controller_type =
-             powerplay_table->thermal_controller_type;
-
      /*
       * Instead of having its own buffer space and get overdrive_table
 copied,
       * smu->od_settings just points to the actual overdrive_table
       */
      smu->od_settings = &powerplay_table->overdrive_table;
+#else
+     smu->od_enabled = false;
+#endif
+
+     table_context->thermal_controller_type =
+             powerplay_table->thermal_controller_type;
      return 0;

}
--
2.34.1