Guest User

Untitled

a guest
Oct 24th, 2013
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. --- ./src/uxa/intel_batchbuffer.c.orig 2013-07-28 15:53:23.000000000 +0200
  2. +++ ./src/uxa/intel_batchbuffer.c 2013-09-10 12:47:45.563838120 +0200
  3. @@ -219,6 +219,8 @@
  4. intel_batch_do_flush(scrn);
  5. }
  6.  
  7. +#include <unistd.h>
  8. +
  9. void intel_batch_submit(ScrnInfoPtr scrn)
  10. {
  11. intel_screen_private *intel = intel_get_screen_private(scrn);
  12. @@ -251,13 +253,21 @@
  13. }
  14.  
  15. ret = dri_bo_subdata(intel->batch_bo, 0, intel->batch_used*4, intel->batch_ptr);
  16. + int tries = 200;
  17. if (ret == 0) {
  18. + retry:
  19. ret = drm_intel_bo_mrb_exec(intel->batch_bo,
  20. intel->batch_used*4,
  21. NULL, 0, 0xffffffff,
  22. (HAS_BLT(intel) ?
  23. intel->current_batch:
  24. I915_EXEC_DEFAULT));
  25. + if (ret && tries) {
  26. + xf86DrvMsg(scrn->scrnIndex, X_WARNING, "retrying batchbuffer submit\n");
  27. + --tries;
  28. + usleep(50 * 1000);
  29. + goto retry;
  30. + }
  31. }
  32.  
  33. if (ret != 0) {
Advertisement
Add Comment
Please, Sign In to add comment