From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: -EPROBE_DEFER and failed DSI panel probe Date: Thu, 16 Nov 2017 12:27:30 -0800 Message-ID: <87fu9eq899.fsf@anholt.net> References: <87k1yr9tkn.fsf@anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1326503236==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D0046E0AE for ; Thu, 16 Nov 2017 20:27:34 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrzej Hajda , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1326503236== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Andrzej Hajda writes: > On 15.11.2017 21:26, Eric Anholt wrote: >> I'm happy to have the DSI panel finally working on VC4 (just waiting on >> https://lists.freedesktop.org/archives/dri-devel/2017-October/156407.html), >> but now I've got another problem to solve. It would be great if I could >> include the DSI panel in our upstream DT, so that it automatically >> worked when you plugged one in. However, right now we return >> -EPROBE_DEFER during bind unless the panel has actually shown up. This >> means that if you don't have the panel actually connected, you get this >> sequence at startup: >> >> [ 10.719929] [drm] Initialized >> [ 10.829510] vc4_hdmi 3f902000.hdmi: vc4-hdmi-hifi <-> 3f902000.hdmi mapping ok >> [ 10.844043] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4]) >> [ 10.848626] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4]) >> [ 10.850214] vc4-drm soc:gpu: failed to bind 3f700000.dsi (ops vc4_dsi_ops [vc4]): -517 >> [ 10.856559] vc4-drm soc:gpu: master bind failed: -517 >> >> [...] >> >> [ 10.967718] rpi_touchscreen 3-0045: Atmel I2C read failed: -6 >> >> Once the panel driver fails to probe, we never get asked to re-bind vc4, >> and drm_of_find_panel_or_bridge looks like it would just give us >> -EPROBE_DEFER again since the panel still wasn't registered. >> >> Does anyone have any suggestions for handling this? > > I guess you should call component_add only when all required resources > are present(including panel), I suppose moving it to vc4_dsi_host_attach > should help. How can I decide when the panel driver has tried to probe and failed, versus not tried to probe yet? find_panel_or_bridge gives me -EPROBE_DEFER either way. > On the other side I am curious why EPROBE_DEFER from bind does not fail > probing of some component (the last one probed), with proper error > propagation it should cause defer_probing of one of the components or > master, and probe/bind should be retried after panel's probe. The panel probe failed, though, so there's no trigger to re-probe other drivers. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAloN9LIACgkQtdYpNtH8 nujPwA/9E/JlwawKjvDUqL0pxElGRLtWz0JxZ3vEQNGWF+z0f8GrVxTURusWdFeh 2h9i9oIp0kxN2QUKqbNasD1KLPGYe90xnZqtpzDIpJDnTuffekw1dX61aAqhxpYU nX4nVRt0gvCWJgX+NlmqOhZ0HOMazs28xcJIoNiDLVoBMM3WhSUN7Ve+bmk5iJCR 1KIDtELIYzVXMbirlAg4UWvED/5s96ICARsvtUtVY1hFC5sujY2yKfRkR7NQRoHp IZ4AdOCYBHTOqn6cMBZM3EcpAkRSmFKblUSxHHEUJHArCq3gxJ/xzdRMmO6K3C9W OzkVKVKYAcBKA3bWgDEasC0olg5z6x8o7Boh9zwBH+K3R+feyZgA9MgZ4xjOHkDM yRmXn9IpD6Y8TA8kxISUo2D9UfIOaNFEOwUuS1MfNqgqn162omD6b5iVbX/G55Ff 58f9oeUuikjG+iTQy71iBlkMtk2f5oFDn8rxt0mYSh1EqP8XS+rtdnGWlPemCyZa yJjJlL2IkLu2yXrb8cMwOXEV67xtJ4D3X6OdTXXCqt2HEQvr/phYhLw9mK39ln1n vuvUjG9bhl/DwEhmp4MtE5af0a0O/ea9Lib3IaYbB3kdG+cHmScnXyMqOKioS786 eQMNm4YcZJBpneXMd6DV/el0GohmLQg0gkpvEKdkarttkx20o94= =Kl0b -----END PGP SIGNATURE----- --=-=-=-- --===============1326503236== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1326503236==--