Slow window movement and refresh after suspend/resume
Jan Kokemüller
jan.kokemueller at gmail.com
Thu Oct 24 20:58:48 UTC 2013
Hi,
> Looking at my Xorg log, this is all I can really see out of the ordinary
> during the suspend/resume process:
I have the same issue (i915kms, Intel g45). I have worked around it
with a really ugly hack that simply retries sending the batch buffer
while X resumes.
Place the following into
/usr/ports/x11-drivers/xf86-video-intel/files/patch-src__uxa__intel_batchbuffer.c
and rebuild xf86-video-intel.
--- ./src/uxa/intel_batchbuffer.c.orig 2013-07-28 15:53:23.000000000 +0200
+++ ./src/uxa/intel_batchbuffer.c 2013-09-10 12:47:45.563838120 +0200
@@ -219,6 +219,8 @@
intel_batch_do_flush(scrn);
}
+#include <unistd.h>
+
void intel_batch_submit(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
@@ -251,13 +253,21 @@
}
ret = dri_bo_subdata(intel->batch_bo, 0, intel->batch_used*4,
intel->batch_ptr);
+ int tries = 200;
if (ret == 0) {
+ retry:
ret = drm_intel_bo_mrb_exec(intel->batch_bo,
intel->batch_used*4,
NULL, 0, 0xffffffff,
(HAS_BLT(intel) ?
intel->current_batch:
I915_EXEC_DEFAULT));
+ if (ret && tries) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "retrying
batchbuffer submit\n");
+ --tries;
+ usleep(50 * 1000);
+ goto retry;
+ }
}
if (ret != 0) {
More information about the freebsd-x11
mailing list