All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset
@ 2023-01-20 16:28 Tim Huang
  2023-01-20 16:28 ` [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 Tim Huang
  2023-01-20 16:38 ` [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset Limonciello, Mario
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Huang @ 2023-01-20 16:28 UTC (permalink / raw)
  To: amd-gfx
  Cc: Yifan1.zhang, Xiaojian.Du, Tim Huang, li.ma, Alexander.Deucher,
	mario.limonciello

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

Signed-off-by: Tim Huang <tim.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index efd4f8226120..0f9a5b12c3a5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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 */
-- 
2.25.1


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

* [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
  2023-01-20 16:28 [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset Tim Huang
@ 2023-01-20 16:28 ` Tim Huang
  2023-01-20 16:35   ` Alex Deucher
  2023-01-20 16:35   ` Limonciello, Mario
  2023-01-20 16:38 ` [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset Limonciello, Mario
  1 sibling, 2 replies; 6+ messages in thread
From: Tim Huang @ 2023-01-20 16:28 UTC (permalink / raw)
  To: amd-gfx
  Cc: Yifan1.zhang, Xiaojian.Du, Tim Huang, li.ma, Alexander.Deucher,
	mario.limonciello

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

Signed-off-by: Tim Huang <tim.huang@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index ec52830dde24..800eb5ad1dcb 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -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


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

* Re: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
  2023-01-20 16:28 ` [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 Tim Huang
@ 2023-01-20 16:35   ` Alex Deucher
  2023-01-20 16:35   ` Limonciello, Mario
  1 sibling, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2023-01-20 16:35 UTC (permalink / raw)
  To: Tim Huang
  Cc: Yifan1.zhang, Xiaojian.Du, amd-gfx, mario.limonciello,
	Alexander.Deucher, li.ma

Series is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>

On Fri, Jan 20, 2023 at 11:29 AM Tim Huang <tim.huang@amd.com> wrote:
>
> PMFW will handle that properly. Driver involvement may cause some
> unexpected issues.
>
> Signed-off-by: Tim Huang <tim.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index ec52830dde24..800eb5ad1dcb 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -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
>

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

* RE: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
  2023-01-20 16:28 ` [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 Tim Huang
  2023-01-20 16:35   ` Alex Deucher
@ 2023-01-20 16:35   ` Limonciello, Mario
  2023-01-21  2:29     ` Huang, Tim
  1 sibling, 1 reply; 6+ messages in thread
From: Limonciello, Mario @ 2023-01-20 16:35 UTC (permalink / raw)
  To: Huang, Tim, amd-gfx
  Cc: Deucher, Alexander, Zhang, Yifan, Ma, Li, Du, Xiaojian

[Public]



> -----Original Message-----
> From: Huang, Tim <Tim.Huang@amd.com>
> Sent: Friday, January 20, 2023 10:29
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan
> <Yifan1.Zhang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Ma, Li
> <Li.Ma@amd.com>; Limonciello, Mario <Mario.Limonciello@amd.com>;
> Huang, Tim <Tim.Huang@amd.com>
> 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.
> 
> Signed-off-by: Tim Huang <tim.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index ec52830dde24..800eb5ad1dcb 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -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:
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

6.1 is used for IP_VERSION(13, 0, 4), so please also include
Cc: stable@vger.kernel.org #6.1

> +	case IP_VERSION(13, 0, 11):
>  		return 0;
>  	default:
>  		break;
> --
> 2.25.1

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

* RE: [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset
  2023-01-20 16:28 [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset Tim Huang
  2023-01-20 16:28 ` [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 Tim Huang
@ 2023-01-20 16:38 ` Limonciello, Mario
  1 sibling, 0 replies; 6+ messages in thread
From: Limonciello, Mario @ 2023-01-20 16:38 UTC (permalink / raw)
  To: Huang, Tim, amd-gfx
  Cc: Deucher, Alexander, Zhang, Yifan, Ma, Li, Du, Xiaojian

[Public]



> -----Original Message-----
> From: Huang, Tim <Tim.Huang@amd.com>
> Sent: Friday, January 20, 2023 10:29
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan
> <Yifan1.Zhang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Ma, Li
> <Li.Ma@amd.com>; Limonciello, Mario <Mario.Limonciello@amd.com>;
> Huang, Tim <Tim.Huang@amd.com>
> Subject: [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.
> 
> Signed-off-by: Tim Huang <tim.huang@amd.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

Please also for this one
Cc: stable@vger.kernel.org # 6.1 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index efd4f8226120..0f9a5b12c3a5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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 */
> --
> 2.25.1

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

* RE: [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
  2023-01-20 16:35   ` Limonciello, Mario
@ 2023-01-21  2:29     ` Huang, Tim
  0 siblings, 0 replies; 6+ messages in thread
From: Huang, Tim @ 2023-01-21  2:29 UTC (permalink / raw)
  To: Limonciello, Mario
  Cc: Deucher, Alexander, Zhang, Yifan, amd-gfx, Ma, Li, Du, Xiaojian

[Public]

Hi Mario,

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

[Public]



> -----Original Message-----
> From: Huang, Tim <Tim.Huang@amd.com>
> Sent: Friday, January 20, 2023 10:29
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan
> <Yifan1.Zhang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Ma, Li
> <Li.Ma@amd.com>; Limonciello, Mario <Mario.Limonciello@amd.com>;
> Huang, Tim <Tim.Huang@amd.com>
> 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.
>
> Signed-off-by: Tim Huang <tim.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index ec52830dde24..800eb5ad1dcb 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -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).

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:
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

6.1 is used for IP_VERSION(13, 0, 4), so please also include
Cc: stable@vger.kernel.org #6.1

> +     case IP_VERSION(13, 0, 11):
>               return 0;
>       default:
>               break;
> --
> 2.25.1

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

end of thread, other threads:[~2023-01-21  2:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 16:28 [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset Tim Huang
2023-01-20 16:28 ` [PATCH 2/2] drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 Tim Huang
2023-01-20 16:35   ` Alex Deucher
2023-01-20 16:35   ` Limonciello, Mario
2023-01-21  2:29     ` Huang, Tim
2023-01-20 16:38 ` [PATCH 1/2] drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset 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.