diff options
author | 2019-05-24 06:00:42 +0000 | |
---|---|---|
committer | 2019-05-24 06:00:42 +0000 | |
commit | 6c3f7e80c33123c6c46ca827a14c0fbcd51d62bc (patch) | |
tree | 79d79a8b492c098bdcc21364a94bc1a47b1c2b02 /sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | |
parent | implement support for SIOCGIFSFFPAGE (diff) | |
download | wireguard-openbsd-6c3f7e80c33123c6c46ca827a14c0fbcd51d62bc.tar.xz wireguard-openbsd-6c3f7e80c33123c6c46ca827a14c0fbcd51d62bc.zip |
Match radeon_device.c rev 1.2 and return early in amdgpu_device_suspend()
if "shutdown" is set and the mountroot hook has not run.
Otherwise unhibernate causes a uvm fault due to an uninitialised lock.
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 7055c646a34..0cd3ccca2fe 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -2783,6 +2783,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) } adev = dev->dev_private; + if (adev->shutdown) + return 0; #ifdef notyet if (dev->switch_power_state == DRM_SWITCH_POWER_OFF) |