diff options
-rw-r--r-- | src/i830_dri.c | 3 | ||||
-rw-r--r-- | src/i830_driver.c | 53 | ||||
-rw-r--r-- | src/i830_rotate.c | 26 |
3 files changed, 27 insertions, 55 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index e3fcc970..b82eae63 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -974,8 +974,7 @@ I830DRIFinishScreenInit(ScreenPtr pScreen) */ #if 0 if (pI830->allowPageFlip && pI830->drmMinor >= 1) { - I830shadowSetup(pScreen); - I830shadowAdd(pScreen, 0, I830DRIShadowUpdate, 0, 0, 0); + shadowAdd(pScreen, 0, I830DRIShadowUpdate, 0, 0, 0); } else #endif diff --git a/src/i830_driver.c b/src/i830_driver.c index f4cdfdcf..8671e5ae 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -5372,44 +5372,25 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI830->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = I830BIOSCloseScreen; -#if 1 /* ROTATION */ - { - Bool init = TRUE; - - if (!xf86LoadSubModule(pScrn, "intel_randr")) - init = FALSE; - -#if 0 - if (!xf86LoadSubModule(pScrn, "i830_damage")) - init = FALSE; - - if (!xf86LoadSubModule(pScrn, "i830_shadow")) - init = FALSE; -#endif - - if (init && xf86LoaderCheckSymbol("I830RandRInit")) { - Bool (*I830RandRInit)(ScreenPtr pScreen, int rotation) = NULL; - - I830RandRInit = LoaderSymbol("I830RandRInit"); - - if (I830RandRInit) { - xf86DisableRandR(); /* Disable built-in RandR extension */ - I830shadowSetup(pScreen); - if (IS_BROADWATER(pI830)) - /* only 0 degrees for Broadwater */ - (*I830RandRInit)(pScreen, RR_Rotate_0); - else - /* support all rotations */ - (*I830RandRInit)(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Intel: RandR enabled, ignore the following RandR disabled message.\n"); - pI830->PointerMoved = pScrn->PointerMoved; - pScrn->PointerMoved = I830PointerMoved; - pI830->CreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = I830CreateScreenResources; - } + 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 */ + if (IS_BROADWATER(pI830)) { + I830RandRInit(pScreen, RR_Rotate_0); /* only 0 degrees for Broadwater */ + } else { + 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); } -#endif if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); diff --git a/src/i830_rotate.c b/src/i830_rotate.c index 1f1d7291..d0d9cf2d 100644 --- a/src/i830_rotate.c +++ b/src/i830_rotate.c @@ -702,13 +702,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode) pScrn2 = pScrn; } - if (xf86LoaderCheckSymbol("I830GetRotation")) { - Rotation (*I830GetRotation)(ScreenPtr pScreen) = NULL; - I830GetRotation = LoaderSymbol("I830GetRotation"); - if (I830GetRotation) { - pI830->rotation = (*I830GetRotation)(pScrn->pScreen); - } - } + pI830->rotation = I830GetRotation(pScrn->pScreen); /* Check if we've still got the same orientation, or same mode */ if (pI830->rotation == oldRotation && pI830->currentMode == mode) @@ -853,12 +847,11 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode) } } - I830shadowUnset (pScrn->pScreen); + shadowRemove (pScrn->pScreen, NULL); if (pI830->rotation != RR_Rotate_0) - I830shadowSet (pScrn->pScreen, - (*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen), - pI830->noAccel ? I830shadowUpdateRotatePacked : func, - I830WindowLinear, pI830->rotation, 0); + shadowAdd (pScrn->pScreen, + (*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen), + func, I830WindowLinear, pI830->rotation, 0); if (I830IsPrimary(pScrn)) { if (pI830->rotation != RR_Rotate_0) @@ -1063,12 +1056,11 @@ BAIL0: I830BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key, pI8301->RotatedMem.Offset); } - I830shadowUnset (pScrn->pScreen); + shadowRemove (pScrn->pScreen, NULL); if (pI830->rotation != RR_Rotate_0) - I830shadowSet (pScrn->pScreen, - (*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen), - pI830->noAccel ? I830shadowUpdateRotatePacked : func, - I830WindowLinear, pI830->rotation, 0); + shadowAdd (pScrn->pScreen, + (*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen), + func, I830WindowLinear, pI830->rotation, 0); if (I830IsPrimary(pScrn)) { if (pI830->rotation != RR_Rotate_0) |