From 71687eeaa94c5b1ce1fbb11ff27d4e69c73a4a1d Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Mon, 23 Feb 2004 21:35:30 +0000 Subject: merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214 --- src/i810_driver.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'src/i810_driver.c') diff --git a/src/i810_driver.c b/src/i810_driver.c index e1f565f2..ee927432 100644 --- a/src/i810_driver.c +++ b/src/i810_driver.c @@ -25,8 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.1.4.2 2003/12/06 13:24:24 kaleb Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.98 2003/12/07 18:28:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.102 2004/01/02 22:16:18 dawes Exp $ */ /* * Reformatted with GNU indent (2.2.8), using the following options: @@ -245,6 +244,8 @@ const char *I810xaaSymbols[] = { "XAACreateInfoRec", "XAADestroyInfoRec", "XAAInit", + "XAACopyROP", + "XAAPatternROP", NULL }; @@ -377,6 +378,7 @@ i810Setup(pointer module, pointer opts, int *errmaj, int *errmin) I810drmSymbols, I810driSymbols, I810shadowSymbols, + driShadowFBSymbols, #endif I810vbeSymbols, vbeOptionalSymbols, I810ddcSymbols, I810int10Symbols, NULL); @@ -2220,10 +2222,39 @@ Bool I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + I810Ptr pI810 = I810PTR(pScrn); if (I810_DEBUG & DEBUG_VERBOSE_CURSOR) ErrorF("I810SwitchMode %p %x\n", (void *)mode, flags); +#ifdef XF86DRI + if (pI810->directRenderingEnabled) { + if (I810_DEBUG & DEBUG_VERBOSE_DRI) + ErrorF("calling dri lock\n"); + DRILock(screenInfo.screens[scrnIndex], 0); + pI810->LockHeld = 1; + } +#endif + + if (pI810->AccelInfoRec != NULL) { + I810RefreshRing(pScrn); + I810Sync(pScrn); + pI810->AccelInfoRec->NeedToSync = FALSE; + } + I810Restore(pScrn); + +#ifdef XF86DRI + if (!I810DRIEnter(pScrn)) { + return FALSE; + } + if (pI810->directRenderingEnabled) { + if (I810_DEBUG & DEBUG_VERBOSE_DRI) + ErrorF("calling dri unlock\n"); + DRIUnlock(screenInfo.screens[scrnIndex]); + pI810->LockHeld = 0; + } +#endif + return I810ModeInit(pScrn, mode); } @@ -2357,6 +2388,11 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen) XAAInfoRecPtr infoPtr = pI810->AccelInfoRec; if (pScrn->vtSema == TRUE) { + if (pI810->AccelInfoRec != NULL) { + I810RefreshRing(pScrn); + I810Sync(pScrn); + pI810->AccelInfoRec->NeedToSync = FALSE; + } I810Restore(pScrn); vgaHWLock(hwp); } -- cgit v1.2.3