summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/smi.h2
-rw-r--r--src/smi_driver.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/smi.h b/src/smi.h
index ad1c2e2..a793931 100644
--- a/src/smi.h
+++ b/src/smi.h
@@ -249,6 +249,8 @@ typedef struct
Bool Dualhead;
+ Bool IsSwitching; /* when switching modes */
+
} SMIRec, *SMIPtr;
#define SMIPTR(p) ((SMIPtr)((p)->driverPrivate))
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);