All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] drm/amd/pm: Don't output SMU version for smu13 every time
@ 2021-07-30 16:02 Mario Limonciello
  2021-07-30 16:02 ` [PATCH v2 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
  2021-07-30 16:02 ` [PATCH v2 3/3] drm/amd/pm: Downgrade SMU mismatch information messages Mario Limonciello
  0 siblings, 2 replies; 3+ messages in thread
From: Mario Limonciello @ 2021-07-30 16:02 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello

This adjusts SMU13 to match SMU11 and SMU12 behaviors in not showing
this message all the time by default.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v1->v2:
 * Downgrade to debug instead of dropping
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index a421ba85bd6d..e946314e1f90 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -219,7 +219,7 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 		break;
 	}
 
-	dev_info(smu->adev->dev, "smu fw reported version = 0x%08x (%d.%d.%d)\n",
+	dev_dbg(smu->adev->dev, "smu fw reported version = 0x%08x (%d.%d.%d)\n",
 			 smu_version, smu_major, smu_minor, smu_debug);
 
 	/*
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs
  2021-07-30 16:02 [PATCH v2 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Mario Limonciello
@ 2021-07-30 16:02 ` Mario Limonciello
  2021-07-30 16:02 ` [PATCH v2 3/3] drm/amd/pm: Downgrade SMU mismatch information messages Mario Limonciello
  1 sibling, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2021-07-30 16:02 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello, Lijo Lazar

This is more useful when talking to the SMU team to have the information
in this format, save one less step to manually do it.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

v1->v2:
 * Add Lijo's tag
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 96ef3f1051d8..cde82677f0bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1410,6 +1410,8 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
 	struct drm_amdgpu_info_firmware fw_info;
 	struct drm_amdgpu_query_fw query_fw;
 	struct atom_context *ctx = adev->mode_info.atom_context;
+	uint8_t smu_minor, smu_debug;
+	uint16_t smu_major;
 	int ret, i;
 
 	static const char *ta_fw_name[TA_FW_TYPE_MAX_INDEX] = {
@@ -1555,8 +1557,11 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
 	ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
 	if (ret)
 		return ret;
-	seq_printf(m, "SMC feature version: %u, firmware version: 0x%08x\n",
-		   fw_info.feature, fw_info.ver);
+	smu_major = (fw_info.ver >> 16) & 0xffff;
+	smu_minor = (fw_info.ver >> 8) & 0xff;
+	smu_debug = (fw_info.ver >> 0) & 0xff;
+	seq_printf(m, "SMC feature version: %u, firmware version: 0x%08x (%d.%d.%d)\n",
+		   fw_info.feature, fw_info.ver, smu_major, smu_minor, smu_debug);
 
 	/* SDMA */
 	query_fw.fw_type = AMDGPU_INFO_FW_SDMA;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 3/3] drm/amd/pm: Downgrade SMU mismatch information messages
  2021-07-30 16:02 [PATCH v2 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Mario Limonciello
  2021-07-30 16:02 ` [PATCH v2 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
@ 2021-07-30 16:02 ` Mario Limonciello
  1 sibling, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2021-07-30 16:02 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello

The SMU driver interface and firmware interface messages have comments
indicating that they are backwards compatible.  As end users can't do
anything about this and it's OK downgrade the details to debugging.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 13 +++++++------
 drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 13 +++++++------
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c |  2 +-
 3 files changed, 15 insertions(+), 13 deletions(-)

v1->v2:
 * Downgrade information to debug, but leave warning in place
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index 0a5d46ac9ccd..9af4b18e5e5e 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@ -224,17 +224,12 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 	uint32_t if_version = 0xff, smu_version = 0xff;
-	uint16_t smu_major;
-	uint8_t smu_minor, smu_debug;
 	int ret = 0;
 
 	ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version);
 	if (ret)
 		return ret;
 
-	smu_major = (smu_version >> 16) & 0xffff;
-	smu_minor = (smu_version >> 8) & 0xff;
-	smu_debug = (smu_version >> 0) & 0xff;
 	if (smu->is_apu)
 		adev->pm.fw_version = smu_version;
 
@@ -281,7 +276,13 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
 	 * of halt driver loading.
 	 */
 	if (if_version != smu->smc_driver_if_version) {
-		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
+		uint8_t smu_minor, smu_debug;
+		uint16_t smu_major;
+
+		smu_major = (smu_version >> 16) & 0xffff;
+		smu_minor = (smu_version >> 8) & 0xff;
+		smu_debug = (smu_version >> 0) & 0xff;
+		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
 			"smu fw version = 0x%08x (%d.%d.%d)\n",
 			smu->smc_driver_if_version, if_version,
 			smu_version, smu_major, smu_minor, smu_debug);
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
index d60b8c5e8715..6368eb160a48 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
@@ -74,17 +74,12 @@ int smu_v12_0_check_fw_version(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 	uint32_t if_version = 0xff, smu_version = 0xff;
-	uint16_t smu_major;
-	uint8_t smu_minor, smu_debug;
 	int ret = 0;
 
 	ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version);
 	if (ret)
 		return ret;
 
-	smu_major = (smu_version >> 16) & 0xffff;
-	smu_minor = (smu_version >> 8) & 0xff;
-	smu_debug = (smu_version >> 0) & 0xff;
 	if (smu->is_apu)
 		adev->pm.fw_version = smu_version;
 
@@ -97,7 +92,13 @@ int smu_v12_0_check_fw_version(struct smu_context *smu)
 	 * of halt driver loading.
 	 */
 	if (if_version != smu->smc_driver_if_version) {
-		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
+		uint8_t smu_minor, smu_debug;
+		uint16_t smu_major;
+
+		smu_major = (smu_version >> 16) & 0xffff;
+		smu_minor = (smu_version >> 8) & 0xff;
+		smu_debug = (smu_version >> 0) & 0xff;
+		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
 			"smu fw version = 0x%08x (%d.%d.%d)\n",
 			smu->smc_driver_if_version, if_version,
 			smu_version, smu_major, smu_minor, smu_debug);
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index e946314e1f90..1d3ffcca81ad 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -231,7 +231,7 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 	 * of halt driver loading.
 	 */
 	if (if_version != smu->smc_driver_if_version) {
-		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
+		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
 			 "smu fw version = 0x%08x (%d.%d.%d)\n",
 			 smu->smc_driver_if_version, if_version,
 			 smu_version, smu_major, smu_minor, smu_debug);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-30 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 16:02 [PATCH v2 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Mario Limonciello
2021-07-30 16:02 ` [PATCH v2 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
2021-07-30 16:02 ` [PATCH v2 3/3] drm/amd/pm: Downgrade SMU mismatch information messages Mario Limonciello

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.