diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-25 15:07:39 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-25 15:07:39 -0200 |
commit | 9570cfdc132b0acb1d2b70edc6a3a5a812ef9691 (patch) | |
tree | a6e1ee62ee9beab228df46b09a4726a68508dbb8 | |
parent | 26ce0b163d9cf44ec1bc1d1bd460887aa5b405a7 (diff) |
Ensure the engine is idle before switching to a virtual terminal.
At least in the smi501/502, it may even completely lock in some special
cases (like when there is a browser playing some youtube video).
The code in SMI_CloseScreen() was almost identical to SMI_LeaveVT(),
so it now just call SMI_Leave() if required.
-rw-r--r-- | src/smi_driver.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index 9a42bc3..2d88a76 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1038,6 +1038,8 @@ SMI_LeaveVT(int scrnIndex, int flags) ENTER(); + SMI_AccelSync(pScrn); + /* Ensure that the rotation BlockHandler is unwrapped, and the shadow pixmaps are deallocated, as the video memory is going to be unmapped. */ @@ -1807,17 +1809,9 @@ SMI_CloseScreen(int scrnIndex, ScreenPtr pScreen) if (pSmi->HwCursor) xf86_cursors_fini(pScreen); - if (pScrn->vtSema) { - if (!IS_MSOC(pSmi)) { - vgaHWPtr hwp = VGAHWPTR(pScrn); - - SMILynx_WriteMode(pScrn, &hwp->SavedReg, pSmi->save); - vgaHWLock(hwp); - } - else - SMI501_WriteMode(pScrn, pSmi->save); - SMI_UnmapMem(pScrn); - } + if (pScrn->vtSema) + /* Restore console mode and unmap framebuffer */ + SMI_LeaveVT(scrnIndex, 0); if (pSmi->XAAInfoRec != NULL) { XAADestroyInfoRec(pSmi->XAAInfoRec); |