All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/amd/pm: Don't output SMU version for smu13 every time
@ 2021-07-30  2:40 Mario Limonciello
  2021-07-30  2:40 ` [PATCH 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mario Limonciello @ 2021-07-30  2:40 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.  It will still be accessible via
/sys/kernel/debug/dri/0/amdgpu_firmware_info

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

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..9c99c51740a1 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,9 +219,6 @@ 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",
-			 smu_version, smu_major, smu_minor, smu_debug);
-
 	/*
 	 * 1. if_version mismatch is not critical as our fw is designed
 	 * to be backward compatible.
-- 
2.25.1

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

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

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

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.

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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 20b049ad61c1..bcdefe1157ba 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1416,6 +1416,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] = {
@@ -1561,8 +1563,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

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

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

* [PATCH 3/3] drm/amd/pm: Downgrade SMU mismatch information messages
  2021-07-30  2:40 [PATCH 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Mario Limonciello
  2021-07-30  2:40 ` [PATCH 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
@ 2021-07-30  2:40 ` Mario Limonciello
  2021-07-30  4:54   ` Lazar, Lijo
  2021-07-30  5:01 ` [PATCH 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Lazar, Lijo
  2 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2021-07-30  2:40 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.  Don't output at WARN
level and scare people there is a problem.  Instead bring it down to
INFO level and the details about the mismatch into DEBUG levels.

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

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 b5419e8eba89..1fb2129899e5 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;
 
@@ -284,11 +279,17 @@ 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);
-		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
+		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
 	}
 
 	return ret;
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..ddd6bd5c78d7 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,11 +92,17 @@ 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);
-		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
+		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
 	}
 
 	return ret;
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 9c99c51740a1..242d3cc6a79b 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
@@ -194,18 +194,12 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
 int smu_v13_0_check_fw_version(struct smu_context *smu)
 {
 	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;
-
 	switch (smu->adev->asic_type) {
 	case CHIP_ALDEBARAN:
 		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_ALDE;
@@ -228,11 +222,18 @@ 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, "
+		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);
-		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
+		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
 	}
 
 	return ret;
-- 
2.25.1

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

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

* Re: [PATCH 3/3] drm/amd/pm: Downgrade SMU mismatch information messages
  2021-07-30  2:40 ` [PATCH 3/3] drm/amd/pm: Downgrade SMU mismatch information messages Mario Limonciello
@ 2021-07-30  4:54   ` Lazar, Lijo
  0 siblings, 0 replies; 6+ messages in thread
From: Lazar, Lijo @ 2021-07-30  4:54 UTC (permalink / raw)
  To: Mario Limonciello, amd-gfx



On 7/30/2021 8:10 AM, Mario Limonciello wrote:
> The SMU driver interface and firmware interface messages have comments
> indicating that they are backwards compatible.  Don't output at WARN
> level and scare people there is a problem.  Instead bring it down to
> INFO level and the details about the mismatch into DEBUG levels.
> 

That comment is misleading. We are more lenient on Linux that at least 
we consider it as warning. On a Windows driver this mismatch is treated 
as error. We need to keep the warn level.

Thanks,
Lijo

> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>   drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 15 ++++++++-------
>   drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 15 ++++++++-------
>   drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 17 +++++++++--------
>   3 files changed, 25 insertions(+), 22 deletions(-)
> 
> 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 b5419e8eba89..1fb2129899e5 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;
>   
> @@ -284,11 +279,17 @@ 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);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> 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..ddd6bd5c78d7 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,11 +92,17 @@ 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);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> 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 9c99c51740a1..242d3cc6a79b 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
> @@ -194,18 +194,12 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
>   int smu_v13_0_check_fw_version(struct smu_context *smu)
>   {
>   	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;
> -
>   	switch (smu->adev->asic_type) {
>   	case CHIP_ALDEBARAN:
>   		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_ALDE;
> @@ -228,11 +222,18 @@ 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, "
> +		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);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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



On 7/30/2021 8:10 AM, Mario Limonciello wrote:
> This adjusts SMU13 to match SMU11 and SMU12 behaviors in not showing
> this message all the time.  It will still be accessible via
> /sys/kernel/debug/dri/0/amdgpu_firmware_info
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>   drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> 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..9c99c51740a1 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,9 +219,6 @@ 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",
> -			 smu_version, smu_major, smu_minor, smu_debug);
> -

Suggest to keep this at debug level. There are cases like a failed 
driver load (debugfs files are not created) where we need to check this 
information.

Thanks,
Lijo

>   	/*
>   	 * 1. if_version mismatch is not critical as our fw is designed
>   	 * to be backward compatible.
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs
  2021-07-30  2:40 ` [PATCH 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
@ 2021-07-30  5:08   ` Lazar, Lijo
  0 siblings, 0 replies; 6+ messages in thread
From: Lazar, Lijo @ 2021-07-30  5:08 UTC (permalink / raw)
  To: Mario Limonciello, amd-gfx

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

On 7/30/2021 8:10 AM, Mario Limonciello wrote:
> 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.
> 
> 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(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 20b049ad61c1..bcdefe1157ba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -1416,6 +1416,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] = {
> @@ -1561,8 +1563,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;
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  2:40 [PATCH 1/3] drm/amd/pm: Don't output SMU version for smu13 every time Mario Limonciello
2021-07-30  2:40 ` [PATCH 2/3] drm/amdgpu: Convert SMU version to decimal in debugfs Mario Limonciello
2021-07-30  5:08   ` Lazar, Lijo
2021-07-30  2:40 ` [PATCH 3/3] drm/amd/pm: Downgrade SMU mismatch information messages Mario Limonciello
2021-07-30  4:54   ` Lazar, Lijo
2021-07-30  5:01 ` [PATCH 1/3] drm/amd/pm: Don't output SMU version for smu13 every time 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.