From: Eric Anholt Subject: Re: [PATCH] drm/vc4: Allow fb modifiers early enough to fill IN_FORMATS property Date: Thu, 27 Dec 2018 15:36:20 -0800 Message-ID: <878t0amtjf.fsf@anholt.net> References: <20181224122551.9912-1-paul.kocialkowski@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1152379606==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 73A116E859 for ; Thu, 27 Dec 2018 23:36:24 +0000 (UTC) In-Reply-To: <20181224122551.9912-1-paul.kocialkowski@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: David Airlie , Maxime Ripard , Paul Kocialkowski , Thomas Petazzoni , Eben Upton List-Id: dri-devel@lists.freedesktop.org --===============1152379606== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Paul Kocialkowski writes: > The KMS mode_config elements are currently configured in vc4_kms_load, > that is called after all components are binded (component_bind_all). > However, the CRTC component (for the Pixel Valve) needs to access the > allow_fb_modifiers element at bind time, when initializing its planes > through drm_universal_plane_init. > > This helpers checks allow_fb_modifiers to decide whether to fill the > IN_FORMATS property. Because allow_fb_modifiers is still set to false > at this point, the property is never filled and userspace cannot > retrieve the combination of supported formats and modifiers. > > Fix this by setting allow_fb_modifiers right after calling > drm_mode_config_init (which initializes the structure), before binding > the components of the driver. This makes me wonder if the flag could be removed and replaced with "did non-NULL modifiers get supplied to plane init?" I think I've tripped over this flag in other KMS hacking, too. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlwlYfQACgkQtdYpNtH8 nuiOBw//ectS22fws7UfJU6FIPjXTtTpBBSoCBHV39sR0d4X4/bXl0PGHPeD5PLw GGMpImve5tSYOH4f1WBUaM+KcrVJcFdFo25qIkiLrjBIY520uqemZfb49Zc9b14B Q9jV+vz7Vov8mPi/boaEZRGkFGsetRS757nxTIO/P5ZnmrKBZbiCketNRAJZKRfm 5xFdTKOlgHMtHn6SySyAzqSVO2ITuMdqr6AnKcD+Akj75z8Myz66kaXqy7eWXTUo hzVjMuyqYTQsJsHQYd/Qc2s15w/9rOQPGCyz/vdWT7fd4arV+VBg+RHKgNNYufm1 /RD07yOkby+aTEUYdPfyE6NtoEYDMFG4Nf79JXkRA4QLvMkoX7+3Otuud8Hcx9zH WcQBDFDBDtGvoZG2fMjAP8umAVTmsrHbLvgNZnAOoLWw01WQAEUsAKCObnaSgdkD MaAHgugEC0ugiYxDRGPCQSRxdB9ha6VnQgwcz8KVMG8ahU3ZaWoOaRPc3wEx1rX5 Xc2EujotR7U8DY5RmJ6uWtL/+ESrrZGev8CxYnfs8uEBy+1bSBsXA3y3+uXNdXY+ ZCzXBKgQVxM81MJ8I5u5/GbcBuG3WY5GWxFf4qWcWJn8czUSGR0AOB0UiN7vQJbI tPX65W31eX+FIfet85sntnzjr0L4HOwFJXbd2nOiOyjS0lffOs0= =1fjQ -----END PGP SIGNATURE----- --=-=-=-- --===============1152379606== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1152379606==--