Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752446AbdGFPEv (ORCPT ); Thu, 6 Jul 2017 11:04:51 -0400 Received: from home.keithp.com ([63.227.221.253]:52740 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbdGFPEu (ORCPT ); Thu, 6 Jul 2017 11:04:50 -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: <83a2dbe9-dfcb-e31e-fc7b-14c4364daea5@daenzer.net> References: <20170705221013.27940-1-keithp@keithp.com> <20170705221013.27940-2-keithp@keithp.com> <83a2dbe9-dfcb-e31e-fc7b-14c4364daea5@daenzer.net> Date: Thu, 06 Jul 2017 08:04:47 -0700 Message-ID: <86o9sxd2sw.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: 2347 Lines: 62 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Michel D=C3=A4nzer writes: > Subtle breakage here: vblwait->request.sequence must still get updated > for _DRM_VBLANK_RELATIVE, in case we're interrupted by a signal. Thanks for finding this. I think it might be better to just not modify the request.type field instead, so that on re-entry it gets recomputed? That would mean that a signal might cause the value to be different if the application takes a long time processing the signal, but I'm not sure that's wrong? >> @@ -317,6 +317,9 @@ int via_driver_irq_postinstall(struct drm_device *de= v) >> if (!dev_priv) >> return -EINVAL; >>=20=20 >> + if (dev->driver->get_vblank_counter) >> + dev->max_vblank_count =3D 0xffffffff; > > What's the purpose of this? All drivers providing get_vblank_counter > should already initialize max_vblank_count correctly. Yeah, I couldn't prove that this driver did that, and as Daniel says, we haven't ever audited the drivers to make sure they do. We have a check to see that they don't set max_vblank_count if they don't provide a get function, but I can't find the matching check for drivers that do provide a function and aren't setting max_vblank_count. Do you have any thoughts on the wisdom of changing this API before we have a driver that needs it? And, of course, thanks for your review! =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlleUY8ACgkQ2yIaaQAA ABHPXg//eDgZU2rCPRZihyGP8YPEybvXtmENp+chglujxdNiSE0oWk8/HxSl0D+p 5Y0dKPp8zg3XfYSNnNe0zqqVV5bt9Ijhc9XV19LCg0h88loXwGV/+9sB5cXtcrHc 6CDvZdgAtk+reux3TsuhciZAPmzL9y2AjgAG/K3T7KUBMN+iwVZ2zsubcwouBBIw nTaUG7PAp9eS0KYcpy5sRy0gLnEFZGtegFNwhjci5izE7m2ZF7CfxWxiblC5mtLP XnCMyeYZ8KeT3MMlDLKtugYBlGmQbO0L5R690JQNrJG9FouukTEpvX7Ib7HtsjOp u3FgKUEjM8n1NtFy7s2cksF+w5ksEUi4JGEDcuz8HXYU9r2u4ZiGSzbHjSDgGe4D 1HT5pXokDpbBDxaf+KLjpYG7jXOCSwwvrj8I3p7pcwcUAoFgvhyy1gNwJeID3Q2G 3GSYZT8bqGbV3zU6DzbbqKLDAiYhYs5mpetThlJSYlJckUzNLzJXY+etDqxaP9bg zj+a+UEpuTXx5+uru82j+J+uN07b2pL3SFseTMlOw/u6ajlL0wXv4SVWUa1ZegKZ TaYQkREjWwBY3dEJNZM7DAG8n7f8c3uwaR0XrHUe6TfZ01nioQZHoU8ZaM6sUx/i /75vzZobQYoBbenJUQUyWd5uzZ4UzVhiRx+9ZWBxnVkV17n4z4o= =R2R+ -----END PGP SIGNATURE----- --=-=-=--