drm/i915: Make vblank evade warnings optional
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i915 / intel_sprite.c
index f7d431427115a2f5e3c997afd2d628cd0c3ac2d0..8c87c717c7cda92c4256cf277828e594f96a0ad1 100644 (file)
@@ -198,12 +198,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
                          ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
                          crtc->debug.min_vbl, crtc->debug.max_vbl,
                          crtc->debug.scanline_start, scanline_end);
-       } else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
-                  VBLANK_EVASION_TIME_US)
+       }
+#ifdef CONFIG_DRM_I915_DEBUG_VBLANK_EVADE
+       else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
+                VBLANK_EVASION_TIME_US)
                DRM_WARN("Atomic update on pipe (%c) took %lld us, max time under evasion is %u us\n",
                         pipe_name(pipe),
                         ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
                         VBLANK_EVASION_TIME_US);
+#endif
 }
 
 static void