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: Thu, 15 Nov 2018 12:41:36 -0800 Message-ID: <8736s22hvj.fsf@anholt.net> References: <20181115103721.25601-1-boris.brezillon@bootlin.com> <20181115103721.25601-4-boris.brezillon@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1544197950==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A4FE6E11C for ; Thu, 15 Nov 2018 20:41:38 +0000 (UTC) In-Reply-To: <20181115103721.25601-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" Cc: Boris Brezillon , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1544197950== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Boris Brezillon writes: > 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 check > 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_drv.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; > }; 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? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlvt2gAACgkQtdYpNtH8 nujs5xAAuYxWcHwIWJMZUDgYSENvXZP5R/GOJ05+Yd2Zqk8XF/xshPvh2Mf3K08R XPOFDMwBmkp0BrQC+dELsvlZCgQes3ofOW++ApaPBjNu4AB7Gk7qis1q8tW0t2Vv 9j6R4kzyobl2oLcqMc2wQaHkTjA4W9yaWXcWpJhMPHhZtMKOlJaog3TuseFUtSJV wEL6059WsjXUv3ubFSqR+KMBbyejdSHw9gGDFXmRbpErV+IcRbPX0gBPngnjLOko iY9xDRLHkohJ843YGsuWVWP/o/v2M4jnUfVzolmEnF5NlnTBPJnODFsa1fKNQEuf 8isRWco375H2LAasYJJJIBes61FEr4eemtO+X7G8+uuiIJQ6sBSL+okIsEp/hCr7 GngUUYAM+d2YQQ1w/VW5F3IrekP+HfX5wXYDVeY/ySBJAudHrs1WS9zWhx4bI3Dx /iC7hrz1l9WHHJ7qgpqs1iOulRGPtqypBiGWvEwYbDIel0vyII5A2dHSC1fwErAB sQ/NahVUlRhO1tH/IAOwNDfMDGE2f6fr4S7Le5NdtUXz3naqeLCttkMReuGHYd0f y/Yb2PO0VLTNxPrM0lfNTdSnjIPDjm1eGmjohlL+PX7MI3yNC3jzME5A3371KrLW dnJi9ORSB7sUnWrPZUo3csKZvCH/Peqhsl88e+mN6a10hLY0epI= =p1ag -----END PGP SIGNATURE----- --=-=-=-- --===============1544197950== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1544197950==--