summaryrefslogtreecommitdiff
path: root/src/i830_dri.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-06-26 16:04:33 +0200
committerEric Anholt <anholt@FreeBSD.org>2006-06-26 16:04:33 +0200
commite7723a4e5725147d3bd9ba22c5a3314b0556e440 (patch)
tree3eaffc1821be6d5f5fa0815018fbfb280575081c /src/i830_dri.c
parent5111b883480a5a9cc82200f2684cba67b515aa73 (diff)
parentdae9cb7712d5d8f88697ca83808c59af08364c0e (diff)
Merge branch 'origin'
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r--src/i830_dri.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 52c83cf9..7c5f7956 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1184,28 +1184,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
pI830->AccelInfoRec->NeedToSync = TRUE;
}
-/* Initialize the first context */
-void
-I830EmitInvarientState(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();
- }
-}
-
/* Use callbacks from dri.c to support pageflipping mode for a single
* 3d context without need for any specific full-screen extension.
*
@@ -1449,6 +1427,31 @@ I830UpdateDRIBuffers(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
}
Bool
+I830DRISetVBlankInterrupt (ScrnInfoPtr pScrn, Bool on)
+{
+ I830Ptr pI830 = I830PTR(pScrn);
+ drmI830VBlankPipe pipe;
+
+ if (pI830->directRenderingEnabled && pI830->drmMinor >= 5) {
+ if (on) {
+ if (pI830->planeEnabled[1])
+ pipe.pipe = DRM_I830_VBLANK_PIPE_B;
+ else
+ pipe.pipe = DRM_I830_VBLANK_PIPE_A;
+ } else {
+ pipe.pipe = 0;
+ }
+ if (drmCommandWrite(pI830->drmSubFD, DRM_I830_SET_VBLANK_PIPE,
+ &pipe, sizeof (pipe))) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I830 Vblank Pipe Setup Failed\n");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+Bool
I830DRILock(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);