summaryrefslogtreecommitdiff
path: root/src/i830_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r--src/i830_dri.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index ed5e6851..7c65f656 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1454,6 +1454,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);