summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_3d.c1
-rw-r--r--src/i830_dri.c29
-rw-r--r--src/i830_driver.c26
-rw-r--r--src/i915_3d.c1
6 files changed, 30 insertions, 33 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ef8fc643..2745e8c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,16 +55,16 @@ i810_drv_la_SOURCES = \
i830_video.c \
i830_rotate.c \
i830_randr.c \
+ i830_3d.c \
i830_reg.h \
+ i915_3d.c \
i915_reg.h
if DRI
i810_drv_la_SOURCES += \
- i830_3d.c \
i810_dri.c \
i810_dri.h \
i830_dri.c \
i810_hwmc.c \
- i915_3d.c \
i830_dri.h
endif
diff --git a/src/i830.h b/src/i830.h
index 4fc39878..ac95e369 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -395,6 +395,8 @@ extern void I830Sync(ScrnInfoPtr pScrn);
extern void I830InitHWCursor(ScrnInfoPtr pScrn);
extern Bool I830CursorInit(ScreenPtr pScreen);
extern void IntelEmitInvarientState(ScrnInfoPtr pScrn);
+extern void I830EmitInvarientState(ScrnInfoPtr pScrn);
+extern void I915EmitInvarientState(ScrnInfoPtr pScrn);
extern void I830SelectBuffer(ScrnInfoPtr pScrn, int buffer);
extern void I830RefreshRing(ScrnInfoPtr pScrn);
diff --git a/src/i830_3d.c b/src/i830_3d.c
index 547e5564..0efd6e43 100644
--- a/src/i830_3d.c
+++ b/src/i830_3d.c
@@ -30,7 +30,6 @@
#endif
#include "i830.h"
-#include "i830_dri.h"
#include "i830_reg.h"
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 7c65f656..6f9a3ee1 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1182,35 +1182,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
pI830->AccelInfoRec->NeedToSync = TRUE;
}
-extern I830EmitInvarientState(ScrnInfoPtr pScrn);
-extern I915EmitInvarientState(ScrnInfoPtr pScrn);
-
-/* Initialize the first context */
-void
-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;
-
- {
- BEGIN_LP_RING(2);
- OUT_RING(MI_SET_CONTEXT);
- OUT_RING(ctx_addr |
- CTXT_NO_RESTORE |
- 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
* 3d context without need for any specific full-screen extension.
*
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 907b2042..80a46a47 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -4755,6 +4755,32 @@ I830InitFBManager(
return ret;
}
+/* Initialize the first context */
+void
+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;
+
+ {
+ BEGIN_LP_RING(2);
+ OUT_RING(MI_SET_CONTEXT);
+ OUT_RING(ctx_addr |
+ CTXT_NO_RESTORE |
+ CTXT_PALETTE_SAVE_DISABLE | CTXT_PALETTE_RESTORE_DISABLE);
+ ADVANCE_LP_RING();
+ }
+
+ if (IS_I9XX(pI830))
+ I915EmitInvarientState(pScrn);
+ else
+ I830EmitInvarientState(pScrn);
+}
+
static Bool
I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
diff --git a/src/i915_3d.c b/src/i915_3d.c
index f6e72196..d8edb181 100644
--- a/src/i915_3d.c
+++ b/src/i915_3d.c
@@ -30,7 +30,6 @@
#endif
#include "i830.h"
-#include "i830_dri.h"
#include "i915_reg.h"