mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
drm/amdgpu: move gpu reset out of amdgpu_device_suspend
Move it into the caller. There are cases were we don't want it. We need it for hibernation, but we don't need it for runtime pm, so drop it for runtime pm. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
803cc26d5c
commit
897483d8a0
2 changed files with 6 additions and 5 deletions
|
@ -3176,10 +3176,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
|
|||
/* Shut down the device */
|
||||
pci_disable_device(dev->pdev);
|
||||
pci_set_power_state(dev->pdev, PCI_D3hot);
|
||||
} else {
|
||||
r = amdgpu_asic_reset(adev);
|
||||
if (r)
|
||||
DRM_ERROR("amdgpu asic reset failed\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1155,8 +1155,13 @@ static int amdgpu_pmops_resume(struct device *dev)
|
|||
static int amdgpu_pmops_freeze(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||
struct amdgpu_device *adev = drm_dev->dev_private;
|
||||
int r;
|
||||
|
||||
return amdgpu_device_suspend(drm_dev, false, true);
|
||||
r = amdgpu_device_suspend(drm_dev, false, true);
|
||||
if (r)
|
||||
return r;
|
||||
return amdgpu_asic_reset(adev);
|
||||
}
|
||||
|
||||
static int amdgpu_pmops_thaw(struct device *dev)
|
||||
|
|
Loading…
Reference in a new issue