Skip to contentSkip to conversation

drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset

PATCH Superseded Tim Huang 3 participants 6 messages Jan 20, 2023 – Jan 21, 2023

Subsystems (3)
lore
Share & tools
lore

Tim Huang

author
#0 lore raw

PATCH 1/2 drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset

The psp suspend & resume should be skipped to avoid destroy the TMR and reload FWs again for IMU enabled APU ASICs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +12 -0
index efd4f8226120..0f9a5b12c3a5 100644
@@ -3036,6 +3036,18 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
 		    (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SDMA))
 			continue;
 
+		/* Once swPSP provides the IMU, RLC FW binaries to TOS during cold-boot.
+		 * These are in TMR, hence are expected to be reused by PSP-TOS to reload
+		 * from this location and RLC Autoload automatically also gets loaded
+		 * from here based on PMFW -> PSP message during re-init sequence.
+		 * Therefore, the psp suspend & resume should be skipped to avoid destroy
+		 * the TMR and reload FWs again for IMU enabled APU ASICs.
+		 */
+		if (amdgpu_in_reset(adev) &&
+		    (adev->flags & AMD_IS_APU) && adev->gfx.imu.funcs &&
+		    adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
+			continue;
+
 		/* XXX handle errors */
 		r = adev->ip_blocks[i].version->funcs->suspend(adev);
 		/* XXX handle errors */
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/2 drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

PMFW will handle that properly. Driver involvement may cause some unexpected issues.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
index ec52830dde24..800eb5ad1dcb 100644
@@ -1448,6 +1448,8 @@ static int smu_disable_dpms(struct smu_context *smu)
 	case IP_VERSION(13, 0, 0):
 	case IP_VERSION(13, 0, 7):
 	case IP_VERSION(13, 0, 10):
+	case IP_VERSION(13, 0, 4):
+	case IP_VERSION(13, 0, 11):
 		return 0;
 	default:
 		break;
Signature · 1 line
2.25.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

Series is:

Quoted 25 lines · Tim Huang

PMFW will handle that properly. Driver involvement may cause some unexpected issues.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
index ec52830dde24..800eb5ad1dcb 100644
@@ -1448,6 +1448,8 @@ static int smu_disable_dpms(struct smu_context *smu)
        case IP_VERSION(13, 0, 0):
        case IP_VERSION(13, 0, 7):
        case IP_VERSION(13, 0, 10):
+       case IP_VERSION(13, 0, 4):
+       case IP_VERSION(13, 0, 11):
                return 0;
        default:
                break;
--

2.25.1

Reviewed-by on v1 2/2
#3 lore raw

RE: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

In reply to Tim Huang

[Public]

Quoted 25 lines

-----Original Message-----
From: Huang, Tim <[email protected]>
Sent: Friday, January 20, 2023 10:29
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; Du, Xiaojian <[email protected]>; Ma, Li <[email protected]>; Limonciello, Mario <[email protected]>; Huang, Tim <[email protected]>
Subject: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

PMFW will handle that properly. Driver involvement may cause some unexpected issues.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
index ec52830dde24..800eb5ad1dcb 100644

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_disable_dpms(struct smu_context · line 1452

Quoted 5 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
@@ -1448,6 +1448,8 @@ static int smu_disable_dpms(struct smu_context
 *smu)
 	case IP_VERSION(13, 0, 0):
 	case IP_VERSION(13, 0, 7):
 	case IP_VERSION(13, 0, 10):
+	case IP_VERSION(13, 0, 4):

To keep a consistent ordering scheme, I think IP_VERSION(13, 0, 4) should come after IP_VERION(13, 0, 0).

w/ that fixed:

6.1 is used for IP_VERSION(13, 0, 4), so please also include
Cc: [email protected] #6.1

Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
+	case IP_VERSION(13, 0, 11):
 		return 0;
 	default:

break;
--
2.25.1

author Reviewed-by Mario Limonciello
#4 lore raw

RE: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

[Public]

Hi Mario,

-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Saturday, January 21, 2023 12:36 AM
To: Huang, Tim <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; Du, Xiaojian <[email protected]>; Ma, Li <[email protected]>
Subject: RE: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

[Public]

Quoted 31 lines

-----Original Message-----
From: Huang, Tim <[email protected]>
Sent: Friday, January 20, 2023 10:29
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; Du, Xiaojian <[email protected]>; Ma, Li <[email protected]>; Limonciello, Mario <[email protected]>; Huang, Tim <[email protected]>
Subject: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11

PMFW will handle that properly. Driver involvement may cause some unexpected issues.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
index ec52830dde24..800eb5ad1dcb 100644
@@ -1448,6 +1448,8 @@ static int smu_disable_dpms(struct smu_context
 *smu)
      case IP_VERSION(13, 0, 0):
      case IP_VERSION(13, 0, 7):
      case IP_VERSION(13, 0, 10):
+     case IP_VERSION(13, 0, 4):
 
Quoted 1 line

To keep a consistent ordering scheme, I think IP_VERSION(13, 0, 4) should come after IP_VERION(13, 0, 0).

Thanks for point out that, but I will drop this patch and send a new one to apply it only for gpu reset case.

w/ that fixed:

6.1 is used for IP_VERSION(13, 0, 4), so please also include
Cc: [email protected] #6.1

Quoted 6 lines

+ case IP_VERSION(13, 0, 11):

              return 0;
      default:
              break;

--
2.25.1

Reviewed-by on v1 1/2
#5 lore raw
In reply to Tim Huang

[Public]

Quoted 11 lines

-----Original Message-----
From: Huang, Tim <[email protected]>
Sent: Friday, January 20, 2023 10:29
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; Du, Xiaojian <[email protected]>; Ma, Li <[email protected]>; Limonciello, Mario <[email protected]>; Huang, Tim <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset

Quoted 4 lines

The psp suspend & resume should be skipped to avoid destroy the TMR and reload FWs again for IMU enabled APU ASICs.

Please also for this one
Cc: [email protected] # 6.1

Quoted 38 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index efd4f8226120..0f9a5b12c3a5 100644
@@ -3036,6 +3036,18 @@ static int
 amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
 		    (adev->ip_blocks[i].version->type ==
 AMD_IP_BLOCK_TYPE_SDMA))
 			continue;
 
+		/* Once swPSP provides the IMU, RLC FW binaries to TOS

during cold-boot.

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+		 * These are in TMR, hence are expected to be reused by

PSP-TOS to reload

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+		 * from this location and RLC Autoload automatically also gets

loaded

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+		 * from here based on PMFW -> PSP message during re-init

sequence.

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+		 * Therefore, the psp suspend & resume should be skipped

to avoid destroy

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -0
+		 * the TMR and reload FWs again for IMU enabled APU ASICs.
+		 */
+		if (amdgpu_in_reset(adev) &&
+		    (adev->flags & AMD_IS_APU) && adev->gfx.imu.funcs &&
+		    adev->ip_blocks[i].version->type ==

AMD_IP_BLOCK_TYPE_PSP)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
+			continue;
+
 		/* XXX handle errors */
 		r = adev->ip_blocks[i].version->funcs->suspend(adev);
 		/* XXX handle errors */
--

2.25.1