Skip to content

Commit

Permalink
drm/amdgpu: don't set s3 and s0ix at the same time
Browse files Browse the repository at this point in the history
commit eac4c54 upstream.

This makes it clearer which codepaths are in use specifically in
one state or the other.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
superm1 authored and gregkh committed May 12, 2022
1 parent 22b80bf commit 060102f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Expand Up @@ -2250,9 +2250,9 @@ static int amdgpu_pmops_suspend(struct device *dev)

if (amdgpu_acpi_is_s0ix_active(adev))
adev->in_s0ix = true;
adev->in_s3 = true;
else
adev->in_s3 = true;
r = amdgpu_device_suspend(drm_dev, true);
adev->in_s3 = false;
if (r)
return r;
if (!adev->in_s0ix)
Expand All @@ -2269,6 +2269,8 @@ static int amdgpu_pmops_resume(struct device *dev)
r = amdgpu_device_resume(drm_dev, true);
if (amdgpu_acpi_is_s0ix_active(adev))
adev->in_s0ix = false;
else
adev->in_s3 = false;
return r;
}

Expand Down

0 comments on commit 060102f

Please sign in to comment.