From: Eric Anholt Subject: Re: [PATCH] drm/vc4: Make pageflip completion handling more robust. Date: Thu, 02 Jun 2016 16:54:23 -0700 Message-ID: <87zir3cfkg.fsf@eliezer.anholt.net> References: <1463572966-20205-1-git-send-email-mario.kleiner.de@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0329573179==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id E03166EC9B for ; Thu, 2 Jun 2016 23:54:29 +0000 (UTC) In-Reply-To: <1463572966-20205-1-git-send-email-mario.kleiner.de@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Mario Kleiner , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0329573179== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Mario Kleiner writes: > Protect both the setup of the pageflip event and the > latching of the new requested displaylist head pointer > by the event lock, so we can't get into a situation > where vc4_atomic_flush latches the new display list via > HVS_WRITE, then immediately gets preempted before queueing > the pageflip event, then the page-flip completes in hw and > the vc4_crtc_handle_page_flip() runs and no-ops due to > lack of a pending pageflip event, then vc4_atomic_flush > continues and only then queues the pageflip event - after > the page flip handling already no-oped. This would cause > flip completion handling only at the next vblank - one > frame too late. This patch is: Reviewed-by: Eric Anholt I'll try to get a pull request sent out for this shortly. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXUMcwAAoJELXWKTbR/J7oByUP/jQK6hCykcy2RN52GXwWTD35 oL5jLbhfGs+RdvevKfSLKfYrjb9NAknI0iw551fV+2LjnX2iHFpnBiUYzbJa6Uhl uCljOuWYt0NS/EsQB/WKrsEByi/Ol2zWRn2CUmjB1wHZvDtcO+zhT7vZqNs1Esni 4UArwH0G9Ig7+y5AxSkgdqiH4OS17RQo72vR4rM/nWRBaR9zPdIOhJxFcNXPwv1e R69Th32CqphBO7NhRd8P1SMsWmq1YW+yotMoZOXAGlmQE4oACSeIXgE49L/5KosL SpeoSb8upad70XJa3TrFSilYeeiSwgoG9ssiYW3w0gxSu68m7+22WcAALPSMsMpe mJfrtxZNL3Ksh9ioZNYZrakNKDhNR8kVqoyRX12g8Rlh2b8xLSYa0DBkmnr7JdD5 JMw8/6oHxDeSOErqnR0z+ICE7Tfr/6Au25cFukGhizE1dYf/HK3HlP6gmQyywVz4 zU5iwO5WkmjwuKUR2sWV53tp8WsnFOaccPC/mMWOjxJ5w7TX+wTqcm4tmiFSFq06 teDthJNaiK6kPHvJaIpmKZXfTpmkNRbImlVYUrnp6fkQdlhPTrSbGRc4ngWJddtg lSqg44mYtEoEUkEIa+tnHw/HBzB0mEzPjfoi/zQ6LUlvtZ1xQv52AjunE80HBKYH afd1EepUF9gQ6pU/M9Zb =L3Bm -----END PGP SIGNATURE----- --=-=-=-- --===============0329573179== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0329573179==--