summaryrefslogtreecommitdiff
path: root/src/via_ums.c
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2011-09-03 16:43:40 +0000
committerJames Simmons <jsimmons@infradead.org>2011-09-03 16:43:40 +0000
commit56d49a93d65251a3bfa3d36c2a37e84c1b0ff5d9 (patch)
tree3ae0202e401635bb39ef107e7a14a5b46713d60c /src/via_ums.c
parent3297082df08c74c9616539059e410115b6f70047 (diff)
incorporate VIAWriteMode into Crtc mode_set. Call xf86CrtcSetMode when we enter UMSEnterVT
Diffstat (limited to 'src/via_ums.c')
-rw-r--r--src/via_ums.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/src/via_ums.c b/src/via_ums.c
index 80157f5..3b81473 100644
--- a/src/via_ums.c
+++ b/src/via_ums.c
@@ -180,66 +180,6 @@ UMSAccelSetup(ScrnInfoPtr pScrn)
}
}
-Bool
-VIAWriteMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
- VIAPtr pVia = VIAPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAWriteMode\n"));
-
- pVia->OverlaySupported = FALSE;
-
- pScrn->vtSema = TRUE;
-
- if (!pVia->pVbe) {
-
- if (!vgaHWInit(pScrn, mode))
- return FALSE;
-
- if (pVia->UseLegacyModeSwitch) {
- if (!pVia->IsSecondary)
- ViaModePrimaryLegacy(pScrn, mode);
- else
- ViaModeSecondaryLegacy(pScrn, mode);
- } else {
- ViaCRTCInit(pScrn);
- ViaModeSet(pScrn, mode);
- }
-
- } else {
-
- if (!ViaVbeSetMode(pScrn, mode))
- return FALSE;
- /*
- * FIXME: pVia->IsSecondary is not working here. We should be able
- * to detect when the display is using the secondary head.
- * TODO: This should be enabled for other chipsets as well.
- */
- if (pVia->pBIOSInfo->lvds && pVia->pBIOSInfo->lvds->status == XF86OutputStatusConnected) {
- switch (pVia->Chipset) {
- case VIA_P4M900:
- case VIA_VX800:
- case VIA_VX855:
- case VIA_VX900:
- /*
- * Since we are using virtual, we need to adjust
- * the offset to match the framebuffer alignment.
- */
- if (pScrn->displayWidth != mode->CrtcHDisplay)
- ViaSecondCRTCHorizontalOffset(pScrn);
- break;
- }
- }
- }
-
- /* Enable the graphics engine. */
- if (!pVia->NoAccel)
- VIAInitialize3DEngine(pScrn);
-
- pScrn->AdjustFrame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
- return TRUE;
-}
-
static void
ViaMMIODisable(ScrnInfoPtr pScrn)
{
@@ -688,10 +628,8 @@ UMSEnterVT(int scrnIndex, int flags)
crtc->funcs->save(crtc);
- crtc->funcs->mode_set(crtc, pScrn->currentMode,
- pScrn->currentMode, 0, 0);
+ xf86CrtcSetMode(crtc, pScrn->currentMode, pVia->rotate, 0, 0);
}
-
xf86SaveScreen(pScrn->pScreen, SCREEN_SAVER_ON);
/* A patch for APM suspend/resume, when HWCursor has garbage. */