aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v8_0.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index 845a30b03cb4..3e1e3d0a850e 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -170,7 +170,7 @@ static bool dce_v8_0_is_counter_moving(struct amdgpu_device *adev, int crtc)
170 */ 170 */
171static void dce_v8_0_vblank_wait(struct amdgpu_device *adev, int crtc) 171static void dce_v8_0_vblank_wait(struct amdgpu_device *adev, int crtc)
172{ 172{
173 unsigned i = 0; 173 unsigned i = 100;
174 174
175 if (crtc >= adev->mode_info.num_crtc) 175 if (crtc >= adev->mode_info.num_crtc)
176 return; 176 return;
@@ -182,14 +182,16 @@ static void dce_v8_0_vblank_wait(struct amdgpu_device *adev, int crtc)
182 * wait for another frame. 182 * wait for another frame.
183 */ 183 */
184 while (dce_v8_0_is_in_vblank(adev, crtc)) { 184 while (dce_v8_0_is_in_vblank(adev, crtc)) {
185 if (i++ % 100 == 0) { 185 if (i++ == 100) {
186 i = 0;
186 if (!dce_v8_0_is_counter_moving(adev, crtc)) 187 if (!dce_v8_0_is_counter_moving(adev, crtc))
187 break; 188 break;
188 } 189 }
189 } 190 }
190 191
191 while (!dce_v8_0_is_in_vblank(adev, crtc)) { 192 while (!dce_v8_0_is_in_vblank(adev, crtc)) {
192 if (i++ % 100 == 0) { 193 if (i++ == 100) {
194 i = 0;
193 if (!dce_v8_0_is_counter_moving(adev, crtc)) 195 if (!dce_v8_0_is_counter_moving(adev, crtc))
194 break; 196 break;
195 } 197 }