From patchwork Wed Dec 23 13:38:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 7912661 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7718C9F318 for ; Wed, 23 Dec 2015 13:38:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEC35203DF for ; Wed, 23 Dec 2015 13:38:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DA97B203DA for ; Wed, 23 Dec 2015 13:38:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EE4B89F6F; Wed, 23 Dec 2015 05:38:33 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 8850889F6F for ; Wed, 23 Dec 2015 05:38:31 -0800 (PST) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from nuc-i3427.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 50367594-1500048 for multiple; Wed, 23 Dec 2015 13:38:40 +0000 Received: by nuc-i3427.alporthouse.com (sSMTP sendmail emulation); Wed, 23 Dec 2015 13:38:26 +0000 Date: Wed, 23 Dec 2015 13:38:26 +0000 From: Chris Wilson To: Lukas Hejtmanek Message-ID: <20151223133826.GU5896@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Lukas Hejtmanek , intel-gfx@lists.freedesktop.org References: <20151218180811.GA31063@ics.muni.cz> <20151222205408.GL5896@nuc-i3427.alporthouse.com> <20151222222553.GX31063@ics.muni.cz> <20151223120144.GQ5896@nuc-i3427.alporthouse.com> <20151223121346.GY31063@ics.muni.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20151223121346.GY31063@ics.muni.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] vsync + vaapi question X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;