diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:58 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:58 +0000 |
commit | bea8085e04136b0ef513c17bb65c54069ec531e1 (patch) | |
tree | 8f9c7a4da5c6b8bb7db35eb8928d035d787157a0 /src/aticonsole.c | |
parent | 7b588cda922992a8ee2d04853ba1533cf43592a3 (diff) |
DRI trunk-20040613 importDRI-trunk-20040613
Diffstat (limited to 'src/aticonsole.c')
-rw-r--r-- | src/aticonsole.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/aticonsole.c b/src/aticonsole.c index b025cddb..1d65df7c 100644 --- a/src/aticonsole.c +++ b/src/aticonsole.c @@ -19,19 +19,29 @@ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. + * + * DRI support by: + * Manuel Teira + * Leif Delgass <ldelgass@retinalburn.net> */ +#include "ati.h" #include "atiadapter.h" #include "aticonsole.h" #include "aticrtc.h" #include "atii2c.h" #include "atilock.h" #include "atimach64.h" +#include "atimach64io.h" #include "atimode.h" #include "atistruct.h" #include "ativga.h" #include "atividmem.h" +#include "mach64_common.h" + + + #include "xf86.h" /* @@ -242,7 +252,28 @@ ATISwitchMode if (pScreenInfo->vtSema) { pScreenInfo->currentMode = pMode; + +#ifdef XF86DRI + + if (pATI->directRenderingEnabled) + { + DRILock(pScreenInfo->pScreen,0); + ATIDRIWaitForIdle(pATI); + } + +#endif /* XF86DRI */ + ATIModeSet(pScreenInfo, pATI, &pATI->NewHW); + +#ifdef XF86DRI + + if (pATI->directRenderingEnabled) + { + DRIUnlock(pScreenInfo->pScreen); + } + +#endif /* XF86DRI */ + } SetTimeSinceLastInputEvent(); @@ -274,7 +305,19 @@ ATIEnterVT /* The rest of this isn't needed for shadowfb */ if (pATI->OptionShadowFB) + { + +#ifdef XF86DRI + + if (pATI->directRenderingEnabled) + { + DRIUnlock(pScreen); + } + +#endif /* XF86DRI */ + return TRUE; + } #ifndef AVOID_CPIO @@ -299,6 +342,15 @@ ATIEnterVT pScreenPixmap->devPrivate.ptr = NULL; } +#ifdef XF86DRI + + if (pATI->directRenderingEnabled) + { + DRIUnlock(pScreen); + } + +#endif /* XF86DRI */ + return Entered; } @@ -316,6 +368,18 @@ ATILeaveVT ) { ScrnInfoPtr pScreenInfo = xf86Screens[iScreen]; + ScreenPtr pScreen = pScreenInfo->pScreen; + ATIPtr pATI = ATIPTR(pScreenInfo); + +#ifdef XF86DRI + + if (pATI->directRenderingEnabled) + { + DRILock(pScreen,0); + ATIDRIWaitForIdle(pATI); + } + +#endif /* XF86DRI */ ATILeaveGraphics(pScreenInfo, ATIPTR(pScreenInfo)); } |