All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 3/3] drm/amd/pm: Reset max GFX clock after disabling determinism
@ 2021-05-17  8:40 Lazar, Lijo
  0 siblings, 0 replies; only message in thread
From: Lazar, Lijo @ 2021-05-17  8:40 UTC (permalink / raw)
  To: amd-gfx; +Cc: Wang, Kevin(Yang), Feng, Kenneth, Chen, Guchun, Zhang, Hawking


[-- Attachment #1.1: Type: text/plain, Size: 1821 bytes --]

[AMD Public Use]

When determinism mode is disabled on aldebaran, max GFX clock will
be reset to default max frequency value.

Signed-off-by: Lijo Lazar lijo.lazar@amd.com<mailto:lijo.lazar@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index d27ed2954705..34afea71f1b3 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1129,12 +1129,17 @@ static int aldebaran_set_performance_level(struct smu_context *smu,
                                                                                  enum amd_dpm_forced_level level)
{
               struct smu_dpm_context *smu_dpm = &(smu->smu_dpm);
+             struct smu_13_0_dpm_context *dpm_context = smu_dpm->dpm_context;
+             struct smu_13_0_dpm_table *gfx_table =
+                             &dpm_context->dpm_tables.gfx_table;
+             struct smu_umd_pstate_table *pstate_table = &smu->pstate_table;
                /* Disable determinism if switching to another mode */
-              if ((smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
-                                              && (level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM))
+             if ((smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) &&
+                 (level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)) {
                               smu_cmn_send_smc_msg(smu, SMU_MSG_DisableDeterminism, NULL);
-
+                             pstate_table->gfxclk_pstate.curr.max = gfx_table->max;
+             }
                switch (level) {
--
2.17.1


[-- Attachment #1.2: Type: text/html, Size: 6574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-17  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  8:40 [PATCH v2 3/3] drm/amd/pm: Reset max GFX clock after disabling determinism Lazar, Lijo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.