xf86-video-intel: src/intel_dri.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 3 08:55:17 PST 2011
src/intel_dri.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 0ad6d6e1a678de7d8c2d4cd7c734887e1deb2f9b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 3 16:52:07 2011 +0000
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 at chris-wilson.co.uk>
diff --git a/src/intel_dri.c b/src/intel_dri.c
index b577c7d..7096369 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;
}
More information about the xorg-commit
mailing list