summaryrefslogtreecommitdiff
path: root/src/nv_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nv_driver.c')
-rw-r--r--src/nv_driver.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nv_driver.c b/src/nv_driver.c
index f6519f3..ac5d27b 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -873,6 +873,26 @@ NVResetCrtcConfig(ScrnInfoPtr pScrn, int set)
}
}
+static Bool
+NV50AcquireDisplay(ScrnInfoPtr pScrn)
+{
+ if (!NV50DispInit(pScrn))
+ return FALSE;
+ if (!NV50CursorAcquire(pScrn))
+ return FALSE;
+ xf86SetDesiredModes(pScrn);
+
+ return TRUE;
+}
+
+static Bool
+NV50ReleaseDisplay(ScrnInfoPtr pScrn)
+{
+ NV50CursorRelease(pScrn);
+ NV50DispShutdown(pScrn);
+
+ return TRUE;
+}
/*
* This is called when VT switching back to the X server. Its job is
@@ -890,6 +910,12 @@ NVEnterVT(int scrnIndex, int flags)
NVPtr pNv = NVPTR(pScrn);
int i;
+ if (pNv->Architecture == NV_ARCH_50) {
+ if (!NV50AcquireDisplay(pScrn))
+ return FALSE;
+ return TRUE;
+ }
+
/* Save the current state */
if (pNv->SaveGeneration != serverGeneration) {
pNv->SaveGeneration = serverGeneration;
@@ -923,6 +949,11 @@ NVLeaveVT(int scrnIndex, int flags)
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
NVPtr pNv = NVPTR(pScrn);
+ if (pNv->Architecture == NV_ARCH_50) {
+ NV50ReleaseDisplay(pScrn);
+ return;
+ }
+
NVSync(pScrn);
NVRestore(pScrn);
}