From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/5] drm/i915: Fix gen3/4 vblank counter wraparound Date: Thu, 7 Nov 2013 17:20:40 +0100 Message-ID: <20131107162040.GU14082@phenom.ffwll.local> References: <1383753389-12763-1-git-send-email-rodrigo.vivi@gmail.com> <1383753389-12763-4-git-send-email-rodrigo.vivi@gmail.com> <1383841007.2445.0.camel@ideak-mobl> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 287D9FB539 for ; Thu, 7 Nov 2013 08:20:10 -0800 (PST) Received: by mail-ee0-f42.google.com with SMTP id c1so442406eek.1 for ; Thu, 07 Nov 2013 08:20:10 -0800 (PST) Content-Disposition: inline In-Reply-To: <1383841007.2445.0.camel@ideak-mobl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Imre Deak Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Nov 07, 2013 at 06:16:47PM +0200, Imre Deak wrote: > On Wed, 2013-11-06 at 13:56 -0200, Rodrigo Vivi wrote: > > From: Ville Syrj=E4l=E4 > > = > > When the hardware frame counter reads 0xffffff and we're already past > > vblank start, we'd return 0x1000000 as the vblank counter value. Once > > we'd cross into the next frame's active portion, the vblank counter > > would wrap to 0. So we're reporting two different vblank counter values > > for the same frame. > > = > > Fix the problem by masking the cooked value by 0xffffff to make sure > > the counter wraps already after vblank start. > > = > > Signed-off-by: Ville Syrj=E4l=E4 > > Signed-off-by: Rodrigo Vivi > = > Reviewed-by: Imre Deak Queued for -next, thanks for the patch. -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch