Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511AbbKLM0i (ORCPT ); Thu, 12 Nov 2015 07:26:38 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36852 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754332AbbKLM0h (ORCPT ); Thu, 12 Nov 2015 07:26:37 -0500 Date: Thu, 12 Nov 2015 13:26:34 +0100 From: Thierry Reding To: Mark yao Cc: Liviu Dudau , DRI devel , lkml Subject: Re: drm: Bogus WARN() in drm_atomic_helper_update_legacy_modeset_state() ? Message-ID: <20151112122634.GB31019@ulmo> References: <20151110150102.GP963@e106497-lin.cambridge.arm.com> <20151110165615.GB27962@ulmo> <56443151.3020508@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kXdP64Ggrk/fb43R" Content-Disposition: inline In-Reply-To: <56443151.3020508@rock-chips.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: 5232 Lines: 131 --kXdP64Ggrk/fb43R Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 12, 2015 at 02:27:29PM +0800, Mark yao wrote: > On 2015=E5=B9=B411=E6=9C=8811=E6=97=A5 00:56, Thierry Reding wrote: > >On Tue, Nov 10, 2015 at 03:01:03PM +0000, Liviu Dudau wrote: > >>Hello, > >> > >>When booting my Juno board with the HDLCD driver that I have converted = to > >>atomic operations I'm getting the following warning: > >Perhaps you can provide pointers to the source code, that might make it > >easier for people to spot what's going wrong. > > > >Thierry > > > > > >_______________________________________________ > >dri-devel mailing list > >dri-devel@lists.freedesktop.org > >http://lists.freedesktop.org/mailman/listinfo/dri-devel > Hi Thierry > I encountered the same problem as Liviu. > I'm coverting rockchip drm to atomic api, when booting with hdmi > connected, get under warning: >=20 > [ 1.300156] WARNING: CPU: 0 PID: 26 at > drivers/gpu/drm/drm_atomic_helper.c:674 > drm_atomic_helper_update_legacy_modeset_state+0x3c/0x1f8() > [ 1.300161] Modules linked in: > [ 1.300171] CPU: 0 PID: 26 Comm: kworker/0:1 Not tainted 4.3.0-rc5+ #1= 60 > [ 1.300174] Hardware name: Rockchip (Device Tree) > [ 1.300189] Workqueue: events output_poll_execute > [ 1.300224] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 1.300241] [] (show_stack) from [] > (dump_stack+0x6c/0x88) > [ 1.300255] [] (dump_stack) from [] > (warn_slowpath_common+0x80/0xa8) > [ 1.300265] [] (warn_slowpath_common) from [] > (warn_slowpath_null+0x18/0x1c) > [ 1.300277] [] (warn_slowpath_null) from [] > (drm_atomic_helper_update_legacy_modeset_state+0x3c/0x1f8) > [ 1.300293] [] (drm_atomic_helper_update_legacy_modeset_stat= e) > from [] (drm_atomic_helper_commit_modeset_disables+0x208/0x364) > [ 1.300305] [] (drm_atomic_helper_commit_modeset_disables) f= rom > [] (drm_atomic_helper_commit+0xf8/0x140) > [ 1.300320] [] (drm_atomic_helper_commit) from [] > (drm_atomic_commit+0x50/0x60) > [ 1.300333] [] (drm_atomic_commit) from [] > (restore_fbdev_mode+0xf4/0x278) > [ 1.300345] [] (restore_fbdev_mode) from [] > (drm_fb_helper_restore_fbdev_mode_unlocked+0x30/0x68) > [ 1.300357] [] (drm_fb_helper_restore_fbdev_mode_unlocked) f= rom > [] (drm_fb_helper_set_par+0x3c/0x54) > [ 1.300368] [] (drm_fb_helper_set_par) from [] > (drm_fb_helper_hotplug_event+0xe4/0xfc) > [ 1.300382] [] (drm_fb_helper_hotplug_event) from [] > (drm_kms_helper_hotplug_event+0x24/0x28) > [ 1.300396] [] (drm_kms_helper_hotplug_event) from [] > (output_poll_execute+0x134/0x18c) > [ 1.300413] [] (output_poll_execute) from [] > (process_one_work+0x1e0/0x318) > [ 1.300426] [] (process_one_work) from [] > (worker_thread+0x378/0x4c4) > [ 1.300438] [] (worker_thread) from [] > (kthread+0xdc/0xf0) > [ 1.300450] [] (kthread) from [] > (ret_from_fork+0x14/0x3c) >=20 > I can't found who can set encoder->crtc value before atomic_commit, what's > going wrong? The explanation here is probably the same as the one I gave to Liviu. Does the below help? Thierry --- >8 --- diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_h= dmi.c index 56de9f1c95fc..ffef392ccc13 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1648,8 +1648,6 @@ static int dw_hdmi_register(struct drm_device *drm, s= truct dw_hdmi *hdmi) drm_connector_init(drm, &hdmi->connector, &dw_hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA); =20 - hdmi->connector.encoder =3D encoder; - drm_mode_connector_attach_encoder(&hdmi->connector, encoder); =20 return 0; --kXdP64Ggrk/fb43R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWRIV6AAoJEN0jrNd/PrOh26kP/3uf7QYl+ukCGVtov9Tqj3BJ TsYRb82CTCEoe2FyDUUMRUHdIBeo7C0O8KOpEC7+XZlxpIvJz7hR5UHVu291i7HT ztXsau79scVG/BxQD1JM8vNuu+HO+vt3FHS52L8cXZ2vLZoz29Cq6whsZDiqDF7+ Ag5IhMEN3hVhHzwbGWOl05W0aTIUkEMvUmWvQPmtc6AWIpNtvuDsX5cia9wQGqws XpmUfqH+iutkHdHnz+Arn0asGup3J9nYwm9ztiuJ9fLixmQ9Sp4iqpN+0JyLTlfT yyIMFDPV1mwVUr3ReQ4gdiQXM6TQoDwcR8HJPmgbovfiIwQvF0W0/jQlg0dU28Sp ZHHoz8Sm36DGtpImr/2+Axhlq/cuPnsHH5wOPhM2ZN8rvqOhl1u3+lu9NkAYzeV5 droWia2K5pvp7Y2130nZW3cy68WWdyf/Ag+R2f3ubyI5XIIh/bmXh1A3UJyXgcdY CJu96Xwq0YrofaTeuPYpkb2vSgscr2e8sNz57HE0cJmMpwhsmDNX9fj8PDsj/6l8 3Nc6ZPOE4SEr8fBK2xgeCUpBT5JfKxjnLpYwiJlO3F1hz1MBZ91/yjxmEqQe+tY+ hSRfLKTOjrGDaJkzg0JPBvWhOy6DIy9NbkWkEFCo7lm3IsiIevrteZsfvtzH+0WL X/E3xmRKjEUnvhKqGL7O =zXrg -----END PGP SIGNATURE----- --kXdP64Ggrk/fb43R-- -- 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/