RE: [PATCH 1/3] drm/amdgpu: ungate power gating when system suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Hi Kevin, Kenneth,

Thanks for the review and ack, will pick it up in v2.

Regards.
Perry

> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>
> Sent: Tuesday, October 24, 2023 4:15 PM
> To: Feng, Kenneth <Kenneth.Feng@xxxxxxx>; Yuan, Perry
> <Perry.Yuan@xxxxxxx>; Zhang, Yifan <Yifan1.Zhang@xxxxxxx>;
> Limonciello, Mario <Mario.Limonciello@xxxxxxx>
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; amd-
> gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH 1/3] drm/amdgpu: ungate power gating when system
> suspend
>
> [AMD Official Use Only - General]
>
> Acked-by: Yang Wang <kevinyang.wang@xxxxxxx>
>
> Best Regards,
> Kevin
>
> -----Original Message-----
> From: Feng, Kenneth <Kenneth.Feng@xxxxxxx>
> Sent: Tuesday, October 24, 2023 2:33 PM
> To: Yuan, Perry <Perry.Yuan@xxxxxxx>; Zhang, Yifan
> <Yifan1.Zhang@xxxxxxx>; Limonciello, Mario
> <Mario.Limonciello@xxxxxxx>
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Wang, Yang(Kevin)
> <KevinYang.Wang@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH 1/3] drm/amdgpu: ungate power gating when system
> suspend
>
> [AMD Official Use Only - General]
>
> Reviewed-by: Kenneth Feng <kenneth.feng@xxxxxxx>
>
>
> -----Original Message-----
> From: Yuan, Perry <Perry.Yuan@xxxxxxx>
> Sent: Tuesday, October 24, 2023 10:33 AM
> To: Zhang, Yifan <Yifan1.Zhang@xxxxxxx>; Feng, Kenneth
> <Kenneth.Feng@xxxxxxx>; Limonciello, Mario
> <Mario.Limonciello@xxxxxxx>
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Wang, Yang(Kevin)
> <KevinYang.Wang@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH 1/3] drm/amdgpu: ungate power gating when system
> suspend
>
> [Why] During suspend, if GFX DPM is enabled and GFXOFF feature is enabled
> the system may get hung. So, it is suggested to disable GFXOFF feature
> during suspend and enable it after resume.
>
> [How] Update the code to disable GFXOFF feature during suspend and
> enable it after resume.
>
> [  311.396526] amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your
> previous command: SMN_C2PMSG_66:0x0000001E
> SMN_C2PMSG_82:0x00000000 [  311.396530] amdgpu 0000:03:00.0: amdgpu:
> Fail to disable dpm features!
> [  311.396531] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]]
> *ERROR* suspend of IP block <smu> failed -62
>
> Signed-off-by: Perry Yuan <perry.yuan@xxxxxxx>
> Signed-off-by: Kun Liu <kun.liu2@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index d9ccacd06fba..6399bc71c56d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -3498,6 +3498,8 @@ static void gfx_v10_0_ring_invalidate_tlbs(struct
> amdgpu_ring *ring,  static void
> gfx_v10_0_update_spm_vmid_internal(struct amdgpu_device *adev,
>                                                unsigned int vmid);
>
> +static int gfx_v10_0_set_powergating_state(void *handle,
> +                                         enum amd_powergating_state state);
>  static void gfx10_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t
> queue_mask)  {
>         amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_SET_RESOURCES, 6));
> @@ -7172,6 +7174,13 @@ static int gfx_v10_0_hw_fini(void *handle)
>         amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
>         amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
>
> +       /* WA added for Vangogh asic fixing the SMU suspend failure
> +        * It needs to set power gating again during gfxoff control
> +        * otherwise the gfxoff disallowing will be failed to set.
> +        */
> +       if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(10, 3, 1))
> +               gfx_v10_0_set_powergating_state(handle,
> AMD_PG_STATE_UNGATE);
> +
>         if (!adev->no_hw_access) {
>                 if (amdgpu_async_gfx_ring) {
>                         if (amdgpu_gfx_disable_kgq(adev, 0))
> --
> 2.34.1
>
>





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux