[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Alex Deucher <[email protected]>
________________________________
From: amd-gfx <[email protected]> on behalf of Mario 
Limonciello <[email protected]>
Sent: Tuesday, November 18, 2025 8:18 AM
To: [email protected] <[email protected]>
Cc: Mario Limonciello (AMD) <[email protected]>; [email protected] 
<[email protected]>; Lee, Peyton <[email protected]>; Limonciello, Mario 
<[email protected]>
Subject: [PATCH] drm/amd: Skip power ungate during suspend for VPE

From: "Mario Limonciello (AMD)" <[email protected]>

During the suspend sequence VPE is already going to be power gated
as part of vpe_suspend().  It's unnecessary to call during calls to
amdgpu_device_set_pg_state().

It actually can expose a race condition with the firmware if s0i3
sequence starts as well.  Drop these calls.

Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mario Limonciello <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 81587f8d66c2..22db0e4154e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3419,10 +3419,11 @@ int amdgpu_device_set_pg_state(struct amdgpu_device 
*adev,
                     (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX 
||
                      adev->ip_blocks[i].version->type == 
AMD_IP_BLOCK_TYPE_SDMA))
                         continue;
-               /* skip CG for VCE/UVD, it's handled specially */
+               /* skip CG for VCE/UVD/VPE, it's handled specially */
                 if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD 
&&
                     adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE 
&&
                     adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCN 
&&
+                   adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VPE &&
                     adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_JPEG 
&&
                     adev->ip_blocks[i].version->funcs->set_powergating_state) {
                         /* enable powergating to save power */
--
2.51.2

Reply via email to