From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: Don't zero vblank timestamps from the irq handler Date: Thu, 1 Oct 2015 09:27:20 +0200 Message-ID: <20151001072720.GA3070@ulmo> References: <1443630094-10239-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0742777810==" Return-path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id E54BF6E3F6 for ; Thu, 1 Oct 2015 00:27:24 -0700 (PDT) Received: by wicge5 with SMTP id ge5so15687583wic.0 for ; Thu, 01 Oct 2015 00:27:23 -0700 (PDT) In-Reply-To: <1443630094-10239-1-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: ville.syrjala@linux.intel.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0742777810== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 30, 2015 at 07:21:34PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=C3=A4l=C3=A4 >=20 > If we couldn't get a high precisions vblank timestamp, we currently > store a zeroed timestamp instead and assume the next vblank irq to > get us something better. This makes sense when trying to update the > timestamp from eg. vblank enable. But if we do this from the vblank > irq we will never get a vblank timestamp unless we high precision > timestamps are available and succeeded. This break weston for instance > on drivers lacking high precision timestamps. >=20 > To fix this, zero the timestamp only when not called from vbl irq. > When called from the irq, we still want the timestamp, even if not > perfect. >=20 > This fixes a regression from > 4dfd64862ff852df drm: Use vblank timestamps to guesstimate how many vblan= ks were missed >=20 > Cc: Mario Kleiner > Cc: Thierry Reding > Reported-by: Thierry Reding > Signed-off-by: Ville Syrj=C3=A4l=C3=A4 > --- > drivers/gpu/drm/drm_irq.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) Applied on top of next-20151001 and the weston problem I was seeing is gone, so: Tested-by: Thierry Reding I think it might be worth considering squashing this into the offending commit to avoid breaking bisectibility. Thierry --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWDOBVAAoJEN0jrNd/PrOheKoP/3r1hMCZ15Mkwde7wC+Lo+0D qT9/1e+AcFOywoNAn+UGm/KqOShNmAo4tXRYJJJzkduzoO6bstyeY4jp1UefZseP 5mZZxkk1Bz7k9h4DTRkDpU2XHsQiADBcw5ag/KBex9fSshsr+DImEzLJo1AiDxA/ SG2qk3H8oTJ3ZLz8dl/K2zdaANDGU50n4Nnj67On/DlGoCUrCdPJ1p2XyCiSFBjc sfTFYlMAsnMjE5ulagIV9Qer5KbftM64bmeTDZg12fP3QBcsC7eCDPlxZVHWekLZ ZUgEdEY7ixG/x0oki38RnSzcyO7FFGuSPdpnmXvq/Pp1EKw1fVVCxnez9qNQxZx9 t7/G8c/tmtJCPdzbyO67gGltOZE4mMbZChL/wW0R8Abe7HpLsDS6Gww2pcJL2B7E t0WqXY7RGHiWccqIfAYy0hV4mFiG8sfa+idJ7qIAbpSiaEmRpA+BnMjCZiV2ZmEV 7itWsUYvbRim3zjXGMtJAqUH5J9qRxw1cSQjN/kjJViEXdqNulUnQv+YrFe4PEFy DzvupOCMIFc4+mCEZ1l7vzktvMOl116C25g1WECsD5ZXIZkBOGpAAQiQHV04aiTp brpbJaPUS38t4h4TrGRrBShXFUwr8KQhKlwj5dliqzDkVXZ34TpMrwk90mGCoaCz d2K6ZZJKQSWw+TZSiLEk =hc9F -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1-- --===============0742777810== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0742777810==--