All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
@ 2020-04-07 13:14 Prike Liang
  2020-04-07 14:55 ` Huang Rui
  2020-04-11 23:55 ` Johannes Hirte
  0 siblings, 2 replies; 8+ messages in thread
From: Prike Liang @ 2020-04-07 13:14 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alexander.Deucher, Prike Liang, ray.huang, evan.quan

The system will be hang up during S3 suspend because of SMU is pending
for GC not respose the register CP_HQD_ACTIVE access request.This issue
root cause of accessing the GC register under enter GFX CGGPG and can
be fixed by disable GFX CGPG before perform suspend.

v2: Use disable the GFX CGPG instead of RLC safe mode guard.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2e1f955..bf8735b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2440,8 +2440,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
 {
 	int i, r;
 
-	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
-	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
 	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
 		if (!adev->ip_blocks[i].status.valid)
@@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
 		}
 	}
 
+	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
+	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
+
 	amdgpu_amdkfd_suspend(adev, !fbcon);
 
 	amdgpu_ras_suspend(adev);
-- 
2.7.4

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

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

* Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-07 13:14 [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2) Prike Liang
@ 2020-04-07 14:55 ` Huang Rui
  2020-04-11 23:55 ` Johannes Hirte
  1 sibling, 0 replies; 8+ messages in thread
From: Huang Rui @ 2020-04-07 14:55 UTC (permalink / raw)
  To: Liang, Prike
  Cc: Deucher, Alexander, Quan, Evan, amd-gfx@lists.freedesktop.org

