Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbdGGCFq (ORCPT ); Thu, 6 Jul 2017 22:05:46 -0400 Received: from mail.netline.ch ([148.251.143.178]:38934 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753045AbdGGCFp (ORCPT ); Thu, 6 Jul 2017 22:05:45 -0400 Subject: Re: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns From: =?UTF-8?Q?Michel_D=c3=a4nzer?= To: Keith Packard , Dave Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20170705221013.27940-1-keithp@keithp.com> <20170705221013.27940-2-keithp@keithp.com> <83a2dbe9-dfcb-e31e-fc7b-14c4364daea5@daenzer.net> <86o9sxd2sw.fsf@keithp.com> Message-ID: <7afd9048-ef07-1f72-72f3-d1d69d368f92@daenzer.net> Date: Fri, 7 Jul 2017 11:05:21 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="U6INwa1TbfVUOpKug2U3TJ4cRppT8wXaj" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2800 Lines: 80 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --U6INwa1TbfVUOpKug2U3TJ4cRppT8wXaj Content-Type: multipart/mixed; boundary="VnVAdMBRtJX2Va2s9FKiwBkdIlp5XMUMk"; protected-headers="v1" From: =?UTF-8?Q?Michel_D=c3=a4nzer?= To: Keith Packard , Dave Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Message-ID: <7afd9048-ef07-1f72-72f3-d1d69d368f92@daenzer.net> Subject: Re: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns References: <20170705221013.27940-1-keithp@keithp.com> <20170705221013.27940-2-keithp@keithp.com> <83a2dbe9-dfcb-e31e-fc7b-14c4364daea5@daenzer.net> <86o9sxd2sw.fsf@keithp.com> In-Reply-To: --VnVAdMBRtJX2Va2s9FKiwBkdIlp5XMUMk Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: quoted-printable On 07/07/17 10:34 AM, Michel D=C3=A4nzer wrote: > On 07/07/17 12:04 AM, Keith Packard wrote: >> Michel D=C3=A4nzer writes: >> >>>> @@ -317,6 +317,9 @@ int via_driver_irq_postinstall(struct drm_device= *dev) >>>> if (!dev_priv) >>>> return -EINVAL; >>>> =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, >=20 > Which driver? >=20 >> and as Daniel says, we haven't ever audited the drivers to make sure >> they do. >=20 > I don't think that's what he meant, rather that with the change above, > all drivers have to be audited to make sure the added assignment doesn'= t > clobber an earlier assignment by the driver. =2E.. and if there are any drivers that set dev->driver->get_vblank_counter but don't set dev->max_vblank_count to a non-0 value, that the hardware counter actually has 32 bits. I'd say don't bother, just drop this hunk. --=20 Earthling Michel D=C3=A4nzer | http://www.amd= =2Ecom Libre software enthusiast | Mesa and X developer --VnVAdMBRtJX2Va2s9FKiwBkdIlp5XMUMk-- --U6INwa1TbfVUOpKug2U3TJ4cRppT8wXaj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHEEARECADEWIQSwn681vpFFIZgJURRaga+OatuyAAUCWV7sYhMcbWljaGVsQGRh ZW56ZXIubmV0AAoJEFqBr45q27IAbVgAn3vF1rZSS1GJJVRiBl5WSWeqm+urAKCJ H7a0ND+9asznRyq/GOT/8CfBYw== =DZgU -----END PGP SIGNATURE----- --U6INwa1TbfVUOpKug2U3TJ4cRppT8wXaj--