Browse Source

drm/amdgpu: Remove two ! operations in an if condition

 Make the code easier to understand.

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Xie 8 years ago
parent
commit
bb37b67d57
1 changed files with 2 additions and 3 deletions
  1. 2 3
      drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

+ 2 - 3
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))
 	if (amdgpu_vm_had_gpu_reset(adev, id))
 		return true;
 		return true;
-	if (!vm_flush_needed && !gds_switch_needed)
-		return false;
-	return true;
+
+	return vm_flush_needed || gds_switch_needed;
 }
 }
 
 
 /**
 /**