From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v2 3/8] drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks() Date: Fri, 29 Jun 2018 13:19:16 -0700 Message-ID: <87lgaxny63.fsf@anholt.net> References: <20180629111722.20299-1-boris.brezillon@bootlin.com> <20180629111722.20299-4-boris.brezillon@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1860887052==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 58E826F1A3 for ; Fri, 29 Jun 2018 20:19:20 +0000 (UTC) In-Reply-To: <20180629111722.20299-4-boris.brezillon@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Boris Brezillon , Liviu Dudau List-Id: dri-devel@lists.freedesktop.org --===============1860887052== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Boris Brezillon writes: > drm_atomic_helper_wait_for_vblanks() assumes the CRTC will continuously > generate VBLANK events and the vblank counter will keep increasing. > While this work for a regular pipeline, it doesn't when you have the > CRTC is feeding the transposer block, because this block works in > oneshot mode, and, by the time we reach > drm_atomic_helper_wait_for_vblanks() the only VBLANK event might have > already been sent and the VBLANK counter will stay unchanged, thus > triggering a timeout. > > Luckily, we can replace the drm_atomic_helper_wait_for_vblanks() call > by drm_atomic_helper_wait_for_flip_done() because the only thing we > want to check when calling drm_atomic_helper_wait_for_vblanks() from > vc4_atomic_complete_commit() is that new FBs are in use and the old > ones can be safely released. > > Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAls2lEQACgkQtdYpNtH8 nuiMyQ/6Ankwoz8rIWNWYffkpjwPU+HwwbmVx/hiL8dHRrOvA8Tx6S/+njme6PJd PEa59jNQSOCpomQGSDJ/aSrSjjypJa1MF1B/jU5w/zzdsqL+RhpM/ohNb6v/gWDr 8BSzPD4iHjrCNSZFWi9DmCjYHB72iN7aW5pEwYn0VyxN73PXy4whVEVUeblklNE2 UYZAqimPHtcZ1iTBCjW8t9NHS9oqWsiBnVpxX3oeJgygcrW3L8ypovsX49BHnsMt i1KmR8k0AIvPbrVoQhv/k16uuhDlXnOwjwHck4OYZZ9sbaov73qc5OUXodS9xCAT Z6UU9PofP2BQX06VhkUlbVfEFX7V99pDjRpbwKpkJ5U1L7Y02p2xdnzqWu83CJgX 5W7HyEOSnTmPhFUnYyjzuJ7VL1kQfFISo0Yw0m7/sPBLpqceDR3XLL7WohLW1/GM k2Oz1L7OvzAKufBTD2ttyllDuNSuQQsdDBt4J6TLph0h97AyELZOydEAFoqUcj3l 5Pu/mX+JnpSY2lV5ftQBPmcbzgSb1SM8K1Jc7SronRNCdU8HRwPt0NPK+uNKnksC 4qD6WPjJcERAEjI7hFYktHXm2V5R76ykOiiZjhtF4g7FumMADbwV5CDuICimfOLv KFh7TILp0DLUJL+a68chhvVS9NepAmXkwtRCzBM9l0g5hTPcDRw= =SwZL -----END PGP SIGNATURE----- --=-=-=-- --===============1860887052== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1860887052==--