[linux-yocto] [linux-yocto-dev standard/xlnx-soc][PATCH 2/2] drm: xlnx: zynqmp_dp: initialize delayed work before enable interrupts
quanyang.wang at windriver.com
quanyang.wang at windriver.com
Sun Jul 21 22:22:50 PDT 2019
From: Quanyang Wang <quanyang.wang at windriver.com>
The delay work should be initialize before enables interrupts, because the irq
handler will call this delay work, or else there will be calltrace as below:
WARNING: CPU: 0 PID: 120 at kernel/workqueue.c:1627 __queue_delayed_work+0xd8/0x100
Modules linked in:
CPU: 0 PID: 120 Comm: irq/44-fd4a0000 Not tainted 5.2.0-rc7-yoctodev-standard #75
Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
pstate: 00000085 (nzcv daIf -PAN -UAO)
pc : __queue_delayed_work+0xd8/0x100
lr : queue_delayed_work_on+0xbc/0xc8
sp : ffffff801179bd00
x29: ffffff801179bd00 x28: 0000000000000000
x27: ffffff8010110000 x26: ffffff8011108000
x25: ffffffc87a04fed4 x24: 0000000000000000
x23: ffffffc87a826600 x22: 0000000000000000
x21: 0000000000000100 x20: ffffffc87a826600
x19: ffffffc879373a50 x18: ffffffffffffffff
x17: 0000000000000000 x16: 0000000000000001
x15: ffffff80111085c8 x14: ffffffc878841085
x13: ffffffc878841084 x12: 0000000000000028
x11: 0101010101010101 x10: 0000000000000930
x9 : ffffff801179bd20 x8 : ffffffc878858990
x7 : 00000005a2ffd48c x6 : 0000000000001c19
x5 : 00000005a2ffd48c x4 : 000000486e667000
x3 : 0000000000000000 x2 : ffffff80100cdb08
x1 : 0000000000000000 x0 : ffffffc879373a70
Call trace:
__queue_delayed_work+0xd8/0x100
queue_delayed_work_on+0xbc/0xc8
zynqmp_dp_irq_handler+0x110/0x140
irq_thread_fn+0x30/0x80
irq_thread+0x12c/0x1c8
kthread+0x130/0x138
ret_from_fork+0x10/0x1c
---[ end trace d28f065f559a242d ]---
Signed-off-by: Quanyang Wang <quanyang.wang at windriver.com>
---
drivers/gpu/drm/xlnx/zynqmp_dp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index efad58bee0a4..c3c86dacac97 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -1711,13 +1711,14 @@ int zynqmp_dp_bind(struct device *dev, struct device *master, void *data)
ret ? ret : 8);
zynqmp_dp_update_bpp(dp);
+ INIT_DELAYED_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
+
/* This enables interrupts, so should be called after DRM init */
ret = zynqmp_dp_init_aux(dp);
if (ret) {
dev_err(dp->dev, "failed to initialize DP aux");
goto error_prop;
}
- INIT_DELAYED_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
return 0;
--
2.17.1
More information about the linux-yocto
mailing list