sync
This commit is contained in:
parent
bb198177ef
commit
123b6c5611
35 changed files with 224 additions and 128 deletions
|
@ -2409,8 +2409,10 @@ static int amdgpu_pmops_suspend(struct device *dev)
|
|||
|
||||
if (amdgpu_acpi_is_s0ix_active(adev))
|
||||
adev->in_s0ix = true;
|
||||
else
|
||||
else if (amdgpu_acpi_is_s3_active(adev))
|
||||
adev->in_s3 = true;
|
||||
if (!adev->in_s0ix && !adev->in_s3)
|
||||
return 0;
|
||||
return amdgpu_device_suspend(drm_dev, true);
|
||||
}
|
||||
|
||||
|
@ -2431,6 +2433,9 @@ static int amdgpu_pmops_resume(struct device *dev)
|
|||
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||
int r;
|
||||
|
||||
if (!adev->in_s0ix && !adev->in_s3)
|
||||
return 0;
|
||||
|
||||
/* Avoids registers access if device is physically gone */
|
||||
if (!pci_device_is_present(adev->pdev))
|
||||
adev->no_hw_access = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue