summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-06-19 11:35:42 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-06-19 11:35:42 +0100
commita73ab7f0e6e3b0462e05c0031ffd602ed3e2bcd4 (patch)
tree144561a4679229d0d2c110eacd4407d2942f8d43
parent1fe3dd38eb613475d62140850e64767defed7d34 (diff)
additions for rotation fixes
-rw-r--r--src/Makefile.am6
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_dri.c11
-rw-r--r--src/i830_driver.c9
4 files changed, 21 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c64c2036..2745e8c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,7 +54,11 @@ i810_drv_la_SOURCES = \
i830_modes.c \
i830_video.c \
i830_rotate.c \
- i830_randr.c
+ i830_randr.c \
+ i830_3d.c \
+ i830_reg.h \
+ i915_3d.c \
+ i915_reg.h
if DRI
i810_drv_la_SOURCES += \
diff --git a/src/i830.h b/src/i830.h
index d2276629..4fa33285 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -394,7 +394,7 @@ extern void I830PrintErrorState(ScrnInfoPtr pScrn);
extern void I830Sync(ScrnInfoPtr pScrn);
extern void I830InitHWCursor(ScrnInfoPtr pScrn);
extern Bool I830CursorInit(ScreenPtr pScreen);
-extern void I830EmitInvarientState(ScrnInfoPtr pScrn);
+extern void IntelEmitInvarientState(ScrnInfoPtr pScrn);
extern void I830SelectBuffer(ScrnInfoPtr pScrn, int buffer);
extern void I830RefreshRing(ScrnInfoPtr pScrn);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 13d2cfdd..ed5e6851 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1182,14 +1182,16 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
pI830->AccelInfoRec->NeedToSync = TRUE;
}
+extern I830EmitInvarientState(ScrnInfoPtr pScrn);
+extern I915EmitInvarientState(ScrnInfoPtr pScrn);
+
/* Initialize the first context */
void
-I830EmitInvarientState(ScrnInfoPtr pScrn)
+IntelEmitInvarientState(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
CARD32 ctx_addr;
-
ctx_addr = pI830->ContextMem.Start;
/* Align to a 2k boundry */
ctx_addr = ((ctx_addr + 2048 - 1) / 2048) * 2048;
@@ -1202,6 +1204,11 @@ I830EmitInvarientState(ScrnInfoPtr pScrn)
CTXT_PALETTE_SAVE_DISABLE | CTXT_PALETTE_RESTORE_DISABLE);
ADVANCE_LP_RING();
}
+
+ if (IS_I9XX(pI830))
+ I915EmitInvarientState(pScrn);
+ else
+ I830EmitInvarientState(pScrn);
}
/* Use callbacks from dri.c to support pageflipping mode for a single
diff --git a/src/i830_driver.c b/src/i830_driver.c
index e43e355a..a4b891b6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -5107,12 +5107,13 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
#endif
+ /* Setup 3D engine, needed for rotation too */
+ IntelEmitInvarientState(pScrn);
+
#ifdef XF86DRI
if (pI830->directRenderingEnabled) {
pI830->directRenderingOpen = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Enabled\n");
- /* Setup 3D engine */
- I830EmitInvarientState(pScrn);
} else {
if (driDisabled)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Disabled\n");
@@ -5622,7 +5623,6 @@ I830BIOSEnterVT(int scrnIndex, int flags)
if (!pI830->starting) {
I830DRIResume(screenInfo.screens[scrnIndex]);
- I830EmitInvarientState(pScrn);
I830RefreshRing(pScrn);
I830Sync(pScrn);
DO_RING_IDLE();
@@ -5634,6 +5634,9 @@ I830BIOSEnterVT(int scrnIndex, int flags)
}
#endif
+ /* Needed for rotation */
+ IntelEmitInvarientState(pScrn);
+
if (pI830->checkDevices)
pI830->devicesTimer = TimerSet(NULL, 0, 1000, I830CheckDevicesTimer, pScrn);