diff --git a/src/i830_debug.c b/src/i830_debug.c index dc3712b..37b826e 100644 --- a/src/i830_debug.c +++ b/src/i830_debug.c @@ -557,6 +557,8 @@ static struct i830SnapshotRec { DEFINEREG(DSPFW1), DEFINEREG(DSPFW2), DEFINEREG(DSPFW3), + DEFINEREG(FWATER_BLC), + DEFINEREG(FWATER_BLC2), DEFINEREG2(ADPA, i830_debug_adpa), DEFINEREG2(LVDS, i830_debug_lvds), diff --git a/src/i830_display.c b/src/i830_display.c index 7a8e96d..2b419f7 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1153,7 +1153,9 @@ i830_update_dsparb(ScrnInfoPtr pScrn) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); I830Ptr pI830 = I830PTR(pScrn); int total_hdisplay = 0, planea_hdisplay = 0, planeb_hdisplay = 0; - int fifo_entries = 0, planea_entries = 0, planeb_entries = 0, i; + int fifo_entries = 0, planea_entries = 0, planeb_entries = 0, + planec_entries = 0, i; + uint32_t watermark = (3 << 8) | 0x3f; if ((INREG(DSPACNTR) & DISPLAY_PLANE_ENABLE) && (INREG(DSPBCNTR) & DISPLAY_PLANE_ENABLE)) @@ -1163,18 +1165,22 @@ i830_update_dsparb(ScrnInfoPtr pScrn) /* * FIFO entries will be split based on programmed modes */ - if (IS_I965GM(pI830)) + if (IS_I965GM(pI830)) { fifo_entries = 127; - else if (IS_I9XX(pI830)) + planec_entries = 40; + } else if (IS_I9XX(pI830)) { fifo_entries = 95; - else if (IS_MOBILE(pI830)) { + planec_entries = 30; + } else if (IS_MOBILE(pI830)) { fifo_entries = 255; + planec_entries = 96; } else { - /* The 845/865 only have a AEND field. Though the field size would + /* The 845/865 only have a AEND field. Though the field size would * allow 128 entries, the 865 rendered the cursor wrong then. * The BIOS set it up for 96. */ - fifo_entries = 95; + fifo_entries = 95; + planec_entries = 30; } for (i = 0; i < xf86_config->num_crtc; i++) { @@ -1189,14 +1195,17 @@ i830_update_dsparb(ScrnInfoPtr pScrn) } } + fifo_entries -= planec_entries; planea_entries = fifo_entries * planea_hdisplay / total_hdisplay; planeb_entries = fifo_entries * planeb_hdisplay / total_hdisplay; - if (IS_I9XX(pI830)) + if (IS_I9XX(pI830)) { + OUTREG(FWATER_BLC, (watermark << 16) | watermark); + OUTREG(FWATER_BLC2, watermark); OUTREG(DSPARB, ((planea_entries + planeb_entries) << DSPARB_CSTART_SHIFT) | (planea_entries << DSPARB_BSTART_SHIFT)); - else if (IS_MOBILE(pI830)) + } else if (IS_MOBILE(pI830)) OUTREG(DSPARB, ((planea_entries + planeb_entries) << DSPARB_BEND_SHIFT) | (planea_entries << DSPARB_AEND_SHIFT));