From bb37b67d5729926ef0bf3dafdb5521b932aeb809 Mon Sep 17 00:00:00 2001 From: Alex Xie Date: Tue, 30 May 2017 23:50:10 -0400 Subject: [PATCH] drm/amdgpu: Remove two ! operations in an if condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Make the code easier to understand. Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 7a323f91a10b..90392a15fcb7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -680,9 +680,8 @@ bool amdgpu_vm_need_pipeline_sync(struct amdgpu_ring *ring, if (amdgpu_vm_had_gpu_reset(adev, id)) return true; - if (!vm_flush_needed && !gds_switch_needed) - return false; - return true; + + return vm_flush_needed || gds_switch_needed; } /** -- 2.20.1