From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ABBEC4BA0E for ; Thu, 27 Feb 2020 00:28:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCAB624672 for ; Thu, 27 Feb 2020 00:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582763329; bh=BLDNweZa4XLR3Jexr+qfyUpfZnlcYHo2Os3v5UHZzhc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=HMQSInfecech0YrtxSZjqk73lnUJaJ8AHPuI+xjBzgTxWpzGkwapvz4KT9a8NjHLj 6C+N45c8X9J+SnpB5/5DWKGwnZdqJM+Ltmpj/ZrpiLllbw88CJW6ymHgCbwvDPJ4UT DfjJFPOGCcq0P2rnNjMP4R+UphuaWisrmE9JJMgg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbgB0A2s (ORCPT ); Wed, 26 Feb 2020 19:28:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:41522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728012AbgB0A2s (ORCPT ); Wed, 26 Feb 2020 19:28:48 -0500 Received: from earth.universe (unknown [185.62.205.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48C6521D7E; Thu, 27 Feb 2020 00:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582763326; bh=BLDNweZa4XLR3Jexr+qfyUpfZnlcYHo2Os3v5UHZzhc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NrwwengND71qT3HpHcnyYJcbNhL9ZR0PKb5Ud9oKQf51xPRhBson+teHrXNPzmYqM 8uGeGf8aVfSn8jWxfiiWb0VeZqFTHH5XOrpuKaNwVxgt6BUvwVB7QJbQyhuS9rDgG5 JD31xpCQRvSds0m6FZMJhPnbMSrehjSS2iUzN7ok= Received: by earth.universe (Postfix, from userid 1000) id D3F343C0C83; Thu, 27 Feb 2020 01:28:43 +0100 (CET) Date: Thu, 27 Feb 2020 01:28:43 +0100 From: Sebastian Reichel To: Tomi Valkeinen Cc: Laurent Pinchart , Tony Lindgren , Merlijn Wajer , "H. Nikolaus Schaller" , Rob Herring , linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com Subject: Re: [PATCHv2 00/56] drm/omap: Convert DSI code to use drm_mipi_dsi and drm_panel Message-ID: <20200227002843.7ea73mewcr4rmzli@earth.universe> References: <20200224232126.3385250-1-sebastian.reichel@collabora.com> <74217b2c-a6cf-4a85-c18a-62ca892b7a0d@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5pomv55ucfpod6lu" Content-Disposition: inline In-Reply-To: <74217b2c-a6cf-4a85-c18a-62ca892b7a0d@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org --5pomv55ucfpod6lu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Feb 26, 2020 at 02:28:23PM +0200, Tomi Valkeinen wrote: > On 25/02/2020 01:20, Sebastian Reichel wrote: > > This updates the existing omapdrm DSI code, so that it uses > > common drm_mipi_dsi API and drm_panel. > >=20 > > The patchset has been tested with Droid 4 using Linux console, X.org and > > Weston. The patchset is based on Laurent Pinchartl's patch series [0] > > and removes the last custom panel driver, so quite a few cleanups on the > > omapdrm codebase were possible. >=20 > I haven't done any reviews yet, but applied these (and the one > v2.1 patch) on top of Laurent's. I booted up AM5 EVM and loaded > the modules: >=20 > [ 17.261560] WARNING: CPU: 0 PID: 419 at drivers/base/component.c:636 c= omponent_bind_all+0x1f4/0x258 I did not see that warning for some reason. I guess I was always lucky, since its a race condition introduced by "drm/omap: bind components with drm_device argument". That patch moves component_bind_all from dss_bind() to omapdrm's probe() to get access to drm_dev. Currently omapdrm is the only DRM driver not supplying that as parameter and its required to move encoder init into the DSS output drivers. I assumed that it would be ok, since it just postpones the call a little bit. Unfortunately it also moves it out of the lock protection from dss_bind(). The only fix, that I see is to register the drm_dev is dss_bind and then supply it to omapdrm via pdata. But I think we could actually get rid of the omapdrm platform device completly and just use its parent "omapdss_dss". I suppose a follow-up patchset could merge the code into one module and do this merge. Probably it's the best to drop that patch for now. It's not yet used in the patches, that I sent. > [ 17.270811] Modules linked in: omapdrm(+) omapdss omapdss_base panel_o= sd_osd101t2587_53ts panel_simple simple_bridge ti_tpd12s015 display_connec > tor tc358767 tc358768 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orie= ntation_quirks cfbfillrect cfbimgblt cfbcopyarea cec > [ 17.295521] CPU: 0 PID: 419 Comm: insmod Not tainted 5.6.0-rc2-00375-g= 66c4203ed9d4 #2 > [ 17.303387] Hardware name: Generic DRA74X (Flattened Device Tree) > [ 17.309520] [] (unwind_backtrace) from [] (show_st= ack+0x10/0x14) > [ 17.317306] [] (show_stack) from [] (dump_stack+0x= b4/0xd0) > [ 17.324567] [] (dump_stack) from [] (__warn+0xc0/0= xf8) > [ 17.331477] [] (__warn) from [] (warn_slowpath_fmt= +0x58/0xb8) > [ 17.338998] [] (warn_slowpath_fmt) from [] (compon= ent_bind_all+0x1f4/0x258) > [ 17.347768] [] (component_bind_all) from [] (pdev_= probe+0xe0/0x7a0 [omapdrm]) > [ 17.356709] [] (pdev_probe [omapdrm]) from [] (pla= tform_drv_probe+0x48/0x98) > [ 17.365537] [] (platform_drv_probe) from [] (reall= y_probe+0x200/0x478) > [ 17.373841] [] (really_probe) from [] (driver_prob= e_device+0x6c/0x1b4) > [ 17.382145] [] (driver_probe_device) from [] (devi= ce_driver_attach+0x58/0x60) > [ 17.391060] [] (device_driver_attach) from [] (__d= river_attach+0xa4/0x148) > [ 17.399713] [] (__driver_attach) from [] (bus_for_= each_dev+0x70/0xb4) > [ 17.407930] [] (bus_for_each_dev) from [] (bus_add= _driver+0x100/0x204) > [ 17.416233] [] (bus_add_driver) from [] (driver_re= gister+0x74/0x108) > [ 17.424361] [] (driver_register) from [] (__platfo= rm_register_drivers+0x58/0x150) > [ 17.433628] [] (__platform_register_drivers) from [] (do_one_initcall+0x48/0x2a0) > [ 17.442893] [] (do_one_initcall) from [] (do_init_= module+0x5c/0x234) > [ 17.451022] [] (do_init_module) from [] (load_modu= le+0x250c/0x28a4) > [ 17.459064] [] (load_module) from [] (sys_finit_mo= dule+0xcc/0x110) > [ 17.467020] [] (sys_finit_module) from [] (ret_fas= t_syscall+0x0/0x54) > [ 17.475233] Exception stack(0xea84bfa8 to 0xea84bff0) > [ 17.480307] bfa0: 00000002 00000000 00000003 0002a89= 4 00000000 bebd2d74 > [ 17.488524] bfc0: 00000002 00000000 00028424 0000017b 0003eeb0 0000000= 2 b6ffe000 00000000 > [ 17.496738] bfe0: bebd2bb8 bebd2ba8 00020d7c b6edb0b0 > [ 17.502365] ---[ end trace c20802296d6b2775 ]--- > [ 17.508567] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dsi_fr= amedone_timeout_work_callback [omapdss]) > [ 17.520358] omapdss_dss 58000000.dss: bound 58040000.encoder (ops dsi_= framedone_timeout_work_callback [omapdss]) > [ 17.559728] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). > [ 17.574544] [drm] Enabling DMM ywrap scrolling > [ 17.580606] omapdrm omapdrm.0: fb0: omapdrmdrmfb frame buffer device > [ 17.625099] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on = minor 0 >=20 > Similar warning on module unload. The display works, though. same problem, with dss_unbind() and omapdrm's remove function. -- Sebastian --5pomv55ucfpod6lu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl5XDTgACgkQ2O7X88g7 +prWhw//UTrXUWRGqZYDv4bEnQhzIELiZLR/WbqECIvAP/RXpvAPACy9eiMe54Tk /RI+7XkPLlKKUGSI+EoYQd/FUUIICz4lXhYxqxoIEjNLavFsB3YIUnWa5M2seju8 d4Ol9Q/dWe2UU954j6DaWW+Dn95RF0UJpTg3onH/Do/e7cEQwN0Wu3p0ZFQ/Dakb euIKgOUq8t5tYFdSFe7zVFrAE91a8zTYfGPx1OU6gOuvs3o4e8h+TsePz2xN7W9M mBZh7ag6aayvbAQvPznani0s+gy7S/f5TE7vbsp47Hnh4RWrelZObOLJWq53WmeI Yp2j/fPbLwEPWDW6N3f+LGrtcuTt5SlCBor/BVi8mewf8GExO+71eV0o16UztCp9 FBXcl3UkxoLi8FmAbbdGmEZbCxKwEXEhzODXwbqJAki3kQWjNwRrFOn+okEvkMoi 14pSm8Z5VCLFjO4v7qeyVw/VZh2fCRj2df0kLNaELtDe8YZXu721/oBNUFWQMBKh ECF9TAvfe4fDQoLTDixStL0SZg97vhrUEG5wbTPJ45wgpd6tSo2Yqlf0BIEHWg39 sgADYnjMZrj5HrPOl5AHHUjyYGZEyJAT6abp1D0xAAiINdoaOP1a03NIvFY/5EOT W+CnFPZ88Xod0TH0AKhp3Yawo+2andluHE4AsqTmIgjeNIs02CI= =NLga -----END PGP SIGNATURE----- --5pomv55ucfpod6lu--