Re: vsync + vaapi question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 23, 2015 at 01:13:46PM +0100, Lukas Hejtmanek wrote:
> On Wed, Dec 23, 2015 at 12:01:44PM +0000, Chris Wilson wrote:
> > The clipped extents of the va-api Window is used to determine which CRTC
> > to use as the vblank source. Hmm, the Primary Output is used as the
> > preference (i.e. if any part of that Window is on the Primary, it is
> > used as the CRTC - the idea being that Primary is important and this
> > should share the vblank source for more Windows and prevent arbitrary
> > jumps between vblank sources as the Window moves).
> 
> just tested, with xv output, vsync seems to be quite ok. however, with va-api
> it not ok on both LVDS and HDMI. HDMI seems to be far worse with va-api (i.e.
> out of sync). Maybe a bug in va-api sync code?

Try (libva):

diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
index d076fb3..9ff5e95 100644
--- a/va/x11/dri2_util.c
+++ b/va/x11/dri2_util.c
@@ -95,8 +95,9 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
     if (dri2_drawable->has_backbuffer) {
         if (gsDRI2SwapAvailable) {
             CARD64 ret;
-            VA_DRI2SwapBuffers(ctx->native_dpy, dri_drawable->x_drawable, 0, 0,
-                               0, &ret);
+            VA_DRI2SwapBuffers(ctx->native_dpy, dri_drawable->x_drawable,
+                              0, 1, 0,
+                              &ret);
         } else {
             xrect.x = 0;
             xrect.y = 0;

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux