From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 4/4] drm/vc4: Validate framebuffer pixel format/modifier Date: Fri, 09 Mar 2018 12:54:43 -0800 Message-ID: <87woylgeb0.fsf@anholt.net> References: <20180309151450.20365-1-ville.syrjala@linux.intel.com> <20180309151450.20365-4-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0320940810==" Return-path: In-Reply-To: <20180309151450.20365-4-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville Syrjala , dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0320940810== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ville Syrjala writes: > From: Ville Syrj=C3=A4l=C3=A4 > > Only create framebuffers with supported format/modifier combinations by > checking that at least one plane supports the requested combination. > > Using drm_any_plane_has_format() is somewhat suboptimal for vc4 since > the planes have (mostly) uniform capabilities. But I was lazy and > didn't feel like exporting drm_plane_format_check() and hand rolling > anything better. Also I really just wanted to come up with another > user for drm_any_plane_has_format() ;) I'm not excited about vc4 having error-return behavior that other drivers don't have. Actually, I don't really see why we should be doing this check in fb create at all, given that you have to do so again at atomic_check time with the specific plane. Could you just delete the i915 fb format check code? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlqi9JMACgkQtdYpNtH8 nuiuhQ//cPk72XJHO06wGPNIuc8J/QIAtBqf1wlhcbq/y0Rveu40tyUiqM/cZY9E FJdvd4kbdNCxx9iRRm7DATsbqOKq5+PVm8/1W1WFDGs9UttfnOVO1/T7so+frwYS 5nCbz9UrYzTaj8KCdbUcWmkYqas1hg9+Vf4on9ObfZ4WBlEOyWOc/QjepgnFPl0y 7Yc23f0g+dzPr4nYEc1PSfWpCJkUfL/DJntHrZfEv02aT3z3xoInfo9EvqrEDQiT zhVy110gieShDDnWMs7bB0W3zhKpkfYoGisaVX5/p7RRtNRundGicKBw/NkVyGDD YdpYHJ/6/Y6SKINMYrrvJxMm7fWwb2ADmCcinYxT+YUUh7Y2G9GDZDThIDhSBbZO UcOJ7q0LQHf7dLjhyYrjTt5ZFR3MqUbvmWaSaelyM3wQ0jRaBPizgCECMLdiyoYo 2430JfTXGJTHV++R76ZnJlFf/yAtILEYm07pe6jWZ1ewi9kBAE54Y+04+L18vFJi xEMitnS68pKrGI4NUwpniehV0/IGi4sg+k6MAK57Oj7YtS5YArEGwMJMOSuLUWwU OPjd6oFLEPxS2qVt/lDf0G8mOrlEiNg1KsfwIOGGH+wP4XyJpcf4kF5PjRrzznZM l5smGILT+M3FD+cH8ZDGKzD1BNgs+gsHKLDfjBpoJOeiWs5ZB5o= =PFlh -----END PGP SIGNATURE----- --=-=-=-- --===============0320940810== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0320940810==--