LF-509: video: fbdev: sii902x: Fix imx7d hdmi display not work

sii902x hdmi cable detect thread is trigged by
event FB_EVENT_FB_REGISTERED in register_framebuffer function
when device bootup.

when CONFIG_FB_MXC_OVERLAY is enabled, pixel clock has
chance to be disabled by overlay fb.
In this case cable detect thread will fail to get cable state
and sii902x hdmi will not initialized.

Fix it with immediate execute the cable detect thread and
add 20ms delay to wait cable detect thread get the cable state.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
This commit is contained in:
Sandor Yu 2019-12-18 18:35:54 +08:00
parent 4b7126efd1
commit 5d677f4ef6
1 changed files with 4 additions and 3 deletions

View File

@ -338,9 +338,10 @@ static int sii902x_fb_event(struct notifier_block *nb, unsigned long val, void *
switch (val) {
case FB_EVENT_FB_REGISTERED:
/* Manually trigger a plugin/plugout interrupter to check cable state */
schedule_delayed_work(&(sii902x.det_work), msecs_to_jiffies(50));
/* Manually trigger a plugin/plugout interrupter */
schedule_delayed_work(&(sii902x.det_work), 0);
/* Dealy 20ms to wait cable states detected */
msleep(20);
fb_show_logo(fbi, 0);
break;