diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-07-28 10:32:12 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-07-28 10:32:12 +0100 |
commit | e71108f1e05b7a8d8edd174eb64edd6cccacbcdc (patch) | |
tree | d488d5bac5b482187d7351172ee8c3a8e3fa35ec | |
parent | a91a4f95c664f6905fef61dab251707bf2548bb8 (diff) |
Fix DGA with MergedFB
Turn off rotation support when MergedFB enabled
-rw-r--r-- | src/i830_dga.c | 26 | ||||
-rw-r--r-- | src/i830_driver.c | 30 |
2 files changed, 40 insertions, 16 deletions
diff --git a/src/i830_dga.c b/src/i830_dga.c index 1129fa31..122e8812 100644 --- a/src/i830_dga.c +++ b/src/i830_dga.c @@ -99,6 +99,31 @@ I830DGAInit(ScreenPtr pScreen) while (pMode) { + if(pI830->MergedFB) { + Bool nogood = FALSE; + /* Filter out all meta modes that would require driver-side panning */ + switch(((I830ModePrivatePtr)pMode->Private)->merged.SecondPosition) { + case PosRightOf: + case PosLeftOf: + if( (((I830ModePrivatePtr)pMode->Private)->merged.First->VDisplay != + ((I830ModePrivatePtr)pMode->Private)->merged.Second->VDisplay) || + (((I830ModePrivatePtr)pMode->Private)->merged.First->VDisplay != pMode->VDisplay) ) + nogood = TRUE; + break; + default: + if( (((I830ModePrivatePtr)pMode->Private)->merged.First->HDisplay != + ((I830ModePrivatePtr)pMode->Private)->merged.Second->HDisplay) || + (((I830ModePrivatePtr)pMode->Private)->merged.First->HDisplay != pMode->HDisplay) ) + nogood = TRUE; + } + if(nogood) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DGA: MetaMode %dx%d not suitable for DGA, skipping\n", + pMode->HDisplay, pMode->VDisplay); + goto mode_nogood; + } + } + newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec)); if (!newmodes) { @@ -155,6 +180,7 @@ I830DGAInit(ScreenPtr pScreen) currentMode->maxViewportY = currentMode->imageHeight - currentMode->viewportHeight; +mode_nogood: pMode = pMode->next; if (pMode == firstMode) break; diff --git a/src/i830_driver.c b/src/i830_driver.c index d32efa31..256ae22e 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -7088,22 +7088,6 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI830->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = I830BIOSCloseScreen; - if (!pI830->MergedFB && pI830->shadowReq.minorversion >= 1) { - /* Rotation */ - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n"); - xf86DisableRandR(); /* Disable built-in RandR extension */ - shadowSetup(pScreen); - /* support all rotations */ - I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); - pI830->PointerMoved = pScrn->PointerMoved; - pScrn->PointerMoved = I830PointerMoved; - pI830->CreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = I830CreateScreenResources; - } else { - /* Rotation */ - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "libshadow is version %d.%d.%d, required 1.1.0 or greater for rotation.\n",pI830->shadowReq.majorversion,pI830->shadowReq.minorversion,pI830->shadowReq.patchlevel); - } - if (pI830->MergedFB) { pI830->PointerMoved = pScrn->PointerMoved; pScrn->PointerMoved = I830MergedPointerMoved; @@ -7120,6 +7104,20 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } else { pI830->MouseRestrictions = FALSE; } + } else if (pI830->shadowReq.minorversion >= 1) { + /* Rotation */ + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n"); + xf86DisableRandR(); /* Disable built-in RandR extension */ + shadowSetup(pScreen); + /* support all rotations */ + I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); + pI830->PointerMoved = pScrn->PointerMoved; + pScrn->PointerMoved = I830PointerMoved; + pI830->CreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = I830CreateScreenResources; + } else { + /* Rotation */ + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "libshadow is version %d.%d.%d, required 1.1.0 or greater for rotation.\n",pI830->shadowReq.majorversion,pI830->shadowReq.minorversion,pI830->shadowReq.patchlevel); } if (serverGeneration == 1) |