Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752012AbdGFPLp (ORCPT ); Thu, 6 Jul 2017 11:11:45 -0400 Received: from home.keithp.com ([63.227.221.253]:52789 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbdGFPLo (ORCPT ); Thu, 6 Jul 2017 11:11:44 -0400 From: Keith Packard To: Michel =?utf-8?Q?D=C3=A4nzer?= , Dave Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns In-Reply-To: <957783a4-f761-139e-2554-63669e976f32@daenzer.net> References: <20170705221013.27940-1-keithp@keithp.com> <20170705221013.27940-2-keithp@keithp.com> <83a2dbe9-dfcb-e31e-fc7b-14c4364daea5@daenzer.net> <957783a4-f761-139e-2554-63669e976f32@daenzer.net> Date: Thu, 06 Jul 2017 08:11:42 -0700 Message-ID: <86h8ypd2hd.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2140 Lines: 57 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Michel D=C3=A4nzer writes: > BTW, this got me thinking that we should probably treat > _DRM_VBLANK_NEXTONMISS the same way, i.e. clear the flag after updating > vblwait->request.sequence. Otherwise there could theoretically (though > unlikely) be an infinite loop: I was thinking that we should just re-compute the target sequence from scratch and not modify the request at all. But, now I see your point -- if the wait is interrupted long after it starts, then we don't want to change the target number. I wonder if anyone actually waits for vblank anymore, or if everyone just uses the event interface... > ioctl with _DRM_VBLANK_NEXTONMISS, target missed =3D> wait for next vblank > wait interrupted by signal > lather, rinse, repeat Yeah, sounds like a latent bug. Ok, to retract my last email, I'll go ahead and fix things up so that the request sequence gets set to the correct absolute value and that any flags which modify it get cleared. > I'd advise against adding a "next on miss" flag for the new ioctl until > there is specific demand for that. Thanks for your advice :-) =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlleUy4ACgkQ2yIaaQAA ABGB3A//VDnnQYwTG1v2LRYE/IHIqk5x1PNyjjN+gLKbNlKCuNBA92xCtm1j1zIL Z+h/WbTRsi6BlR4MMdpGeu8PjqED2ZyfNuJj1BsK0YP10TM8w4LpnO5nKL0Nu6KG H4GjAHr/2H5FpLdWKPoWYJiRXF3mt1zsTfHfNvinPBjuEhcUrLiLo4NHLDHTsqz7 oz/6ccdSRz9Kobhz6Tp2+pRI1vIekpy7vhOfJEzATN0AHQWFTixOt3LZKgzhLaHC kVHDqyUW5YNlV0Us6Dn0LRZO6tAKI65RcOeTXKFJF09zF3kA0LerXKWyY5gY0DBW wWYbHvhofEAIZ0bba1aOAOqulRWFYb0Jl3ODgKxKl3c3zcYM8ok23TLewquDkaFR b2W6qAnC4l2r/4nCRY1Wf6hU0cDAcK0ZL0HDeAuuU+KF18PC0o3KTNY1HLaZI0Ac r/1IDZcfooPtvYwulTGajJnNmT5Wk3wxt5iCNoLoFXlWLeKrIKBjLswMJirkFKL9 qO0G9PKGbsjL2mjkQYWXchPuOK+PfKzCA2IGomwC2yf43mizg+aFNgDqjkkB7bm9 3PVhE6QuYUDApjXj2/3nTbei34ZEJl3MQkmopRJmmP/WUAlldHoCZhBJJRwD23TD RLmUmgeyfNPEf0VCWcgHm18leVz+IPdAwSoUi5wNOPCmXM4KS7Y= =O2LE -----END PGP SIGNATURE----- --=-=-=--