[PATCH] ARM: imx: drop devlinks to reset-controller node

Fabio Estevam festevam at gmail.com
Tue Sep 21 06:19:01 PDT 2021


Hi Philipp,

On Tue, Sep 21, 2021 at 9:51 AM Philipp Zabel <p.zabel at pengutronix.de> wrote:
>
> Starting with commit 6b2117ad65f1 ("of: property: fw_devlink: Add
> support for "resets" and "pwms""), the imx-drm driver fails to load
> due to forever dormant devlinks to the reset-controller node. This
> node is never associated with a struct device.
>
> Drop those links, the reset controller is always available.

This deserves a Fixes tag, so that it can land in 5.15.

Tested on a imx6dl-pico-pi board and after applying your patch the
display controller is probed, thanks:

Tested-by: Fabio Estevam <festevam at gmail.com>

However, I get the following warning:

[    5.059769] ======================================================
[    5.059773] WARNING: possible circular locking dependency detected
[    5.059778] 5.15.0-rc1-00003-g14cb023b6dee-dirty #132 Not tainted
[    5.059785] ------------------------------------------------------
[    5.059789] kworker/u4:2/69 is trying to acquire lock:
[    5.059796] c1752358 (regulator_list_mutex){+.+.}-{3:3}, at:
regulator_lock_dependent+0x40/0x294
[    5.059837]
[    5.059837] but task is already holding lock:
[    5.059841] c176e478 (dma_fence_map){++++}-{0:0}, at:
imx_drm_atomic_commit_tail+0x10/0x160
[    5.059870]
[    5.059870] which lock already depends on the new lock.
[    5.059870]
[    5.059875]
[    5.059875] the existing dependency chain (in reverse order) is:
[    5.059878]
[    5.059878] -> #3 (dma_fence_map){++++}-{0:0}:
[    5.059896]        dma_resv_lockdep+0x1c4/0x2b8
[    5.059909]        do_one_initcall+0x78/0x388
[    5.059921]        kernel_init_freeable+0x198/0x22c
[    5.059932]        kernel_init+0x10/0x128
[    5.059946]        ret_from_fork+0x14/0x38
[    5.059953]        0x0
[    5.059961]
[    5.059961] -> #2 (fs_reclaim){+.+.}-{0:0}:
[    5.059979]        kmem_cache_alloc+0x28/0x384
[    5.059988]        __d_alloc+0x20/0x224
[    5.060001]        d_alloc+0x10/0x60
[    5.060009]        d_alloc_parallel+0x48/0xa60
[    5.060020]        __lookup_slow+0x8c/0x178
[    5.060034]        lookup_one_len+0xa0/0xe8
[    5.060043]        start_creating+0x94/0x14c
[    5.060057]        debugfs_create_dir+0x10/0x114
[    5.060069]        pinctrl_init+0x1c/0xd4
[    5.060078]        do_one_initcall+0x78/0x388
[    5.060087]        kernel_init_freeable+0x198/0x22c
[    5.060095]        kernel_init+0x10/0x128
[    5.060105]        ret_from_fork+0x14/0x38
[    5.060112]        0x0
[    5.060117]
[    5.060117] -> #1 (&sb->s_type->i_mutex_key#2){+.+.}-{3:3}:
[    5.060141]        simple_recursive_removal+0x54/0x35c
[    5.060154]        debugfs_remove+0x30/0x4c
[    5.060165]        _regulator_put.part.0+0x30/0x1d8
[    5.060173]        regulator_put+0x2c/0x3c
[    5.060179]        release_nodes+0x50/0x178
[    5.060189]        devres_release_group+0xc0/0x13c
[    5.060197]        i2c_device_probe+0x12c/0x2bc
[    5.060212]        really_probe+0x14c/0x320
[    5.060223]        __driver_probe_device+0x80/0xe4
[    5.060231]        driver_probe_device+0x30/0xd4
[    5.060240]        __driver_attach_async_helper+0x20/0x38
[    5.060250]        async_run_entry_fn+0x20/0xb4
[    5.060259]        process_one_work+0x298/0x7cc
[    5.060272]        worker_thread+0x30/0x50c
[    5.060280]        kthread+0x154/0x17c
[    5.060290]        ret_from_fork+0x14/0x38
[    5.060297]        0x0
[    5.060301]
[    5.060301] -> #0 (regulator_list_mutex){+.+.}-{3:3}:
[    5.060318]        lock_acquire+0x130/0x400
[    5.060327]        __mutex_lock+0x94/0xa40
[    5.060338]        mutex_lock_nested+0x1c/0x24
[    5.060347]        regulator_lock_dependent+0x40/0x294
[    5.060359]        regulator_enable+0x2c/0xec
[    5.060369]        panel_simple_resume+0x38/0x1f4
[    5.060380]        __rpm_callback+0x3c/0x108
[    5.060391]        rpm_callback+0x68/0x70
[    5.060400]        rpm_resume+0x5ec/0x7dc
[    5.060408]        __pm_runtime_resume+0x64/0x90
[    5.060416]        panel_simple_prepare+0x2c/0x50
[    5.060425]        imx_pd_bridge_enable+0x10/0x1c
[    5.060433]        drm_atomic_bridge_chain_enable+0x80/0xa4
[    5.060444]        drm_atomic_helper_commit_modeset_enables+0x12c/0x26c
[    5.060459]        imx_drm_atomic_commit_tail+0x3c/0x160
[    5.060467]        commit_tail+0x9c/0x190
[    5.060478]        drm_atomic_helper_commit+0x158/0x18c
[    5.060487]        drm_client_modeset_commit_atomic+0x238/0x284
[    5.060500]        drm_client_modeset_commit_locked+0x60/0x1cc
[    5.060508]        drm_client_modeset_commit+0x24/0x40
[    5.060517]        __drm_fb_helper_restore_fbdev_mode_unlocked+0x9c/0xc8
[    5.060531]        drm_fb_helper_set_par+0x38/0x68
[    5.060539]        fbcon_init+0x2bc/0x550
[    5.060552]        visual_init+0xbc/0x104
[    5.060566]        do_bind_con_driver+0x1c8/0x3b0
[    5.060575]        do_take_over_console+0x134/0x1f0
[    5.060585]        do_fbcon_takeover+0x60/0xc0
[    5.060593]        register_framebuffer+0x1c8/0x2e8
[    5.060603]        __drm_fb_helper_initial_config_and_unlock+0x3c8/0x614
[    5.060612]        drm_fbdev_client_hotplug+0xf8/0x194
[    5.060620]        drm_fbdev_generic_setup+0x9c/0x194
[    5.060629]        imx_drm_bind+0xdc/0x120
[    5.060637]        try_to_bring_up_master+0x15c/0x1a8
[    5.060650]        __component_add+0x94/0x140
[    5.060659]        imx_pd_probe+0x130/0x18c
[    5.060669]        platform_probe+0x58/0xb8
[    5.060682]        really_probe+0x14c/0x320
[    5.060690]        __driver_probe_device+0x80/0xe4
[    5.060699]        driver_probe_device+0x30/0xd4
[    5.060708]        __device_attach_driver+0x8c/0xb4
[    5.060717]        bus_for_each_drv+0x80/0xd0
[    5.060727]        __device_attach+0xec/0x160
[    5.060734]        bus_probe_device+0x88/0x90
[    5.060743]        deferred_probe_work_func+0x7c/0xac
[    5.060751]        process_one_work+0x298/0x7cc
[    5.060761]        worker_thread+0x30/0x50c
[    5.060769]        kthread+0x154/0x17c
[    5.060779]        ret_from_fork+0x14/0x38
[    5.060787]        0x0
[    5.060793]
[    5.060793] other info that might help us debug this:
[    5.060793]
[    5.060797] Chain exists of:
[    5.060797]   regulator_list_mutex --> fs_reclaim --> dma_fence_map
[    5.060797]
[    5.060819]  Possible unsafe locking scenario:
[    5.060819]
[    5.060823]        CPU0                    CPU1
[    5.060826]        ----                    ----
[    5.060829]   lock(dma_fence_map);
[    5.060838]                                lock(fs_reclaim);
[    5.060848]                                lock(dma_fence_map);
[    5.060856]   lock(regulator_list_mutex);
[    5.060864]
[    5.060864]  *** DEADLOCK ***
[    5.060864]
[    5.060868] 13 locks held by kworker/u4:2/69:
[    5.060875]  #0: c2006ca8
((wq_completion)events_unbound){+.+.}-{0:0}, at:
process_one_work+0x1ec/0x7cc
[    5.060905]  #1: c22bbf28 (deferred_probe_work){+.+.}-{0:0}, at:
process_one_work+0x1ec/0x7cc
[    5.060932]  #2: c22664d8 (&dev->mutex){....}-{3:3}, at:
__device_attach+0x30/0x160
[    5.060958]  #3: c176a0d0 (component_mutex){+.+.}-{3:3}, at:
__component_add+0x44/0x140
[    5.060988]  #4: c174cb70 (registration_lock){+.+.}-{3:3}, at:
register_framebuffer+0x28/0x2e8
[    5.061015]  #5: c1618504 (console_lock){+.+.}-{0:0}, at:
register_framebuffer+0x248/0x2e8
[    5.061043]  #6: c28fa048 (&fb_info->lock){+.+.}-{3:3}, at:
register_framebuffer+0x1c0/0x2e8
[    5.061070]  #7: c290d56c (&helper->lock){+.+.}-{3:3}, at:
__drm_fb_helper_restore_fbdev_mode_unlocked+0x4c/0xc8
[    5.061102]  #8: c292f0e8 (&dev->master_mutex){+.+.}-{3:3}, at:
drm_master_internal_acquire+0x18/0x3c
[    5.061130]  #9: c290d450 (&client->modeset_mutex){+.+.}-{3:3}, at:
drm_client_modeset_commit_locked+0x20/0x1cc
[    5.061163]  #10: c22bbb18 (crtc_ww_class_acquire){+.+.}-{0:0}, at:
drm_client_modeset_commit_atomic+0x34/0x284
[    5.061189]  #11: c2930094 (crtc_ww_class_mutex){+.+.}-{3:3}, at:
drm_modeset_backoff+0x90/0x228
[    5.061217]  #12: c176e478 (dma_fence_map){++++}-{0:0}, at:
imx_drm_atomic_commit_tail+0x10/0x160
[    5.061242]
[    5.061242] stack backtrace:
[    5.061247] CPU: 0 PID: 69 Comm: kworker/u4:2 Not tainted
5.15.0-rc1-00003-g14cb023b6dee-dirty #132
[    5.061259] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[    5.061267] Workqueue: events_unbound deferred_probe_work_func
[    5.061285] [<c0111938>] (unwind_backtrace) from [<c010be28>]
(show_stack+0x10/0x14)
[    5.061307] [<c010be28>] (show_stack) from [<c0e812a8>]
(dump_stack_lvl+0x58/0x70)
[    5.061328] [<c0e812a8>] (dump_stack_lvl) from [<c0188f14>]
(check_noncircular+0xf4/0x168)
[    5.061345] [<c0188f14>] (check_noncircular) from [<c018cdcc>]
(__lock_acquire+0x169c/0x3210)
[    5.061360] [<c018cdcc>] (__lock_acquire) from [<c018f3ac>]
(lock_acquire+0x130/0x400)
[    5.061373] [<c018f3ac>] (lock_acquire) from [<c0e92ef8>]
(__mutex_lock+0x94/0xa40)
[    5.061389] [<c0e92ef8>] (__mutex_lock) from [<c0e938c0>]
(mutex_lock_nested+0x1c/0x24)
[    5.061403] [<c0e938c0>] (mutex_lock_nested) from [<c06af10c>]
(regulator_lock_dependent+0x40/0x294)
[    5.061425] [<c06af10c>] (regulator_lock_dependent) from
[<c06b2a9c>] (regulator_enable+0x2c/0xec)
[    5.061441] [<c06b2a9c>] (regulator_enable) from [<c07d0b18>]
(panel_simple_resume+0x38/0x1f4)
[    5.061459] [<c07d0b18>] (panel_simple_resume) from [<c0808a2c>]
(__rpm_callback+0x3c/0x108)
[    5.061476] [<c0808a2c>] (__rpm_callback) from [<c0808b60>]
(rpm_callback+0x68/0x70)
[    5.061489] [<c0808b60>] (rpm_callback) from [<c0808684>]
(rpm_resume+0x5ec/0x7dc)
[    5.061503] [<c0808684>] (rpm_resume) from [<c08088d8>]
(__pm_runtime_resume+0x64/0x90)
[    5.061518] [<c08088d8>] (__pm_runtime_resume) from [<c07d09a8>]
(panel_simple_prepare+0x2c/0x50)
[    5.061533] [<c07d09a8>] (panel_simple_prepare) from [<c07cd5ec>]
(imx_pd_bridge_enable+0x10/0x1c)
[    5.061548] [<c07cd5ec>] (imx_pd_bridge_enable) from [<c072765c>]
(drm_atomic_bridge_chain_enable+0x80/0xa4)
[    5.061565] [<c072765c>] (drm_atomic_bridge_chain_enable) from
[<c0705fec>] (drm_atomic_helper_commit_modeset_enables+0x12c/0x26c)
[    5.061585] [<c0705fec>] (drm_atomic_helper_commit_modeset_enables)
from [<c07cadac>] (imx_drm_atomic_commit_tail+0x3c/0x160)
[    5.061604] [<c07cadac>] (imx_drm_atomic_commit_tail) from
[<c0707d7c>] (commit_tail+0x9c/0x190)
[    5.061621] [<c0707d7c>] (commit_tail) from [<c0707fd0>]
(drm_atomic_helper_commit+0x158/0x18c)
[    5.061638] [<c0707fd0>] (drm_atomic_helper_commit) from
[<c073d358>] (drm_client_modeset_commit_atomic+0x238/0x284)
[    5.061660] [<c073d358>] (drm_client_modeset_commit_atomic) from
[<c073d474>] (drm_client_modeset_commit_locked+0x60/0x1cc)
[    5.061678] [<c073d474>] (drm_client_modeset_commit_locked) from
[<c073d604>] (drm_client_modeset_commit+0x24/0x40)
[    5.061695] [<c073d604>] (drm_client_modeset_commit) from
[<c070e40c>] (__drm_fb_helper_restore_fbdev_mode_unlocked+0x9c/0xc8)
[    5.061715] [<c070e40c>]
(__drm_fb_helper_restore_fbdev_mode_unlocked) from [<c070e4a0>]
(drm_fb_helper_set_par+0x38/0x68)
[    5.061730] [<c070e4a0>] (drm_fb_helper_set_par) from [<c0677dd4>]
(fbcon_init+0x2bc/0x550)
[    5.061748] [<c0677dd4>] (fbcon_init) from [<c06d7cf0>]
(visual_init+0xbc/0x104)
[    5.061768] [<c06d7cf0>] (visual_init) from [<c06d911c>]
(do_bind_con_driver+0x1c8/0x3b0)
[    5.061786] [<c06d911c>] (do_bind_con_driver) from [<c06d9660>]
(do_take_over_console+0x134/0x1f0)
[    5.061803] [<c06d9660>] (do_take_over_console) from [<c0675a18>]
(do_fbcon_takeover+0x60/0xc0)
[    5.061820] [<c0675a18>] (do_fbcon_takeover) from [<c066dec4>]
(register_framebuffer+0x1c8/0x2e8)
[    5.061834] [<c066dec4>] (register_framebuffer) from [<c070dda4>]
(__drm_fb_helper_initial_config_and_unlock+0x3c8/0x614)
[    5.061851] [<c070dda4>]
(__drm_fb_helper_initial_config_and_unlock) from [<c070e6dc>]
(drm_fbdev_client_hotplug+0xf8/0x194)
[    5.061869] [<c070e6dc>] (drm_fbdev_client_hotplug) from
[<c070e814>] (drm_fbdev_generic_setup+0x9c/0x194)
[    5.061885] [<c070e814>] (drm_fbdev_generic_setup) from
[<c07cad2c>] (imx_drm_bind+0xdc/0x120)
[    5.061901] [<c07cad2c>] (imx_drm_bind) from [<c07f2f00>]
(try_to_bring_up_master+0x15c/0x1a8)
[    5.061921] [<c07f2f00>] (try_to_bring_up_master) from [<c07f2fe0>]
(__component_add+0x94/0x140)
[    5.061937] [<c07f2fe0>] (__component_add) from [<c07cd744>]
(imx_pd_probe+0x130/0x18c)
[    5.061953] [<c07cd744>] (imx_pd_probe) from [<c07fd01c>]
(platform_probe+0x58/0xb8)
[    5.061971] [<c07fd01c>] (platform_probe) from [<c07fa924>]
(really_probe+0x14c/0x320)
[    5.061988] [<c07fa924>] (really_probe) from [<c07fab78>]
(__driver_probe_device+0x80/0xe4)
[    5.062003] [<c07fab78>] (__driver_probe_device) from [<c07fac0c>]
(driver_probe_device+0x30/0xd4)
[    5.062018] [<c07fac0c>] (driver_probe_device) from [<c07faf28>]
(__device_attach_driver+0x8c/0xb4)
[    5.062034] [<c07faf28>] (__device_attach_driver) from [<c07f8ce8>]
(bus_for_each_drv+0x80/0xd0)
[    5.062049] [<c07f8ce8>] (bus_for_each_drv) from [<c07fa75c>]
(__device_attach+0xec/0x160)
[    5.062063] [<c07fa75c>] (__device_attach) from [<c07f99bc>]
(bus_probe_device+0x88/0x90)
[    5.062078] [<c07f99bc>] (bus_probe_device) from [<c07f9e78>]
(deferred_probe_work_func+0x7c/0xac)
[    5.062093] [<c07f9e78>] (deferred_probe_work_func) from
[<c0147ea0>] (process_one_work+0x298/0x7cc)
[    5.062110] [<c0147ea0>] (process_one_work) from [<c0148404>]
(worker_thread+0x30/0x50c)
[    5.062125] [<c0148404>] (worker_thread) from [<c01512b4>]
(kthread+0x154/0x17c)
[    5.062142] [<c01512b4>] (kthread) from [<c010011c>]
(ret_from_fork+0x14/0x38)
[    5.062156] Exception stack(0xc22bbfb0 to 0xc22bbff8)
[    5.062163] bfa0:                                     ????????
???????? ???????? ????????
[    5.062169] bfc0: ???????? ???????? ???????? ???????? ????????
???????? ???????? ????????
[    5.062174] bfe0: ???????? ???????? ???????? ???????? ???????? ????????
[    5.116118] Console: switching to colour frame buffer device 100x30
[    6.569502] imx-drm display-subsystem: [drm] fb0: imx-drm frame buffer device



More information about the linux-arm-kernel mailing list