summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-01-03 16:52:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-03 16:54:31 +0000
commit0ad6d6e1a678de7d8c2d4cd7c734887e1deb2f9b (patch)
tree7c4193a21b65d49420b025672a44cd1d1d266b34 /src
parentd729ef02f2955f7476df4c65403bc1f8e705b780 (diff)
dri: Only issue a warning for an "impossible" flip return 5 times
As it appears that some kernels do indeed return the "wrong" value, issuing a warning 60 times a second is a cruel and unusual punishment. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32680 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/intel_dri.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index b577c7d9..70963693 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -802,10 +802,19 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
* causing wrong (msc, ust) return values and possible visual corruption.
*/
if ((frame < flip->frame) && (flip->frame - frame < 5)) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "%s: Pageflip completion has impossible msc %d < target_msc %d\n",
- __func__, frame, flip->frame);
- /* All-Zero values signal failure of timestamping to client. */
+ static int limit = 5;
+
+ /* XXX we are currently hitting this path with older
+ * kernels, so make it quieter.
+ */
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s: Pageflip completion has impossible msc %d < target_msc %d\n",
+ __func__, frame, flip->frame);
+ limit--;
+ }
+
+ /* All-0 values signal timestamping failure. */
frame = tv_sec = tv_usec = 0;
}