diff options
author | Alex Xie <AlexBin.Xie@amd.com> | 2017-04-24 13:52:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-04-28 17:33:05 -0400 |
commit | 7a6901d7d7e49ad50d477cd8f8ef79d079b5c6c5 (patch) | |
tree | 573d1fbc16a3ebbc27ce483941de5e8b14b9e19f /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 8ab25b4f51ffd2f859afaffa191d50a1eda4128f (diff) |
drm/amdgpu: Fix use of interruptible waiting
1. The signal interrupt can affect the expected behaviour.
2. There is no mechanism to handle the corresponding error.
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index ebc0022a7ab4..3f01c4b92280 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2140,7 +2140,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) | |||
2140 | 2140 | ||
2141 | if (amdgpu_crtc->cursor_bo) { | 2141 | if (amdgpu_crtc->cursor_bo) { |
2142 | struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo); | 2142 | struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo); |
2143 | r = amdgpu_bo_reserve(aobj, false); | 2143 | r = amdgpu_bo_reserve(aobj, true); |
2144 | if (r == 0) { | 2144 | if (r == 0) { |
2145 | amdgpu_bo_unpin(aobj); | 2145 | amdgpu_bo_unpin(aobj); |
2146 | amdgpu_bo_unreserve(aobj); | 2146 | amdgpu_bo_unreserve(aobj); |
@@ -2153,7 +2153,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) | |||
2153 | robj = gem_to_amdgpu_bo(rfb->obj); | 2153 | robj = gem_to_amdgpu_bo(rfb->obj); |
2154 | /* don't unpin kernel fb objects */ | 2154 | /* don't unpin kernel fb objects */ |
2155 | if (!amdgpu_fbdev_robj_is_fb(adev, robj)) { | 2155 | if (!amdgpu_fbdev_robj_is_fb(adev, robj)) { |
2156 | r = amdgpu_bo_reserve(robj, false); | 2156 | r = amdgpu_bo_reserve(robj, true); |
2157 | if (r == 0) { | 2157 | if (r == 0) { |
2158 | amdgpu_bo_unpin(robj); | 2158 | amdgpu_bo_unpin(robj); |
2159 | amdgpu_bo_unreserve(robj); | 2159 | amdgpu_bo_unreserve(robj); |
@@ -2260,7 +2260,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) | |||
2260 | 2260 | ||
2261 | if (amdgpu_crtc->cursor_bo) { | 2261 | if (amdgpu_crtc->cursor_bo) { |
2262 | struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo); | 2262 | struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo); |
2263 | r = amdgpu_bo_reserve(aobj, false); | 2263 | r = amdgpu_bo_reserve(aobj, true); |
2264 | if (r == 0) { | 2264 | if (r == 0) { |
2265 | r = amdgpu_bo_pin(aobj, | 2265 | r = amdgpu_bo_pin(aobj, |
2266 | AMDGPU_GEM_DOMAIN_VRAM, | 2266 | AMDGPU_GEM_DOMAIN_VRAM, |