diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-12-14 13:49:08 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2006-12-14 13:49:08 -0800 |
commit | d4142abc68888178a8f6c54fdcece91e898bc9f5 (patch) | |
tree | 8cc858c02bcc46a2ee2bec1097434d04dbefc649 /src | |
parent | 2b5a5542ad7d1c558d1684a0a69b66bab6e9d001 (diff) |
Set frame buffer size ranges in xf86_config.
Initialization and default configuration code needs to know the range of
legitimate sizes for the frame buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_driver.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index d4f2aa37..a210b630 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -912,6 +912,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) Bool enable; const char *chipname; int num_pipe; + int max_width; #ifdef XF86DRI unsigned long savedMMSize; #endif @@ -970,10 +971,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) } else pI830->entityPrivate = NULL; - /* Allocate an xf86CrtcConfig */ - xf86CrtcConfigInit (pScrn); - xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - if (xf86RegisterResources(pI830->pEnt->index, 0, ResNone)) { PreInitCleanup(pScrn); return FALSE; @@ -1181,6 +1178,16 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, from, "IO registers at addr 0x%lX\n", (unsigned long)pI830->MMIOAddr); + /* Allocate an xf86CrtcConfig */ + xf86CrtcConfigInit (pScrn); + xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); + + if (IS_I965G(pI830)) + max_width = 16384; + else + max_width = 8192 / pI830->cpp; + xf86CrtcSetSizeRange (pScrn, 320, 200, max_width, 2048); + /* Some of the probing needs MMIO access, so map it here. */ I830MapMMIO(pScrn); @@ -1836,6 +1843,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) if (pScrn->displayWidth * pI830->cpp > 8192) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot support frame buffer stride > 8K > DRI.\n"); pI830->disableTiling = TRUE; + pI830->directRenderingDisabled = TRUE; } if (pScrn->virtualY > 2048) { |