From: xuhuicong Date: Sat, 22 Jun 2013 07:41:46 +0000 (+0800) Subject: hdmi: rk616 X-Git-Tag: firefly_0821_release~6965^2~29 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a9e58f89a06b8e5fbe7350d2d8ee1c8a7d38089;p=firefly-linux-kernel-4.4.55.git hdmi: rk616 release work queue and disable irq in rk616_hdmi_shutdown to avid panic when shutdown --- diff --git a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c index f9815f6a4de2..958cf1011329 100755 --- a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c +++ b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c @@ -355,9 +355,19 @@ static void rk616_hdmi_shutdown(struct platform_device *pdev) if(hdmi) { #ifdef CONFIG_HAS_EARLYSUSPEND unregister_early_suspend(&hdmi->early_suspend); -#endif - } - printk(KERN_INFO "rk616 hdmi shut down.\n"); +#endif + flush_delayed_work(&hdmi->delay_work); + mutex_lock(&hdmi->enable_mutex); + hdmi->suspend = 1; + if(!hdmi->enable) { + mutex_unlock(&hdmi->enable_mutex); + return; + } + if (hdmi->irq) + disable_irq(hdmi->irq); + mutex_unlock(&hdmi->enable_mutex); + } + printk(KERN_INFO "rk616 hdmi shut down.\n"); } static struct platform_driver rk616_hdmi_driver = { diff --git a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c index d2725567c83b..0c2c24817f2e 100755 --- a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c +++ b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c @@ -439,7 +439,7 @@ void rk616_hdmi_work(void) if(hdmi->pwr_mode == LOWER_PWR) rk616_hdmi_set_pwr_mode(NORMAL); - queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10)); + queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(40)); }