Skip to content

Commit f8f4e2a

Browse files
Rajib Mahapatraalexdeucher
authored andcommitted
drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix.
[Why] SDMA ring buffer test failed if suspend is aborted during S0i3 resume. [How] If suspend is aborted for some reason during S0i3 resume cycle, it follows SDMA ring test failing and errors in amdgpu resume. For RN/CZN/Picasso, SMU saves and restores SDMA registers during S0ix cycle. So, skipping SDMA suspend and resume from driver solves the issue. This time, the system is able to resume gracefully even the suspend is aborted. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rajib Mahapatra <rajib.mahapatra@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 0136f58 commit f8f4e2a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,13 +2057,21 @@ static int sdma_v4_0_suspend(void *handle)
20572057
{
20582058
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
20592059

2060+
/* SMU saves SDMA state for us */
2061+
if (adev->in_s0ix)
2062+
return 0;
2063+
20602064
return sdma_v4_0_hw_fini(adev);
20612065
}
20622066

20632067
static int sdma_v4_0_resume(void *handle)
20642068
{
20652069
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
20662070

2071+
/* SMU restores SDMA state for us */
2072+
if (adev->in_s0ix)
2073+
return 0;
2074+
20672075
return sdma_v4_0_hw_init(adev);
20682076
}
20692077

0 commit comments

Comments
 (0)