Re: [PATCH 1/4] drm/msm/hdmi: properly add and remove created bridges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2022 05:51, Stephen Boyd wrote:
Quoting Dmitry Baryshkov (2022-04-05 16:45:48)
Add calls to drm_bridge_add()/drm_bridge_remove() for the internal HDMI
bridges. This fixes the following warning.

[    2.195003] ------------[ cut here ]------------

Usually this line is left out

[    2.195044] WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:579 __mutex_lock+0x840/0x9f4

And the timestamp is removed

Ack for both notes, will fix in v2


[    2.198774] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
[    2.198786] Modules linked in:
[    2.211868] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-00002-g3054695a0d27-dirty #55
[    2.214671] Hardware name: Generic DT based system
[    2.223265]  unwind_backtrace from show_stack+0x10/0x14
[    2.228036]  show_stack from dump_stack_lvl+0x58/0x70
[    2.233159]  dump_stack_lvl from __warn+0xc8/0x1e8
[    2.238367]  __warn from warn_slowpath_fmt+0x78/0xa8
[    2.243054]  warn_slowpath_fmt from __mutex_lock+0x840/0x9f4
[    2.248174]  __mutex_lock from mutex_lock_nested+0x1c/0x24
[    2.253818]  mutex_lock_nested from drm_bridge_hpd_enable+0x2c/0x84
[    2.259116]  drm_bridge_hpd_enable from msm_hdmi_modeset_init+0xc0/0x21c
[    2.265279]  msm_hdmi_modeset_init from mdp4_kms_init+0x53c/0x90c
[    2.272223]  mdp4_kms_init from msm_drm_bind+0x514/0x698
[    2.278212]  msm_drm_bind from try_to_bring_up_aggregate_device+0x160/0x1bc

I'd probably cut it off here.

ack


Is there any Fixes tag for this? Still seems worthwhile to have one even
if this is a lockdep warning.
I thought about this before sending v1, but ended up not doing so. Each of these changes is not atomic. A call to drm_bridge_add() without final drm_bridge_remove() in the core msm code would leave dangling pointers in the drm core. A drm_bridge_remove() is not sensible without converting _all_ users.

So there are two alternatives:
- leave this patch series as is w/o a Fixes tag
- squash four patches into a single patch and add 'Fixes: a3376e3ec81c ("drm/msm: convert to drm_bridge")' tag

What would you prefer?

--
With best wishes
Dmitry



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux