]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown
authorPavan Kumar Ramayanam <pavan.ramayanam@amd.com>
Tue, 27 Apr 2021 04:51:18 +0000 (10:21 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:42 +0000 (18:06 -0400)
The runtime resume PM op disregards the return value from
amdgpu_device_resume(), masking errors for failed resumes at the PM
layer.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Pavan Kumar Ramayanam <pavan.ramayanam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 4f62c78485cae4a14abb95c76cb0f330ff7469ab..ad8a2c391bbd9ac387d64c77ccd59482a4cf01f6 100644 (file)
@@ -1574,6 +1574,9 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
                amdgpu_device_baco_exit(drm_dev);
        }
        ret = amdgpu_device_resume(drm_dev, false);
+       if (ret)
+               return ret;
+
        if (amdgpu_device_supports_px(drm_dev))
                drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
        adev->in_runpm = false;