diff --git a/src/xvmc/i965_xvmc.c b/src/xvmc/i965_xvmc.c index 761ff9b..af401a6 100644 --- a/src/xvmc/i965_xvmc.c +++ b/src/xvmc/i965_xvmc.c @@ -554,6 +554,17 @@ static Status put_surface(Display *display,XvMCSurface *surface, { struct i965_xvmc_surface *private_surface = surface->privData; + drmVblank vbl; + + vbl.request.type = DRM_VBLANK_RELATIVE | DRM_VBLANK_NEXTONMISS; + vbl.request.seq = 1; +/* need to check which plane we're on */ +#if 0 + if (pDraw.pipe == 1) + vbl.request.type |= DRM_VBLANK_SECONDARY; +#endif + /* Avoid tearing by putting the image during vblank */ + drmWaitVBlank(pI830->drmSubFd, &vbl); data->surf_offset = private_surface->buffer.offset; return Success;