diff --git a/src/i830_driver.c b/src/i830_driver.c index 5cd0a34..e62d720 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1059,7 +1059,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) pointer pVBEModule = NULL; const char *chipname; int num_pipe; - int max_width, max_height; + int max_width = 8192, max_height = 8192; uint32_t capid; int fb_bar, mmio_bar; @@ -1369,17 +1369,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) xf86CrtcConfigInit (pScrn, &i830_xf86crtc_config_funcs); xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - /* See i830_exa.c comments for why we limit the framebuffer size like this. - */ - if (IS_I965G(pI830)) { - max_width = 8192; - max_height = 8192; - } else { - max_width = 2048; - max_height = 2048; - } - xf86CrtcSetSizeRange (pScrn, 320, 200, max_width, max_height); - if (IS_I830(pI830) || IS_845G(pI830)) { #if XSERVER_LIBPCIACCESS uint16_t gmch_ctrl; @@ -1474,17 +1463,32 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) if (!xf86NameCmp(s, "EXA")) { from = X_CONFIG; pI830->useEXA = TRUE; - } - else if (!xf86NameCmp(s, "XAA")) { + /* + * See i830_exa.c comments for why we limit the framebuffer + * size like this. + */ + if (!IS_I965G(pI830)) { + max_width = 2048; + max_height = 2048; + } + } else if (!xf86NameCmp(s, "XAA")) { from = X_CONFIG; pI830->useEXA = FALSE; } } + if (pI830->useEXA && pScrn->virtualX > 2048) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Virtual width > 2048, " + "disabling EXA.\n"); + pI830->useEXA = FALSE; + } #endif xf86DrvMsg(pScrn->scrnIndex, from, "Using %s for acceleration\n", pI830->useEXA ? "EXA" : "XAA"); } + xf86CrtcSetSizeRange (pScrn, 320, 200, max_width, max_height); + + if (xf86ReturnOptValBool(pI830->Options, OPTION_SW_CURSOR, FALSE)) { pI830->SWCursor = TRUE; }