]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd: Skip power ungate during suspend for VPE
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 18 Nov 2025 13:18:10 +0000 (07:18 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Nov 2025 22:33:58 +0000 (17:33 -0500)
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: Peyton.Lee@amd.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index bfbf874a10008e4d871e4e7da8d1b8d4fb02f862..ca4e47ce2417edfd3d41744a891e673cb572a7ee 100644 (file)
@@ -3445,10 +3445,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 */