All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC
@ 2021-12-13 15:08 Mario Limonciello
  2021-12-13 15:08 ` [PATCH v2 2/2] drivers/amd/pm: drop statement to print FW version for smu_v13 Mario Limonciello
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mario Limonciello @ 2021-12-13 15:08 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello

This value does not get cached into adev->pm.fw_version during
startup for smu13 like it does for other SMU like smu12.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2:
* Run on all v13 APU to match v12 behavior
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

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 55421ea622fb..7fdb63da1316 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
@@ -196,6 +196,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
 
 int smu_v13_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;
@@ -208,6 +209,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 	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;
 
 	switch (smu->adev->ip_versions[MP1_HWIP][0]) {
 	case IP_VERSION(13, 0, 2):
-- 
2.25.1


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

* [PATCH v2 2/2] drivers/amd/pm: drop statement to print FW version for smu_v13
  2021-12-13 15:08 [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Mario Limonciello
@ 2021-12-13 15:08 ` Mario Limonciello
  2021-12-13 15:32 ` [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Deucher, Alexander
  2021-12-14  2:41 ` Chen, Guchun
  2 siblings, 0 replies; 5+ messages in thread
From: Mario Limonciello @ 2021-12-13 15:08 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello

Update smu_v13 to match smu_v12 and smu_v11 behavior where this is
fetched from debugfs rather than in kernel logs on every boot.

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 7fdb63da1316..677a246212f9 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
@@ -227,9 +227,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


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

* Re: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC
  2021-12-13 15:08 [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Mario Limonciello
  2021-12-13 15:08 ` [PATCH v2 2/2] drivers/amd/pm: drop statement to print FW version for smu_v13 Mario Limonciello
@ 2021-12-13 15:32 ` Deucher, Alexander
  2021-12-14  2:41 ` Chen, Guchun
  2 siblings, 0 replies; 5+ messages in thread
From: Deucher, Alexander @ 2021-12-13 15:32 UTC (permalink / raw)
  To: Limonciello, Mario, amd-gfx

[-- Attachment #1: Type: text/plain, Size: 1814 bytes --]

[Public]

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Mario Limonciello <mario.limonciello@amd.com>
Sent: Monday, December 13, 2021 10:08 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
Subject: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

This value does not get cached into adev->pm.fw_version during
startup for smu13 like it does for other SMU like smu12.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2:
* Run on all v13 APU to match v12 behavior
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

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 55421ea622fb..7fdb63da1316 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
@@ -196,6 +196,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)

 int smu_v13_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;
@@ -208,6 +209,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
         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;

         switch (smu->adev->ip_versions[MP1_HWIP][0]) {
         case IP_VERSION(13, 0, 2):
--
2.25.1


[-- Attachment #2: Type: text/html, Size: 3457 bytes --]

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

* RE: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC
  2021-12-13 15:08 [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Mario Limonciello
  2021-12-13 15:08 ` [PATCH v2 2/2] drivers/amd/pm: drop statement to print FW version for smu_v13 Mario Limonciello
  2021-12-13 15:32 ` [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Deucher, Alexander
@ 2021-12-14  2:41 ` Chen, Guchun
  2021-12-14  2:42   ` Limonciello, Mario
  2 siblings, 1 reply; 5+ messages in thread
From: Chen, Guchun @ 2021-12-14  2:41 UTC (permalink / raw)
  To: Limonciello, Mario, amd-gfx; +Cc: Limonciello, Mario

[Public]

A nitpick.

As we have defined a local variable 'adev', so code like 'smu->adev' should be replaced directly by 'adev' in the function to make code clean.

With above addressed, the series is:

Reviewed-by: Guchun Chen <guchun.chen@amd.com>

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Mario Limonciello
Sent: Monday, December 13, 2021 11:09 PM
To: amd-gfx@lists.freedesktop.org
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
Subject: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

This value does not get cached into adev->pm.fw_version during startup for smu13 like it does for other SMU like smu12.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2:
* Run on all v13 APU to match v12 behavior  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

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 55421ea622fb..7fdb63da1316 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
@@ -196,6 +196,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
 
 int smu_v13_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;
@@ -208,6 +209,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 	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;
 
 	switch (smu->adev->ip_versions[MP1_HWIP][0]) {
 	case IP_VERSION(13, 0, 2):
--
2.25.1

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

* Re: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC
  2021-12-14  2:41 ` Chen, Guchun
@ 2021-12-14  2:42   ` Limonciello, Mario
  0 siblings, 0 replies; 5+ messages in thread
From: Limonciello, Mario @ 2021-12-14  2:42 UTC (permalink / raw)
  To: Chen, Guchun, amd-gfx

[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]

I've pushed it already after Alex's review comment. I'll send an extra patch tomorrow for this extra cleanup.

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Chen, Guchun <Guchun.Chen@amd.com>
Sent: Monday, December 13, 2021 8:41:17 PM
To: Limonciello, Mario <Mario.Limonciello@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
Subject: RE: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

[Public]

A nitpick.

As we have defined a local variable 'adev', so code like 'smu->adev' should be replaced directly by 'adev' in the function to make code clean.

With above addressed, the series is:

Reviewed-by: Guchun Chen <guchun.chen@amd.com>

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Mario Limonciello
Sent: Monday, December 13, 2021 11:09 PM
To: amd-gfx@lists.freedesktop.org
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
Subject: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

This value does not get cached into adev->pm.fw_version during startup for smu13 like it does for other SMU like smu12.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2:
* Run on all v13 APU to match v12 behavior  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

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 55421ea622fb..7fdb63da1316 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
@@ -196,6 +196,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)

 int smu_v13_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;
@@ -208,6 +209,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
         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;

         switch (smu->adev->ip_versions[MP1_HWIP][0]) {
         case IP_VERSION(13, 0, 2):
--
2.25.1

[-- Attachment #2: Type: text/html, Size: 4003 bytes --]

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

end of thread, other threads:[~2021-12-14  2:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 15:08 [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Mario Limonciello
2021-12-13 15:08 ` [PATCH v2 2/2] drivers/amd/pm: drop statement to print FW version for smu_v13 Mario Limonciello
2021-12-13 15:32 ` [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC Deucher, Alexander
2021-12-14  2:41 ` Chen, Guchun
2021-12-14  2:42   ` Limonciello, Mario

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.