From 4709bf48bdc61666fcdf0e13e863f1f5f9131882 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 14 Jul 2008 13:43:31 -0700 Subject: Fix DSPARB setting on 845/865, which have only the AEND field and 96 entries. (cherry picked from commit 5054a86b1b362f3f63310afb9ef2d37c9f1cfca5) --- src/i830_driver.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index 0a49d3a2..c880833e 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1994,7 +1994,16 @@ i830_set_dsparb(ScrnInfoPtr pScrn) OUTREG(DSPARB, (95 << DSPARB_CSTART_SHIFT) | (48 << DSPARB_BSTART_SHIFT)); } else { - OUTREG(DSPARB, 254 << DSPARB_BEND_SHIFT | 128 << DSPARB_AEND_SHIFT); + if (IS_MOBILE(pI830)) { + /* The 830 has 288 entries, and the 855 has 256. */ + OUTREG(DSPARB, 254 << DSPARB_BEND_SHIFT | 128 << DSPARB_AEND_SHIFT); + } else { + /* 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. + */ + OUTREG(DSPARB, 95 << DSPARB_AEND_SHIFT); + } } } -- cgit v1.2.3