On Tue, Apr 07, 2020 at 09:14:16PM +0800, Liang, Prike wrote:
> The system will be hang up during S3 suspend because of SMU is pending
> for GC not respose the register CP_HQD_ACTIVE access request.This issue
> root cause of accessing the GC register under enter GFX CGGPG and can
> be fixed by disable GFX CGPG before perform suspend.
> 
> v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> 
> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2e1f955..bf8735b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2440,8 +2440,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
>  {
>  	int i, r;
>  
> -	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> -	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
>  
>  	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
>  		if (!adev->ip_blocks[i].status.valid)
> @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
>  		}
>  	}
>  
> +	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> +	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> +
>  	amdgpu_amdkfd_suspend(adev, !fbcon);
>  
>  	amdgpu_ras_suspend(adev);
> -- 
> 2.7.4
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-07 13:14 [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2) Prike Liang
  2020-04-07 14:55 ` Huang Rui
@ 2020-04-11 23:55 ` Johannes Hirte
  2020-04-12  3:49   ` Liang, Prike
  1 sibling, 1 reply; 8+ messages in thread
From: Johannes Hirte @ 2020-04-11 23:55 UTC (permalink / raw)
  To: Prike Liang; +Cc: Alexander.Deucher, ray.huang, evan.quan, amd-gfx

On 2020 Apr 07, Prike Liang wrote:
> The system will be hang up during S3 suspend because of SMU is pending
> for GC not respose the register CP_HQD_ACTIVE access request.This issue
> root cause of accessing the GC register under enter GFX CGGPG and can
> be fixed by disable GFX CGPG before perform suspend.
> 
> v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> 
> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2e1f955..bf8735b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2440,8 +2440,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
>  {
>  	int i, r;
>  
> -	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> -	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
>  
>  	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
>  		if (!adev->ip_blocks[i].status.valid)
> @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
>  		}
>  	}
>  
> +	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> +	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> +
>  	amdgpu_amdkfd_suspend(adev, !fbcon);
>  
>  	amdgpu_ras_suspend(adev);


This breaks shutdown/reboot on my system (Dell latitude 5495). 

-- 
Regards,
  Johannes Hirte

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

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

* RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-11 23:55 ` Johannes Hirte
@ 2020-04-12  3:49   ` Liang, Prike
  2020-04-12  6:58     ` Pan, Xinhui
  2020-04-12 10:21     ` Johannes Hirte
  0 siblings, 2 replies; 8+ messages in thread
From: Liang, Prike @ 2020-04-12  3:49 UTC (permalink / raw)
  To: Johannes Hirte
  Cc: Deucher, Alexander, Huang, Ray, Quan, Evan,
	amd-gfx@lists.freedesktop.org

Thanks update and verify. Could you give more detail information and error log message   
about you observed issue? 

Thanks,
Prike
> -----Original Message-----
> From: Johannes Hirte <johannes.hirte@datenkhaos.de>
> Sent: Sunday, April 12, 2020 7:56 AM
> To: Liang, Prike <Prike.Liang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>;
> Quan, Evan <Evan.Quan@amd.com>
> Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video
> playback (v2)
> 
> On 2020 Apr 07, Prike Liang wrote:
> > The system will be hang up during S3 suspend because of SMU is pending
> > for GC not respose the register CP_HQD_ACTIVE access request.This
> > issue root cause of accessing the GC register under enter GFX CGGPG
> > and can be fixed by disable GFX CGPG before perform suspend.
> >
> > v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> >
> > Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> > Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 2e1f955..bf8735b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -2440,8 +2440,6 @@ static int
> > amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)  {
> >  	int i, r;
> >
> > -	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > -	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> >
> >  	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
> >  		if (!adev->ip_blocks[i].status.valid)
> > @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
> >  		}
> >  	}
> >
> > +	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > +	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> > +
> >  	amdgpu_amdkfd_suspend(adev, !fbcon);
> >
> >  	amdgpu_ras_suspend(adev);
> 
> 
> This breaks shutdown/reboot on my system (Dell latitude 5495).
> 
> --
> Regards,
>   Johannes Hirte

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

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

* Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-12  3:49   ` Liang, Prike
@ 2020-04-12  6:58     ` Pan, Xinhui
  2020-04-13  4:23       ` Liang, Prike
  2020-04-12 10:21     ` Johannes Hirte
  1 sibling, 1 reply; 8+ messages in thread
From: Pan, Xinhui @ 2020-04-12  6:58 UTC (permalink / raw)
  To: Johannes Hirte, Liang, Prike
  Cc: Deucher, Alexander, Huang, Ray, amd-gfx@lists.freedesktop.org,
	Quan, Evan


[-- Attachment #1.1: Type: text/plain, Size: 3311 bytes --]

Prike
I hit this issue too. reboot hung with my vega10.  it is ok with navi10.
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Liang, Prike <Prike.Liang@amd.com>
Sent: Sunday, April 12, 2020 11:49:39 AM
To: Johannes Hirte <johannes.hirte@datenkhaos.de>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Subject: RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)

Thanks update and verify. Could you give more detail information and error log message
about you observed issue?

Thanks,
Prike
> -----Original Message-----
> From: Johannes Hirte <johannes.hirte@datenkhaos.de>
> Sent: Sunday, April 12, 2020 7:56 AM
> To: Liang, Prike <Prike.Liang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>;
> Quan, Evan <Evan.Quan@amd.com>
> Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video
> playback (v2)
>
> On 2020 Apr 07, Prike Liang wrote:
> > The system will be hang up during S3 suspend because of SMU is pending
> > for GC not respose the register CP_HQD_ACTIVE access request.This
> > issue root cause of accessing the GC register under enter GFX CGGPG
> > and can be fixed by disable GFX CGPG before perform suspend.
> >
> > v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> >
> > Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> > Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 2e1f955..bf8735b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -2440,8 +2440,6 @@ static int
> > amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)  {
> >      int i, r;
> >
> > -   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > -   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> >
> >      for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
> >              if (!adev->ip_blocks[i].status.valid)
> > @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
> >              }
> >      }
> >
> > +   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > +   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> > +
> >      amdgpu_amdkfd_suspend(adev, !fbcon);
> >
> >      amdgpu_ras_suspend(adev);
>
>
> This breaks shutdown/reboot on my system (Dell latitude 5495).
>
> --
> Regards,
>   Johannes Hirte

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cxinhui.pan%40amd.com%7Cde6e0578174940b5f29808d7de948b88%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637222601969843248&amp;sdata=quWGElw%2Fo70VJibuZ7%2BzS%2FcHH2OHSDB%2B5uaFPQUf2Os%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 5446 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-12  3:49   ` Liang, Prike
  2020-04-12  6:58     ` Pan, Xinhui
@ 2020-04-12 10:21     ` Johannes Hirte
  1 sibling, 0 replies; 8+ messages in thread
From: Johannes Hirte @ 2020-04-12 10:21 UTC (permalink / raw)
  To: Liang, Prike
  Cc: Deucher, Alexander, Huang, Ray, Quan, Evan,
	amd-gfx@lists.freedesktop.org

On 2020 Apr 12, Liang, Prike wrote:
> Thanks update and verify. Could you give more detail information and error log message   
> about you observed issue? 
> 
> Thanks,
> Prike

There is no error log, the system just doesn't poweroff/reboot. 

lspci:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5762 Gigabit Ethernet PCIe (rev 10)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev d1)
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
04:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver
05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61)

-- 
Regards,
  Johannes Hirte

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

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

* RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-12  6:58     ` Pan, Xinhui
@ 2020-04-13  4:23       ` Liang, Prike
  2020-04-13  4:28         ` Pan, Xinhui
  0 siblings, 1 reply; 8+ messages in thread
From: Liang, Prike @ 2020-04-13  4:23 UTC (permalink / raw)
  To: Pan, Xinhui, Johannes Hirte
  Cc: Deucher, Alexander, Huang, Ray, amd-gfx@lists.freedesktop.org,
	Quan, Evan


[-- Attachment #1.1: Type: text/plain, Size: 4416 bytes --]

Could you share the PCI sub revision and I try check the issue on the Vega10(1002:687f) but can't find the
reboot hang up.

Thanks,
Prike
From: Pan, Xinhui <Xinhui.Pan@amd.com>
Sent: Sunday, April 12, 2020 2:58 PM
To: Johannes Hirte <johannes.hirte@datenkhaos.de>; Liang, Prike <Prike.Liang@amd.com>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)

Prike
I hit this issue too. reboot hung with my vega10.  it is ok with navi10.
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Liang, Prike <Prike.Liang@amd.com<mailto:Prike.Liang@amd.com>>
Sent: Sunday, April 12, 2020 11:49:39 AM
To: Johannes Hirte <johannes.hirte@datenkhaos.de<mailto:johannes.hirte@datenkhaos.de>>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com<mailto:Alexander.Deucher@amd.com>>; Huang, Ray <Ray.Huang@amd.com<mailto:Ray.Huang@amd.com>>; Quan, Evan <Evan.Quan@amd.com<mailto:Evan.Quan@amd.com>>; amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> <amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>
Subject: RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)

Thanks update and verify. Could you give more detail information and error log message
about you observed issue?

Thanks,
Prike
> -----Original Message-----
> From: Johannes Hirte <johannes.hirte@datenkhaos.de<mailto:johannes.hirte@datenkhaos.de>>
> Sent: Sunday, April 12, 2020 7:56 AM
> To: Liang, Prike <Prike.Liang@amd.com<mailto:Prike.Liang@amd.com>>
> Cc: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>; Deucher, Alexander
> <Alexander.Deucher@amd.com<mailto:Alexander.Deucher@amd.com>>; Huang, Ray <Ray.Huang@amd.com<mailto:Ray.Huang@amd.com>>;
> Quan, Evan <Evan.Quan@amd.com<mailto:Evan.Quan@amd.com>>
> Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video
> playback (v2)
>
> On 2020 Apr 07, Prike Liang wrote:
> > The system will be hang up during S3 suspend because of SMU is pending
> > for GC not respose the register CP_HQD_ACTIVE access request.This
> > issue root cause of accessing the GC register under enter GFX CGGPG
> > and can be fixed by disable GFX CGPG before perform suspend.
> >
> > v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> >
> > Signed-off-by: Prike Liang <Prike.Liang@amd.com<mailto:Prike.Liang@amd.com>>
> > Tested-by: Mengbing Wang <Mengbing.Wang@amd.com<mailto:Mengbing.Wang@amd.com>>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 2e1f955..bf8735b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -2440,8 +2440,6 @@ static int
> > amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)  {
> >      int i, r;
> >
> > -   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > -   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> >
> >      for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
> >              if (!adev->ip_blocks[i].status.valid)
> > @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
> >              }
> >      }
> >
> > +   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > +   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> > +
> >      amdgpu_amdkfd_suspend(adev, !fbcon);
> >
> >      amdgpu_ras_suspend(adev);
>
>
> This breaks shutdown/reboot on my system (Dell latitude 5495).
>
> --
> Regards,
>   Johannes Hirte

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cxinhui.pan%40amd.com%7Cde6e0578174940b5f29808d7de948b88%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637222601969843248&amp;sdata=quWGElw%2Fo70VJibuZ7%2BzS%2FcHH2OHSDB%2B5uaFPQUf2Os%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 9202 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
  2020-04-13  4:23       ` Liang, Prike
