Skip to content

Commit 10cb67e

Browse files
Pratik Vishwakarmaalexdeucher
authored andcommitted
drm/amdgpu: skip CG/PG for gfx during S0ix
Not needed as the device is in gfxoff state so the CG/PG state is handled just like it would be for gfxoff during runtime gfxoff. This should also prevent delays on resume. Reworked from Pratik's original patch (Alex) Acked-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Pratik Vishwakarma <[email protected]>
1 parent 9bb735a commit 10cb67e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,6 +2371,10 @@ static int amdgpu_device_set_cg_state(struct amdgpu_device *adev,
23712371
i = state == AMD_CG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
23722372
if (!adev->ip_blocks[i].status.late_initialized)
23732373
continue;
2374+
/* skip CG for GFX on S0ix */
2375+
if (adev->in_s0ix &&
2376+
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
2377+
continue;
23742378
/* skip CG for VCE/UVD, it's handled specially */
23752379
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
23762380
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
@@ -2402,6 +2406,10 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
24022406
i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
24032407
if (!adev->ip_blocks[i].status.late_initialized)
24042408
continue;
2409+
/* skip PG for GFX on S0ix */
2410+
if (adev->in_s0ix &&
2411+
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
2412+
continue;
24052413
/* skip CG for VCE/UVD, it's handled specially */
24062414
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
24072415
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&

0 commit comments

Comments
 (0)