diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-05-18 13:19:56 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-05-18 13:19:56 +1000 |
commit | 035d1313d59f5d564701e58e1a2c84016a3afe22 (patch) | |
tree | f8328bcc5a081bb2b6acd76f5553ff62e70bdbc0 | |
parent | f7d7921179a31f23bb7fcf008afcc9314cb8e38a (diff) | |
download | xorg-driver-xf86-video-nouveau-035d1313d59f5d564701e58e1a2c84016a3afe22.tar.gz |
NV50: hook up nv50 code for Enter/LeaveVT
-rw-r--r-- | src/nv_driver.c | 31 |
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); } |