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. > > > > 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. > > 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: > > [ 17.261560] WARNING: CPU: 0 PID: 419 at drivers/base/component.c:636 component_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_osd_osd101t2587_53ts panel_simple simple_bridge ti_tpd12s015 display_connec > tor tc358767 tc358768 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea cec > [ 17.295521] CPU: 0 PID: 419 Comm: insmod Not tainted 5.6.0-rc2-00375-g66c4203ed9d4 #2 > [ 17.303387] Hardware name: Generic DRA74X (Flattened Device Tree) > [ 17.309520] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 17.317306] [] (show_stack) from [] (dump_stack+0xb4/0xd0) > [ 17.324567] [] (dump_stack) from [] (__warn+0xc0/0xf8) > [ 17.331477] [] (__warn) from [] (warn_slowpath_fmt+0x58/0xb8) > [ 17.338998] [] (warn_slowpath_fmt) from [] (component_bind_all+0x1f4/0x258) > [ 17.347768] [] (component_bind_all) from [] (pdev_probe+0xe0/0x7a0 [omapdrm]) > [ 17.356709] [] (pdev_probe [omapdrm]) from [] (platform_drv_probe+0x48/0x98) > [ 17.365537] [] (platform_drv_probe) from [] (really_probe+0x200/0x478) > [ 17.373841] [] (really_probe) from [] (driver_probe_device+0x6c/0x1b4) > [ 17.382145] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) > [ 17.391060] [] (device_driver_attach) from [] (__driver_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_register+0x74/0x108) > [ 17.424361] [] (driver_register) from [] (__platform_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_module+0x250c/0x28a4) > [ 17.459064] [] (load_module) from [] (sys_finit_module+0xcc/0x110) > [ 17.467020] [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x54) > [ 17.475233] Exception stack(0xea84bfa8 to 0xea84bff0) > [ 17.480307] bfa0: 00000002 00000000 00000003 0002a894 00000000 bebd2d74 > [ 17.488524] bfc0: 00000002 00000000 00028424 0000017b 0003eeb0 00000002 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_framedone_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 > > Similar warning on module unload. The display works, though. same problem, with dss_unbind() and omapdrm's remove function. -- Sebastian