summaryrefslogtreecommitdiff
path: root/src/smi_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2007-01-10 21:58:47 -0500
committerAlex Deucher <alex@samba.(none)>2007-01-10 21:58:47 -0500
commit3ff1d1aaf93df90f3a96b87bd8447db44b1722f5 (patch)
tree3eaf5c3524fd83ddcc51cd8fa2d3f8c9c2dedd8e /src/smi_driver.c
parent72c1d44182a49dbd502bbdc0b48f69a43ad5aed0 (diff)
only idle the engine on mode switches
on the initial mode set the engine doesn't idle for some users.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r--src/smi_driver.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c
index 1e086f6..f13b5c4 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1118,6 +1118,8 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
SMI_EnableVideo(pScrn);
SMI_UnmapMem(pScrn);
+ pSmi->IsSwitching = FALSE;
+
if (pSmi->Dualhead) {
pScrn->display->virtualX = 2 * pSmi->lcdWidth;
pScrn->display->virtualY = pSmi->lcdHeight;
@@ -1563,7 +1565,8 @@ SMI_WriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, SMIRegPtr restore)
vgaHWProtect(pScrn, TRUE);
/* Wait for engine to become idle */
- WaitIdle();
+ if (pSmi->IsSwitching)
+ WaitIdle();
if (pSmi->useBIOS && (pSmi->pInt10 != NULL)
&& (restore->mode != 0))
@@ -3179,10 +3182,13 @@ Bool
SMI_SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
{
Bool ret;
+ SMIPtr pSmi = SMIPTR(xf86Screens[scrnIndex]);
ENTER_PROC("SMI_SwitchMode");
+ pSmi->IsSwitching = TRUE;
ret = SMI_ModeInit(xf86Screens[scrnIndex], mode);
+ pSmi->IsSwitching = FALSE;
LEAVE_PROC("SMI_SwitchMode");
return(ret);