media: fix crash in viu_set_dcu
authorrongrong zhou <rongrong.zhou@amlogic.com>
Fri, 13 Apr 2018 06:46:33 +0000 (14:46 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 26 Apr 2018 10:49:39 +0000 (03:49 -0700)
commit2f22a9bc7428c6b7814b82c6810e8c1ad425b5b9
treea9cc8ed6c1b60214a96f2da4ca48dfa05aecd36b
parent5ef94388220930fa68ce22782de09b12b30053fd
media: fix crash in viu_set_dcu

PD#164288: 1. add check in viu_set_dcu.
2. do not clear cur_dispbuf in irq & unreg

Unable to handle kernel NULL pointer dereference at virtual address
 0000000c
task: ffffff800a688900 task.stack: ffffff800a670000
PC is at vsync_isr+0x2c20/0x51e0
LR is at vsync_isr+0x2c04/0x51e0
[<ffffff80098398cc>] vsync_isr+0x2c20/0x51e0
[<ffffff80091072bc>] __handle_irq_event_percpu+0x68/0x23c
[<ffffff80091074d0>] handle_irq_event_percpu+0x40/0x94
[<ffffff8009107570>] handle_irq_event+0x4c/0x7c
[<ffffff800910b66c>] handle_fasteoi_irq+0xd4/0x1a4
[<ffffff8009106268>] generic_handle_irq+0x34/0x4c
[<ffffff8009106974>] __handle_domain_irq+0x90/0xf8
[<ffffff80090815f4>] gic_handle_irq+0x5c/0xa8

Change-Id: I871bf078c25cbb92889d592ee7cb88cea62f089c
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
drivers/amlogic/media/video_sink/video.c