From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 3/6] drm/vc4: Don't check plane state more than once Date: Mon, 19 Nov 2018 20:38:56 -0800 Message-ID: <87muq4qs67.fsf@anholt.net> References: <20181115103721.25601-1-boris.brezillon@bootlin.com> <20181115103721.25601-4-boris.brezillon@bootlin.com> <8736s22hvj.fsf@anholt.net> <20181115221247.0937f0d7@bbrezillon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1482677938==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 360546E30B for ; Tue, 20 Nov 2018 04:38:59 +0000 (UTC) In-Reply-To: <20181115221247.0937f0d7@bbrezillon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Boris Brezillon Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1482677938== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Boris Brezillon writes: > On Thu, 15 Nov 2018 12:41:36 -0800 > Eric Anholt wrote: > >> Boris Brezillon writes: >>=20 >> > We are about to use vc4_plane_mode_set() in the async check path, but >> > async check can decide that async update is not possible and force the >> > driver to fallback to a sync update. >> > >> > All the checks that have been done on the plane state during async che= ck >> > stay valid, and checking it again is not necessary. Add a ->checked >> > field to vc4_plane_state, and use it to track the status of the state >> > (checked or not). >> > >> > Signed-off-by: Boris Brezillon >> > --- >> > drivers/gpu/drm/vc4/vc4_drv.h | 5 +++++ >> > drivers/gpu/drm/vc4/vc4_plane.c | 10 ++++++++++ >> > 2 files changed, 15 insertions(+) >> > >> > diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_d= rv.h >> > index 9ed05fb61eb6..d1000c4805c2 100644 >> > --- a/drivers/gpu/drm/vc4/vc4_drv.h >> > +++ b/drivers/gpu/drm/vc4/vc4_drv.h >> > @@ -370,6 +370,11 @@ struct vc4_plane_state { >> > * to enable background color fill. >> > */ >> > bool needs_bg_fill; >> > + >> > + /* Mark the state as checked. Useful to avoid checking it twice when >> > + * async update is not possible. >> > + */ >> > + bool checked; >> > };=20=20 >>=20 >> Since this doesn't cover the whole atomic_check process, which won't >> have been called from async update, maybe rename to dlist_initialized or >> something? > > Do you mean that vc4_plane_mode_set() should be run again from the sync > check path when async check failed, or is it just the name you don't > like? Just the name, s/checked/dlist_initialized/ (or something) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlvzj+AACgkQtdYpNtH8 nujxyRAArp+ODMchRvbpnQcPZfFfU0GfRXxrZplkHH5BAnNEFfCvkumm7C5hlAdt eds7MeqS5zmN/V996bgJklVv/kaE7DiYWu0ZR6oXRGAZZVzD4gNYUyj05uTzwTsI l2vs3GB2BFj2rMTThJ3Iq2WetQX+vNSMI7/aJczxqowAzOG+cVkZkYE/2w4UW4mv 9Kjzp3XgedGUmqPgkfUy66RZjBjRiMmIeXz8/juJnEMC3N3vfovnSh5QJKI0d92q JSFZXpWUn3eMkJ/A2LF4Io004trwD0N/5r+2gG2ZtezUKXy95pW3/dehrnP9TfsY bgi5RN2Mvu8Z3ydHT31wlJt3i4d3TTxqB/pzI/bbOsis8c8TPU1pd4d9hVkGEPMm Dd/jeCkSua9LFryle69LerK63Cvdqribq4RKWhjF9+flkbAmcOriRjXjGwtxHD4I MhaBq0iBNKUYYLO1s4CxLSiL1bw5sTcNtCIdNAmt2bqEkyfEt3v8ZyzmzB+tNbFN 9lVaWi8p1nSpRFjLk+N11K4prQOvbGMx7EoH/vkcJXMh74ANWW12r392DOSNaVfS KEmAxQzCovjWVsiACUQuvThrp+C3Nm3zdQwOqEGVx4DsL1MTCE+pLwcKd44NLgI7 d/Qgde3WDtKHAHU+QgIiK+pryoKG0DZfPHXj1HO8Upba+VwRgR8= =Xv3y -----END PGP SIGNATURE----- --=-=-=-- --===============1482677938== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1482677938==--