Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932180AbbKLMRB (ORCPT ); Thu, 12 Nov 2015 07:17:01 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36192 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932144AbbKLMQ7 (ORCPT ); Thu, 12 Nov 2015 07:16:59 -0500 Date: Thu, 12 Nov 2015 13:16:55 +0100 From: Thierry Reding To: Liviu Dudau Cc: Daniel Vetter , David Airlie , Rob Clark , DRI devel , lkml Subject: Re: drm: Bogus WARN() in drm_atomic_helper_update_legacy_modeset_state() ? Message-ID: <20151112121655.GA31019@ulmo> References: <20151110150102.GP963@e106497-lin.cambridge.arm.com> <20151110165615.GB27962@ulmo> <20151111160942.GS963@e106497-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: <20151111160942.GS963@e106497-lin.cambridge.arm.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3466 Lines: 94 --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2015 at 04:09:42PM +0000, Liviu Dudau wrote: > On Tue, Nov 10, 2015 at 05:56:15PM +0100, Thierry Reding wrote: > > On Tue, Nov 10, 2015 at 03:01:03PM +0000, Liviu Dudau wrote: > > > Hello, > > >=20 > > > When booting my Juno board with the HDLCD driver that I have converte= d to > > > atomic operations I'm getting the following warning: > >=20 > > Perhaps you can provide pointers to the source code, that might make it > > easier for people to spot what's going wrong. > >=20 > > Thierry >=20 > Hi Thierry, >=20 > I have just pushed to the mailing lists my patch series. [1] [2] >=20 > If you want to checkout the code I also have a branch here: >=20 > git://git://linux-arm.org/linux-ld testing/hdlcd Okay, so if I understand correctly you're using the tda998x as encoder/ connector attached to your new HDLCD driver. I think the problem isn't so much that nothing has set up the CRTC for the encoder, but rather that the tda998x encoder tries to statically associate the encoder with the connector. While that might be correct in that it represents the hardware state (i.e. there is no way to physically route it anywhere else), the DRM logical state is that it's not connected until a complete pipeline has been set up, in which case a CRTC would have been assigned to the encoder. If your setup were working correctly you'd never reach the WARN_ON because the if (connector->encoder) { conditional (on line 673 in drivers/gpu/drm/drm_atomic_helper.c) would have evaluated to false already, since logically there'd be no encoder associated with the connector yet. Does the patch below help? Let me know and I can produce a proper patch. Thierry --- >8 --- diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998= x_drv.c index 896b6aaf8c4d..8b0a402190eb 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1453,7 +1453,6 @@ static int tda998x_bind(struct device *dev, struct de= vice *master, void *data) if (ret) goto err_sysfs; =20 - priv->connector.encoder =3D &priv->encoder; drm_mode_connector_attach_encoder(&priv->connector, &priv->encoder); =20 return 0; --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWRIM0AAoJEN0jrNd/PrOh2HsP/08i+xk7tuCob+Gx4ABoZE4Y MPK80ypnx4jXqeRwlfC1WK+Xso0skzxwHX/8XJ0SIvXsmYJ/LT5+/jtV2a1iQftO gL6+gRbyZdif49rN9YH1rKuJugxxKsepWSbfn9078np+7hIsjt2XqcsjmjdHjeee JUhJBpig2npme3djhMR0anab4vfN1bJwbsqLa3ITUbIOmK4X6s14eRt75j99l1WZ W78jwuyrhZLEf9XciZSCyc9/3Qh/CzxN2IJNyV8fhNYziP0Bl0WrumAdeKfw6EZF +Pec+L9RkZ06DdbuVDuaYSzT543tMFtmN6fIGd7bcFTiH7Ux++UfwhKOrzknTdZk aklqTijq/W419oAnoR9gX0wUnbAiPzp8mml3nxzE0PKKv7RazNOEfDc2S07q0v/0 pKy7BXRsZXBKDcF4l5GFlmxNjERK/QMk6S8X+cZes/0ZdY0BFbY9W04zVXxdOOIy KPfySuBzH5/WOFTRcNC2syU6hhSwR/j1yRSmeNLuByb+qCZmBiVcxpKjzhCemEqv Mr9Dr384LAX+CS6LZb4PdQI6AsIL8KW2llhWk8pKwA5BgYV8ssega5li4w3Jd1Z9 d1A6KzkwFiJl0CRSigpQARPPOxfKK7LQB7Fp0H6dFB9wCtvN2yoMr5zWdP0ct7BN shyfuEUgqPsaCfJQ6qr8 =xRdD -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/