--- src/i830_display.c.orig 2009-05-12 17:12:11.000000000 -0700 +++ src/i830_display.c 2012-11-16 18:45:35.000000000 -0800 @@ -921,15 +921,29 @@ ScrnInfoPtr pScrn = crtc->scrn; I830Ptr pI830 = I830PTR(pScrn); uint32_t fbc_ctl; + int i; /* Disable compression */ fbc_ctl = INREG(FBC_CONTROL); fbc_ctl &= ~FBC_CTL_EN; OUTREG(FBC_CONTROL, fbc_ctl); +#ifdef notdef /* Wait for compressing bit to clear */ while (INREG(FBC_STATUS) & FBC_STAT_COMPRESSING) ; /* nothing */ +#endif + + /* + * The above loop seems to never exit. I don't understand + * the hardware well enough to know why. For now, just put + * a bound on the loop so that we don't block forever. + */ + + for (i = 0; i < 10000; i++) { + if ((INREG(FBC_STATUS) & FBC_STAT_COMPRESSING) == 0) + break; + } } static void