[Freedreno] drm : adv7511 module unload crash

Vinay Simha B N simhavcs at gmail.com
Fri Mar 1 05:55:23 UTC 2019


rob,

i had tied up temperature sensor and dsi2hdmi with thermal sensors,
hdmi hpd to polling mode
https://github.com/vinaysimha/kernel-msm/commit/8d010a82ab5c2e3bd1f536c8bf5ea0bfe55eee55

But when dsibridge disables it does not disable the reguators of adv
chip, regulator use_count will go from 2 to 1, still these regulators
held by the i2c, since adv accessed through i2c, _detect will stop if
regulator manually disables from 1 to 0.

In the interrupt context of temperature sensor will load the adv7511
module and i want to unload the module when temperature goes out of
range. in this case regulators will not be enabled to the adv. but in
this kernel crash and need to debug.

Does both polling and interrupt method can be optimized?

On Thu, Feb 28, 2019 at 5:30 PM Rob Clark <robdclark at gmail.com> wrote:
>
> Looks like a spot where we don't drain a workqueue on unload.  In
> general, I'd say unload is not well tested and there is a lot that can
> go wrong.  It's also not something that really happens in the real
> world.  Patches welcome, but I don't think it is the highest priority.
>
> BR,
> -R
>
> On Wed, Feb 27, 2019 at 6:45 AM Vinay Simha B N <simhavcs at gmail.com> wrote:
> >
> > hi,
> >
> > manually trying to load and unload the adv7511 module,
> > modprobe adv7511 - works
> > rmmod adv7511 - crashes.
> >
> > any suggestion why module unload crashing? is it not possible to
> > load/unload module for drm framework?
> >
> >    77.326091] Workqueue: dsi_drm_work dsi_hpd_worker [msm]
> > [   77.362360] task: ffff800009fcb800 task.stack: ffff000008050000
> > [   77.367665] PC is at 0xffff0000010b258c
> > [   77.373264] LR is at 0xffff0000010b258c
> > [   77.377083] pc : [<ffff0000010b258c>] lr : [<ffff0000010b258c>]
> > pstate: 60000145
> > [   77.385625] sp : ffff000008053c80
> > [   77.393149] x29: ffff000008053c80 x28: 0000000000000000
> > [   77.397809] x27: ffff80000eb08078 x26: ffff0000090e09e0
> > [   77.402384] x25: 0000000000000001 x24: ffff000000c8d3f8
> > [   77.407293] x23: ffff000000c8d428 x22: ffff80003c1612b8
> > [   77.412520] x21: ffff80003c1622b8 x20: ffff80003c162018
> > [   77.417732] x19: 0000000000000001 x18: 0000000000000010
> > [   77.422968] x17: 0000000000000000 x16: 0000000000000000
> > [   77.428169] x15: 0000000000000006 x14: ffff00008925694f
> > [   77.433383] x13: ffff00000925695d x12: ffff000008b7c098
> > [   77.438607] x11: 0000000000000040 x10: ffff80003d400270
> > [   77.443860] x9 : ffff80003d4002e8 x8 : 0000000000000000
> > [   77.449087] x7 : 000000000000003f x6 : 0000000000000001
> > [   77.454303] x5 : 0000000000000000 x4 : 0000000034ceb000
> > [   77.459556] x3 : 0000000000000000 x2 : ffff80003d320800
> > [   77.464804] x1 : 0000000000000000 x0 : 00000000ffffff92
> > [   77.470050] Process kworker/u8:0 (pid: 5, stack limit = 0xffff000008050000)
> > [   77.475463] Call trace:
> > [   77.482153] Exception stack(0xffff000008053b40 to 0xffff000008053c80)
> > [   77.486146] 3b40: 00000000ffffff92 0000000000000000
> > ffff80003d320800 0000000000000000
> > [   77.491644] 3b60: 0000000034ceb000 0000000000000000
> > 0000000000000001 000000000000003f
> > [   77.499488] 3b80: 0000000000000000 ffff80003d4002e8
> > ffff80003d400270 0000000000000040
> > [   77.507349] 3ba0: ffff000008b7c098 ffff00000925695d
> > ffff00008925694f 0000000000000006
> > [   77.515217] 3bc0: 0000000000000000 0000000000000000
> > 0000000000000010 0000000000000001
> > [   77.523007] 3be0: ffff80003c162018 ffff80003c1622b8
> > ffff80003c1612b8 ffff000000c8d428
> > [   77.530814] 3c00: ffff000000c8d3f8 0000000000000001
> > ffff0000090e09e0 ffff80000eb08078
> > [   77.538620] 3c20: 0000000000000000 ffff000008053c80
> > ffff0000010b258c ffff000008053c80
> > [   77.546385] 3c40: ffff0000010b258c 0000000060000145
> > ffff000008053c80 ffff0000010b258c
> > [   77.554143] 3c60: ffffffffffffffff ffff80003c162018
> > ffff000008053c80 ffff0000010b258c
> > [   77.561933] [<ffff0000010b258c>] 0xffff0000010b258c
> > [   77.569782] [<ffff000000c79c5c>]
> > drm_helper_probe_detect_ctx+0x84/0xd0 [drm_kms_helper]
> > [   77.574585] [<ffff000000c7a8f0>]
> > drm_helper_hpd_irq_event+0x98/0x140 [drm_kms_helper]
> > [   77.582643] [<ffff000000d5d88c>] dsi_hpd_worker+0x14/0x20 [msm]
> > [   77.590395] [<ffff0000080e873c>] process_one_work+0x1cc/0x328
> > [   77.596035] [<ffff0000080e88e8>] worker_thread+0x50/0x450
> > [   77.601796] [<ffff0000080eea5c>] kthread+0xfc/0x128
> > [   77.607038] [<ffff000008084ec8>] ret_from_fork+0x10/0x18
> > [   77.611590] Code: bad PC value
> > [   77.616996] ---[ end trace a867a6e04ca3e227 ]---
> >
> > --
> > regards,
> > vinaysimha
> > _______________________________________________
> > Freedreno mailing list
> > Freedreno at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/freedreno



-- 
regards,
vinaysimha


More information about the Freedreno mailing list