summaryrefslogtreecommitdiff
path: root/src/intel_dri.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@canonical.com>2011-02-15 22:30:18 -0800
committerOwain G. Ainsworth <oga@openbsd.org>2011-03-16 20:18:48 +0000
commit6cf8a5f721a9334e3bd228eb7c5501153966f930 (patch)
treebcac9f776bae865f6d58a1468e25b325ca0c14a6 /src/intel_dri.c
parentac7ace08f2396c426cab4cc1a836b406eb272514 (diff)
Quell excessively verbose vblank counter failed error messages
Certain error situations can result in the following printed to Xorg.0.log at a high enough rate to make log file size a problem. (WW) intel(0): I830DRI2GetMSC:1062 get vblank counter failed: Invalid argument (WW) intel(0): I830DRI2ScheduleWaitMSC:1118 get vblank counter failed: Invalid argument Following in the tradition of commit 0ad6d6e1, limit the warnings to be output 5 times, then quell the remainder. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34322 Ref.: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/710594 Signed-off-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 9599fde65a0d8b7e7c85199346f7b620bdd8388d) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r--src/intel_dri.c48
1 files changed, 32 insertions, 16 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 3d0b730c..ff8f0aaf 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -991,10 +991,14 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
ret = drmWaitVBlank(intel->drmSubFD, &vbl);
if (ret) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "%s:%d get vblank counter failed: %s\n",
- __FUNCTION__, __LINE__,
- strerror(errno));
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
return FALSE;
}
@@ -1047,10 +1051,14 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
vbl.request.sequence = 0;
ret = drmWaitVBlank(intel->drmSubFD, &vbl);
if (ret) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "%s:%d get vblank counter failed: %s\n",
- __FUNCTION__, __LINE__,
- strerror(errno));
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
goto out_complete;
}
@@ -1077,10 +1085,14 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
vbl.request.signal = (unsigned long)wait_info;
ret = drmWaitVBlank(intel->drmSubFD, &vbl);
if (ret) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "%s:%d get vblank counter failed: %s\n",
- __FUNCTION__, __LINE__,
- strerror(errno));
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
goto out_complete;
}
@@ -1112,10 +1124,14 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
vbl.request.signal = (unsigned long)wait_info;
ret = drmWaitVBlank(intel->drmSubFD, &vbl);
if (ret) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "%s:%d get vblank counter failed: %s\n",
- __FUNCTION__, __LINE__,
- strerror(errno));
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
goto out_complete;
}