Skip to content

Commit

Permalink
drm/amdgpu: explicitly check for s0ix when evicting resources
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1972134

This codepath should be running in both s0ix and s3, but only does
currently because s3 and s0ix are both set in the s0ix case.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e53d966)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
  • Loading branch information
Mario Limonciello authored and Timo Aaltonen committed May 9, 2022
1 parent df9ec01 commit ac5fd82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -3880,8 +3880,8 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)
*/
static void amdgpu_device_evict_resources(struct amdgpu_device *adev)
{
/* No need to evict vram on APUs for suspend to ram */
if (adev->in_s3 && (adev->flags & AMD_IS_APU))
/* No need to evict vram on APUs for suspend to ram or s2idle */
if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU))
return;

if (amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM))
Expand Down

0 comments on commit ac5fd82

Please sign in to comment.