summaryrefslogtreecommitdiff
path: root/src/aticonsole.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:33:58 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:33:58 +0000
commit6615f72479ba2f33e6188abc4dd73a9159e509db (patch)
tree18394fbf6a8d249653dbceec44a16d45b42ef585 /src/aticonsole.c
parent749684ab7fb95175f75a201d1337d20298cdf825 (diff)
Diffstat (limited to 'src/aticonsole.c')
-rw-r--r--src/aticonsole.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/aticonsole.c b/src/aticonsole.c
index 80062d4f..1b87a956 100644
--- a/src/aticonsole.c
+++ b/src/aticonsole.c
@@ -19,19 +19,33 @@
* 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"
+#ifdef XF86DRI_DEVEL
+#include "mach64_common.h"
+#endif
+
+#include "mach64_common.h"
+
+
+
#include "xf86.h"
/*
@@ -242,7 +256,28 @@ ATISwitchMode
if (pScreenInfo->vtSema)
{
pScreenInfo->currentMode = pMode;
+
+#ifdef XF86DRI_DEVEL
+
+ if (pATI->directRenderingEnabled)
+ {
+ DRILock(pScreenInfo->pScreen,0);
+ ATIDRIWaitForIdle(pATI);
+ }
+
+#endif /* XF86DRI_DEVEL */
+
ATIModeSet(pScreenInfo, pATI, &pATI->NewHW);
+
+#ifdef XF86DRI_DEVEL
+
+ if (pATI->directRenderingEnabled)
+ {
+ DRIUnlock(pScreenInfo->pScreen);
+ }
+
+#endif /* XF86DRI_DEVEL */
+
}
SetTimeSinceLastInputEvent();
@@ -274,7 +309,19 @@ ATIEnterVT
/* The rest of this isn't needed for shadowfb */
if (pATI->OptionShadowFB)
+ {
+
+#ifdef XF86DRI_DEVEL
+
+ if (pATI->directRenderingEnabled)
+ {
+ DRIUnlock(pScreen);
+ }
+
+#endif /* XF86DRI_DEVEL */
+
return TRUE;
+ }
#ifndef AVOID_CPIO
@@ -299,6 +346,15 @@ ATIEnterVT
pScreenPixmap->devPrivate.ptr = NULL;
}
+#ifdef XF86DRI_DEVEL
+
+ if (pATI->directRenderingEnabled)
+ {
+ DRIUnlock(pScreen);
+ }
+
+#endif /* XF86DRI_DEVEL */
+
return Entered;
}
@@ -316,6 +372,18 @@ ATILeaveVT
)
{
ScrnInfoPtr pScreenInfo = xf86Screens[iScreen];
+ ScreenPtr pScreen = pScreenInfo->pScreen;
+ ATIPtr pATI = ATIPTR(pScreenInfo);
+
+#ifdef XF86DRI_DEVEL
+
+ if (pATI->directRenderingEnabled)
+ {
+ DRILock(pScreen,0);
+ ATIDRIWaitForIdle(pATI);
+ }
+
+#endif /* XF86DRI_DEVEL */
ATILeaveGraphics(pScreenInfo, ATIPTR(pScreenInfo));
}