From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/7] drm/vc4: Fix vblank handling Date: Thu, 15 Jun 2017 16:30:58 -0700 Message-ID: <87fuf0u8ul.fsf@eliezer.anholt.net> References: <1496392332-8722-1-git-send-email-boris.brezillon@free-electrons.com> <1496392332-8722-3-git-send-email-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: In-Reply-To: <1496392332-8722-3-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Boris Brezillon , David Airlie , Daniel Vetter , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.orgBoris Brezillon , Sean Paul , Gerd Hoffmann , Mark Yao , Shawn Guo Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, Stephen Warren , Lee Jones , linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Eben Upton , "Hollingworth, Gordon" , "Cobley, Dom" , Liviu Dudau , Brian Starkey List-Id: devicetree@vger.kernel.org --=-=-= Content-Type: text/plain Boris Brezillon writes: > There are two problems related to VBLANK handling in the current CRTC > driver: > > * VBLANK events are missed when the CRTC is being disabled because the > driver does not wait till the end of the frame before stopping the > HVS and PV blocks. In this case, we should explicitly issue a VBLANK > event if there's one waiting > * when we are enabling a CRTC, drm_crtc_vblank_get() is called before > drm_crtc_vblank_on(), which is not supposed to happen (hence the > WARN_ON() in the code). To solve the problem, we delay the 'update > display list' operation after the CRTC is actually enabled. Does drm_crtc_vblank_get() actually fail when drm_crtc_vblank_on() hasn't been called? The code is a bit twisty, but it looked like we would track the get refcount and then turn on the interrupt once drm_crtc_vblank_on() was called. The first change of the two seems straightforward and good, though (and possible to separate, right?). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAllDGLIACgkQtdYpNtH8 nujsTQ/7BegZ1dwCM0HttJQlJWjWxpYANChBmI/35558blY/Hq2Tzbkwh1W8frGQ oH7hrfQ40CYR3tgHJK8NFSJLFsrSf7wYoHveJtd4jlzmeBI++QxBu+w45Rsvxiay W+8AIjgz3Bmjc16fypVEFjrbN5Y9YlX7yLmHVzGXRaZBxq6hdw0lW43scP11uMmG MOKADChhf1mKbVBFJYQ8ghBrNsSWpbwl/I8PnqAMKouigxeZoM0bQqCcqqrUD9oC eg+BcidkSbhSGWplPD0udT0DKzDFCluGH3CJcQW2MVjTZsRwFjEadhcGid/76lWu C7ebkjQLlm1nUw9BFDR4PjfI4HrTxX8/BpohqRtm5qST641ZBkAbbCYzxCJVtXJY 4ypns1W51C+/Pzte37D98+XkRHUyITJr+7F/wXja+9uJlHZlu1kJDRG0IEcGLSNp 6dQ7SFUNBYejxjuLArubGMtxzT+s/Z5q6+pAa55jw3KyvHFWi8XXROPdv+k8DhRN Oq0zfjO0W56D8jY05wUUufuSRFveCM8zwMsFvB6FPMv9oq61sNGqsBSUSCGiVUMj urKJ9OmuZUhNUEHLrDNKilxfSyfGZ/gEWNQVbLhejwiFMjGLgkiFWk3JZm9FSgbe /Ztea3QHsZTD7nzR/36f980lMg6mxCDtM8K7oGwSGb4Gss6Ca78= =lL30 -----END PGP SIGNATURE----- --=-=-=-- -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html