AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Evan Quan <evan.quan@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: [PATCH] drm/amd/pm: enable the support for retrieving combo pptable
Date: Thu, 28 Apr 2022 17:29:46 -0400	[thread overview]
Message-ID: <20220428212946.700296-12-alexander.deucher@amd.com> (raw)
In-Reply-To: <20220428212946.700296-1-alexander.deucher@amd.com>

From: Evan Quan <evan.quan@amd.com>

We need to relay on this way to get the raw PPTable when
SCPM feature is enabled.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h |  4 +++-
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c        | 11 +++++++++++
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h        |  2 ++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
index 491357321020..49d2c0eb014d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
@@ -321,6 +321,7 @@ enum smu_table_id
 	SMU_TABLE_I2C_COMMANDS,
 	SMU_TABLE_PACE,
 	SMU_TABLE_ECCINFO,
+	SMU_TABLE_COMBO_PPTABLE,
 	SMU_TABLE_COUNT,
 };
 
@@ -336,7 +337,8 @@ struct smu_table_context
 
 	void				*max_sustainable_clocks;
 	struct smu_bios_boot_up_values	boot_values;
-	void                            *driver_pptable;
+	void				*driver_pptable;
+	void				*combo_pptable;
 	void                            *ecc_table;
 	void				*driver_smu_config_table;
 	struct smu_table		tables[SMU_TABLE_COUNT];
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index f12319883a80..622881ab34c7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -971,6 +971,17 @@ int smu_cmn_get_metrics_table(struct smu_context *smu,
 	return 0;
 }
 
+int smu_cmn_get_combo_pptable(struct smu_context *smu)
+{
+	void *pptable = smu->smu_table.combo_pptable;
+
+	return smu_cmn_update_table(smu,
+				    SMU_TABLE_COMBO_PPTABLE,
+				    0,
+				    pptable,
+				    false);
+}
+
 void smu_cmn_init_soft_gpu_metrics(void *table, uint8_t frev, uint8_t crev)
 {
 	struct metrics_table_header *header = (struct metrics_table_header *)table;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
index a4c593ed8b03..1526ce09c399 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
@@ -99,6 +99,8 @@ int smu_cmn_get_metrics_table(struct smu_context *smu,
 			      void *metrics_table,
 			      bool bypass_cache);
 
+int smu_cmn_get_combo_pptable(struct smu_context *smu);
+
 void smu_cmn_init_soft_gpu_metrics(void *table, uint8_t frev, uint8_t crev);
 
 int smu_cmn_set_mp1_state(struct smu_context *smu,
-- 
2.35.1


  parent reply	other threads:[~2022-04-28 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 21:29 [PATCH] drm/amd/smu: Increace dpm level count only for aldebaran Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amdgpu: add updated smu_info structures Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amdgpu: query core refclk from bios for smu v13 Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: enable pp_dpm_vclk/dclk sysfs interface support for SMU 13.0.0 Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: fix NULL pointer issue of amdgpu_smu_stb_debug_fs_init Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: move bootup values retrieving to ->sw_init Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: correct the way for retrieving bootup clocks Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: update the hw initialization sequence around pptable setup Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amdgpu: enable pptable ucode loading Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: enable SCPM support for SMU Alex Deucher
2022-04-28 21:29 ` [PATCH] drm/amd/pm: correct SMU OverridePcieParameters related settings Alex Deucher
2022-04-28 21:29 ` Alex Deucher [this message]
2022-04-29  2:41 ` [PATCH] drm/amd/smu: Increace dpm level count only for aldebaran Zhang, Hawking

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428212946.700296-12-alexander.deucher@amd.com \
    --to=alexander.deucher@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=evan.quan@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox