Commit 6b11af6d authored by Yang Yingliang's avatar Yang Yingliang Committed by Alex Deucher

drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume()

Add missing pci_disable_device() if amdgpu_device_resume() fails.

Fixes: 8e4d5d43 ("drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 45a92f45
...@@ -2563,8 +2563,11 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) ...@@ -2563,8 +2563,11 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
amdgpu_device_baco_exit(drm_dev); amdgpu_device_baco_exit(drm_dev);
} }
ret = amdgpu_device_resume(drm_dev, false); ret = amdgpu_device_resume(drm_dev, false);
if (ret) if (ret) {
if (amdgpu_device_supports_px(drm_dev))
pci_disable_device(pdev);
return ret; return ret;
}
if (amdgpu_device_supports_px(drm_dev)) if (amdgpu_device_supports_px(drm_dev))
drm_dev->switch_power_state = DRM_SWITCH_POWER_ON; drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment