diff options
author | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2006-08-24 10:23:22 +0800 |
---|---|---|
committer | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2006-08-24 10:23:22 +0800 |
commit | 078af29fa65653c5322b006404f7ad29aec24cce (patch) | |
tree | 1c05fbbbc4e07cb6f2e930bc6048f8fa288a38f1 /src/i830_dga.c | |
parent | 7458a6adb5ea62f56bb3d4ab19ad7d1aa6ad2d19 (diff) | |
parent | ea63e82ef417a9918e7d7105910a8ddeba2994f6 (diff) |
Merge branch 'master' into exa
Conflicts:
man/i810.man
src/Makefile.am
src/i830_accel.c
src/i830_dga.c
src/i830_driver.c
Diffstat (limited to 'src/i830_dga.c')
-rw-r--r-- | src/i830_dga.c | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/src/i830_dga.c b/src/i830_dga.c index 08207d39..c78063e1 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; @@ -254,15 +280,26 @@ I830_FillRect(ScrnInfoPtr pScrn, static void I830_Sync(ScrnInfoPtr pScrn) { -#ifdef I830_USE_XAA I830Ptr pI830 = I830PTR(pScrn); + int flags = MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE; MARKER(); - if (pI830->AccelInfoRec) { - (*pI830->AccelInfoRec->Sync) (pScrn); - } -#endif + if (pI830->noAccel) + return; + + if (IS_I965G(pI830)) + flags = 0; + + BEGIN_LP_RING(2); + OUT_RING(MI_FLUSH | flags); + OUT_RING(MI_NOOP); /* pad to quadword */ + ADVANCE_LP_RING(); + + I830WaitLpRing(pScrn, pI830->LpRing->mem.Size - 8, 0); + + pI830->LpRing->space = pI830->LpRing->mem.Size - 8; + pI830->nextColorExpandBuf = 0; } static void |