diff options
| author | Alex Deucher <[email protected]> | 2025-09-17 16:42:09 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-09-18 18:59:24 +0000 |
| commit | 2ade36eaa9ac05e4913e9785df19c2cde8f912fb (patch) | |
| tree | f6a2eb0bd219cbb39375549a6683f9631b592c27 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | |
| parent | drm/amd: Only restore cached manual clock settings in restore if OD enabled (diff) | |
| download | kernel-2ade36eaa9ac05e4913e9785df19c2cde8f912fb.tar.gz kernel-2ade36eaa9ac05e4913e9785df19c2cde8f912fb.zip | |
drm/amdkfd: add proper handling for S0ix
When in S0i3, the GFX state is retained, so all we need to do
is stop the runlist so GFX can enter gfxoff.
Reviewed-by: Mario Limonciello (AMD) <[email protected]>
Tested-by: David Perry <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 4bfa8609934dbf39bbe6e75b4f971469384b50b1)
Cc: [email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index fbe7616555c8..a2879d2b7c8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -250,16 +250,24 @@ void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev, void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool suspend_proc) { - if (adev->kfd.dev) - kgd2kfd_suspend(adev->kfd.dev, suspend_proc); + if (adev->kfd.dev) { + if (adev->in_s0ix) + kgd2kfd_stop_sched_all_nodes(adev->kfd.dev); + else + kgd2kfd_suspend(adev->kfd.dev, suspend_proc); + } } int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool resume_proc) { int r = 0; - if (adev->kfd.dev) - r = kgd2kfd_resume(adev->kfd.dev, resume_proc); + if (adev->kfd.dev) { + if (adev->in_s0ix) + r = kgd2kfd_start_sched_all_nodes(adev->kfd.dev); + else + r = kgd2kfd_resume(adev->kfd.dev, resume_proc); + } return r; } |
