Skip to content

Commit

Permalink
drm/amdgpu: Handling of amdgpu_device_resume return value for gracefu…
Browse files Browse the repository at this point in the history
…l teardown

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 <[email protected]>
Signed-off-by: Pavan Kumar Ramayanam <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
pavanamd authored and alexdeucher committed Apr 29, 2021
1 parent 4b12ee6 commit b45aeb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,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;
Expand Down

0 comments on commit b45aeb2

Please sign in to comment.