Skip to contentSkip to conversation

drm/amdgpu: move kfd suspend after ip_suspend_phase1

PATCH In review Evan Quan 3 participants 6 messages Apr 24, 2020 – Apr 26, 2020

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/2 drm/amdgpu: move kfd suspend after ip_suspend_phase1

This sequence change should be safe as what did in ip_suspend_phase1 is to suspend DCE only. And this is a prerequisite for coming redundant cg/pg ungate dropping.

Change-Id Ie125e234f8f743d327cf8e0389e4872a312184c0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index 8eb339aff14d..08eeb0d2c149 100644
@@ -3456,12 +3456,12 @@ 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);
 
 	r = amdgpu_device_ip_suspend_phase1(adev);
 
+	amdgpu_amdkfd_suspend(adev, !fbcon);
+
 	/* evict vram memory */
 	amdgpu_bo_evict_vram(adev);
 
Signature · 6 lines
2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#1 lore raw

PATCH 2/2 drma/dmgpu: drop redundant cg/pg ungate on runpm enter

CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, the CG/PG ungate will be performed twice. That will cause gfxoff disablement is performed twice also on runpm enter while gfxoff enablemnt once on rump exit. That will put gfxoff into disabled state.

Change-Id I489ca456770d3fe482b685f132400202467f712b
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 08eeb0d2c149..71278942f9f0 100644
@@ -3453,9 +3453,6 @@ 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_ras_suspend(adev);
 
 	r = amdgpu_device_ip_suspend_phase1(adev);
Signature · 6 lines
2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

[AMD Official Use Only - Internal Distribution Only]

Series is:

________________________________
From: Quan, Evan <[email protected]>
Sent: Friday, April 24, 2020 4:05 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Kuehling, Felix <[email protected]>; Liang, Prike <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, the CG/PG ungate will be performed twice. That will cause gfxoff disablement is performed twice also on runpm enter while gfxoff enablemnt once on rump exit. That will put gfxoff into disabled state.

Change-Id I489ca456770d3fe482b685f132400202467f712b
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 08eeb0d2c149..71278942f9f0 100644
@@ -3453,9 +3453,6 @@ 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_ras_suspend(adev);
 
         r = amdgpu_device_ip_suspend_phase1(adev);

--
2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

Re: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

In reply to Evan Quan

Also, I just noticed a typo in the patch title:

drma/dmgpu -> drm/admgpu

Alex

Quoted 30 lines · Evan Quan

CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, the CG/PG ungate will be performed twice. That will cause gfxoff disablement is performed twice also on runpm enter while gfxoff enablemnt once on rump exit. That will put gfxoff into disabled state.

Change-Id I489ca456770d3fe482b685f132400202467f712b
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -4
index 08eeb0d2c149..71278942f9f0 100644
@@ -3453,9 +3453,6 @@ 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_ras_suspend(adev);
 
        r = amdgpu_device_ip_suspend_phase1(adev);
--

2.26.2

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw

Re: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

Quoted 4 lines · Alex Deucher

Also, I just noticed a typo in the patch title:

drma/dmgpu -> drm/admgpu

Can't type.

drma/dmgpu -> drm/amdgpu

Alex

Quoted 30 lines

Alex

Quoted 26 lines · Evan Quan

CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, the CG/PG ungate will be performed twice. That will cause gfxoff disablement is performed twice also on runpm enter while gfxoff enablemnt once on rump exit. That will put gfxoff into disabled state.

Change-Id I489ca456770d3fe482b685f132400202467f712b
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 08eeb0d2c149..71278942f9f0 100644
@@ -3453,9 +3453,6 @@ 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_ras_suspend(adev);
 
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
        r = amdgpu_device_ip_suspend_phase1(adev);
--

2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#5 lore raw

RE: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

Thanks. Corrected this on code submission.

Regards,
Evan
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, April 24, 2020 10:04 PM
To: Quan, Evan <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Kuehling, Felix <[email protected]>; Liang, Prike <[email protected]>
Subject: Re: [PATCH 2/2] drma/dmgpu: drop redundant cg/pg ungate on runpm enter

Quoted 4 lines · Alex Deucher

Also, I just noticed a typo in the patch title:

drma/dmgpu -> drm/admgpu

Can't type.

drma/dmgpu -> drm/amdgpu

Alex

Quoted 35 lines

Alex

Quoted 31 lines · Evan Quan

CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, the CG/PG ungate will be performed twice. That will cause gfxoff disablement is performed twice also on runpm enter while gfxoff enablemnt once on rump exit. That will put gfxoff into disabled state.

Change-Id I489ca456770d3fe482b685f132400202467f712b
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -4
index 08eeb0d2c149..71278942f9f0 100644
@@ -3453,9 +3453,6 @@ 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_ras_suspend(adev);
 
        r = amdgpu_device_ip_suspend_phase1(adev);
--

2.26.2

Quoted 8 lines
Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
sts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01% 7Cevan.quan%40amd.com%7Cca47ab8d659f48905ecd08d7e8584fd3%7C3dd8961fe 4884e608e11a82d994e183d%7C0%7C0%7C637233338316990767&amp;sdata=LqQrJ Q3XTLmdCWvCKEpxOXEatrSjoswoQEb%2B7QDahGw%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx