diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-24 06:00:43 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-24 06:00:43 +0000 |
commit | 2f63e7fa0eb2a35473adb0c2e06e918dcd37748d (patch) | |
tree | e758b6d4bffd8d99bb55d5e08b3bac0b529140ac | |
parent | c579c3cd8d067dac63e98694dd5f9aca6b03caaf (diff) |
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.
-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) |