From 54ac4e2df987b72529a523ffbde357bec27e3658 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 4 Mar 2010 21:34:52 +0000 Subject: [PATCH] Rate limit batch buffer error. Once we hit this error it's unlikely that we're coming back - so don't flood the logs with redundant information. Signed-off-by: Chris Wilson --- src/i830_batchbuffer.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c index bf0b55b9..a02e9808 100644 --- a/src/i830_batchbuffer.c +++ b/src/i830_batchbuffer.c @@ -156,11 +156,17 @@ void intel_batch_submit(ScrnInfoPtr scrn) ret = dri_bo_exec(intel->batch_bo, intel->batch_used, NULL, 0, 0xffffffff); - if (ret != 0) - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to submit batch buffer, expect rendering corruption " - "or even a frozen display: %s.\n", - strerror(-ret)); + if (ret != 0) { + static int once; + + if (!once) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to submit batch buffer, expect rendering corruption " + "or even a frozen display: %s.\n", + strerror(-ret)); + once = 1; + } + } while (!list_is_empty(&intel->batch_pixmaps)) { struct intel_pixmap *entry;