From: zwl Date: Wed, 18 Jun 2014 01:29:14 +0000 (+0800) Subject: rk fb: modify wait_event to wait_event_timeout for update_regs_wait X-Git-Tag: firefly_0821_release~5073 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a62d7f6461acf343445f99ccb084b60bd70974e6;p=firefly-linux-kernel-4.4.55.git rk fb: modify wait_event to wait_event_timeout for update_regs_wait --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 739cc66976ab..ece4d7c6111c 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -1973,11 +1973,17 @@ static int rk_fb_set_win_config(struct fb_info *info, list_is_empty = list_empty(&dev_drv->update_regs_list) && list_empty(&saved_list); mutex_unlock(&dev_drv->update_regs_list_lock); - if (!list_is_empty) - wait_event(dev_drv->update_regs_wait, - list_empty(&dev_drv->update_regs_list) && list_empty(&saved_list)); - - rk_fb_update_reg(dev_drv, regs); + if (!list_is_empty) { + ret = wait_event_timeout(dev_drv->update_regs_wait, + list_empty(&dev_drv->update_regs_list) && list_empty(&saved_list), + msecs_to_jiffies(60)); + if (ret > 0) + rk_fb_update_reg(dev_drv, regs); + else + printk("%s: wait update_regs_wait timeout\n", __func__); + } else if (ret == 0) { + rk_fb_update_reg(dev_drv, regs); + } kfree(regs); }