From a62d7f6461acf343445f99ccb084b60bd70974e6 Mon Sep 17 00:00:00 2001 From: zwl Date: Wed, 18 Jun 2014 09:29:14 +0800 Subject: [PATCH] rk fb: modify wait_event to wait_event_timeout for update_regs_wait --- drivers/video/rockchip/rk_fb.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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); } -- 2.34.1