diff --git a/src/i830.h b/src/i830.h index 5fb7e24..b2f6c30 100644 --- a/src/i830.h +++ b/src/i830.h @@ -989,4 +989,14 @@ extern const int I830CopyROP[16]; #define QUIRK_PFIT_SAFE 0x00000040 extern void i830_fixup_devices(ScrnInfoPtr); +static inline Bool +i830_overlay_supported(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + if (!OVERLAY_NOEXIST(pI830) && pScrn->bitsPerPixel != 8 && + pI830->overlay_regs != NULL) + return TRUE; + else + return FALSE; +} #endif /* _I830_H_ */ diff --git a/src/i830_display.c b/src/i830_display.c index ed49fb0..ebc2235 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1116,9 +1116,12 @@ i830_update_dsparb(ScrnInfoPtr pScrn) /* * FIFO entries will be split based on programmed modes */ - if (IS_I965GM(pI830) || IS_GM45(pI830)) + if (IS_I965GM(pI830)) { fifo_entries = 127; - else if (IS_I9XX(pI830)) + /* we should leave ram space for plane C (overlay) */ + if (pI830->XvEnabled && i830_overlay_supported(pScrn)) + fifo_entries -= 37; + } else if (IS_I9XX(pI830)) fifo_entries = 95; else if (IS_MOBILE(pI830)) { fifo_entries = 255; diff --git a/src/i830_video.c b/src/i830_video.c index 6645daa..a4482b6 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -620,8 +620,7 @@ I830InitVideo(ScreenPtr pScreen) } /* Set up overlay video if we can do it at this depth. */ - if (!OVERLAY_NOEXIST(pI830) && pScrn->bitsPerPixel != 8 && - pI830->overlay_regs != NULL) + if (i830_overlay_supported(pScrn)) { overlayAdaptor = I830SetupImageVideoOverlay(pScreen); if (overlayAdaptor != NULL) {