aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v6_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v6_0.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index c8380f030400..c866185fd091 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -146,7 +146,7 @@ static bool dce_v6_0_is_counter_moving(struct amdgpu_device *adev, int crtc)
146 */ 146 */
147static void dce_v6_0_vblank_wait(struct amdgpu_device *adev, int crtc) 147static void dce_v6_0_vblank_wait(struct amdgpu_device *adev, int crtc)
148{ 148{
149 unsigned i = 0; 149 unsigned i = 100;
150 150
151 if (crtc >= adev->mode_info.num_crtc) 151 if (crtc >= adev->mode_info.num_crtc)
152 return; 152 return;
@@ -158,14 +158,16 @@ static void dce_v6_0_vblank_wait(struct amdgpu_device *adev, int crtc)
158 * wait for another frame. 158 * wait for another frame.
159 */ 159 */
160 while (dce_v6_0_is_in_vblank(adev, crtc)) { 160 while (dce_v6_0_is_in_vblank(adev, crtc)) {
161 if (i++ % 100 == 0) { 161 if (i++ == 100) {
162 i = 0;
162 if (!dce_v6_0_is_counter_moving(adev, crtc)) 163 if (!dce_v6_0_is_counter_moving(adev, crtc))
163 break; 164 break;
164 } 165 }
165 } 166 }
166 167
167 while (!dce_v6_0_is_in_vblank(adev, crtc)) { 168 while (!dce_v6_0_is_in_vblank(adev, crtc)) {
168 if (i++ % 100 == 0) { 169 if (i++ == 100) {
170 i = 0;
169 if (!dce_v6_0_is_counter_moving(adev, crtc)) 171 if (!dce_v6_0_is_counter_moving(adev, crtc))
170 break; 172 break;
171 } 173 }