@ 2020-04-13  4:28         ` Pan, Xinhui
  0 siblings, 0 replies; 8+ messages in thread
From: Pan, Xinhui @ 2020-04-13  4:28 UTC (permalink / raw)
  To: Liang, Prike, Johannes Hirte
  Cc: Deucher, Alexander, Huang, Ray, amd-gfx@lists.freedesktop.org,
	Quan, Evan

06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 [Radeon PRO WX 8100] (prog-if 00 [VGA controller])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 10
	Region 0: Memory at 2fe0000000 (64-bit, prefetchable) [disabled] [size=256M]
	Region 2: Memory at 2ff0000000 (64-bit, prefetchable) [disabled] [size=2M]
	Region 4: I/O ports at d000 [disabled] [size=256]
	Region 5: Memory at dfc00000 (32-bit, non-prefetchable) [disabled] [size=512K]
	Expansion ROM at dfc80000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel modules: amdgpu

Adapter  1    SEG=0000, BN=06, DN=00, PCIID=68681002, SSID=0A0C1002)
    Asic Family        :  Vega10         
    Flash Type         :  M25P80      (1024 KB)
    Product Name       :  Vega10 D05111 32Mx128 8GB 852e/1000m 1.00V 
    Bios Config File   :  D0511100.109   
    Bios P/N           :  113-D0511100-109
    Bios Version       :  016.001.001.000.011125
    Bios Date          :  09/22/18 10:48 
    ROM Image Type     :  Hybrid Images
    ROM Image Details  :  
        Image[0]: Size(61952 Bytes), Type(Legacy Image)
        Image[1]: Size(43520 Bytes), Type(EFI Image)

发件人: "Liang, Prike" <Prike.Liang@amd.com>
日期: 2020年4月13日 星期一 12:23
收件人: "Pan, Xinhui" <Xinhui.Pan@amd.com>, Johannes Hirte <johannes.hirte@datenkhaos.de>
抄送: "Deucher, Alexander" <Alexander.Deucher@amd.com>, "Huang, Ray" <Ray.Huang@amd.com>, "Quan, Evan" <Evan.Quan@amd.com>, "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
主题: RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)

Could you share the PCI sub revision and I try check the issue on the Vega10(1002:687f) but can’t find the 
reboot hang up.
 
Thanks,
Prike
From: Pan, Xinhui <Xinhui.Pan@amd.com> 
Sent: Sunday, April 12, 2020 2:58 PM
To: Johannes Hirte <johannes.hirte@datenkhaos.de>; Liang, Prike <Prike.Liang@amd.com>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2)
 
Prike
I hit this issue too. reboot hung with my vega10.  it is ok with navi10.

From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Liang, Prike <Prike.Liang@amd.com>
Sent: Sunday, April 12, 2020 11:49:39 AM
To: Johannes Hirte <johannes.hirte@datenkhaos.de>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Subject: RE: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2) 
 
Thanks update and verify. Could you give more detail information and error log message   
about you observed issue? 

Thanks,
Prike
> -----Original Message-----
> From: Johannes Hirte <johannes.hirte@datenkhaos.de>
> Sent: Sunday, April 12, 2020 7:56 AM
> To: Liang, Prike <Prike.Liang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>;
> Quan, Evan <Evan.Quan@amd.com>
> Subject: Re: [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video
> playback (v2)
> 
> On 2020 Apr 07, Prike Liang wrote:
> > The system will be hang up during S3 suspend because of SMU is pending
> > for GC not respose the register CP_HQD_ACTIVE access request.This
> > issue root cause of accessing the GC register under enter GFX CGGPG
> > and can be fixed by disable GFX CGPG before perform suspend.
> >
> > v2: Use disable the GFX CGPG instead of RLC safe mode guard.
> >
> > Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> > Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 2e1f955..bf8735b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -2440,8 +2440,6 @@ static int
> > amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)  {
> >      int i, r;
> >
> > -   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > -   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> >
> >      for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
> >              if (!adev->ip_blocks[i].status.valid)
> > @@ -3470,6 +3468,9 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
> >              }
> >      }
> >
> > +   amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
> > +   amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
> > +
> >      amdgpu_amdkfd_suspend(adev, !fbcon);
> >
> >      amdgpu_ras_suspend(adev);
> 
> 
> This breaks shutdown/reboot on my system (Dell latitude 5495).
> 
> --
> Regards,
>   Johannes Hirte

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cxinhui.pan%40amd.com%7Cde6e0578174940b5f29808d7de948b88%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637222601969843248&amp;sdata=quWGElw%2Fo70VJibuZ7%2BzS%2FcHH2OHSDB%2B5uaFPQUf2Os%3D&amp;reserved=0

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

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

end of thread, other threads:[~2020-04-13  4:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 13:14 [PATCH v2] drm/amdgpu: fix gfx hang during suspend with video playback (v2) Prike Liang
2020-04-07 14:55 ` Huang Rui
2020-04-11 23:55 ` Johannes Hirte
2020-04-12  3:49   ` Liang, Prike
2020-04-12  6:58     ` Pan, Xinhui
2020-04-13  4:23       ` Liang, Prike
2020-04-13  4:28         ` Pan, Xinhui
2020-04-12 10:21     ` Johannes Hirte

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.