rk fb:add config done in rk_fb_switch_screen

This commit is contained in:
yxj
2013-02-22 15:15:06 +08:00
parent 03c2032989
commit f7681daed3
2 changed files with 15 additions and 13 deletions

View File

@@ -891,20 +891,22 @@ static int rk3188_lcdc_ioctl(struct rk_lcdc_device_driver *dev_drv, unsigned int
return -EFAULT;
break;
case RK_FBIOSET_CONFIG_DONE:
if (copy_from_user(&(dev_drv->wait_fs),argp,sizeof(dev_drv->wait_fs)))
return -EFAULT;
rk3188_lcdc_alpha_cfg(lcdc_dev);
lcdc_cfg_done(lcdc_dev);
if(dev_drv->wait_fs)
{
spin_lock_irqsave(&dev_drv->cpl_lock,flags);
init_completion(&dev_drv->frame_done);
spin_unlock_irqrestore(&dev_drv->cpl_lock,flags);
timeout = wait_for_completion_timeout(&dev_drv->frame_done,msecs_to_jiffies(dev_drv->cur_screen->ft+5));
if(!timeout&&(!dev_drv->frame_done.done))
if (!copy_from_user(&(dev_drv->wait_fs),argp,sizeof(dev_drv->wait_fs)))
{
if(dev_drv->wait_fs)
{
printk(KERN_ERR "wait for new frame start time out!\n");
return -ETIMEDOUT;
spin_lock_irqsave(&dev_drv->cpl_lock,flags);
init_completion(&dev_drv->frame_done);
spin_unlock_irqrestore(&dev_drv->cpl_lock,flags);
timeout = wait_for_completion_timeout(&dev_drv->frame_done,msecs_to_jiffies(dev_drv->cur_screen->ft+5));
if(!timeout&&(!dev_drv->frame_done.done))
{
printk(KERN_ERR "wait for new frame start time out!\n");
return -ETIMEDOUT;
}
}
}
break;

View File

@@ -745,7 +745,7 @@ int rk_fb_switch_screen(rk_screen *screen ,int enable ,int lcdc_id)
}
#endif
printk("hdmi connect to lcdc%d\n",dev_drv->id);
printk("hdmi %s lcdc%d\n",enable?"connect to":"remove from",dev_drv->id);
if(inf->num_lcdc == 1)
{
@@ -858,7 +858,7 @@ int rk_fb_switch_screen(rk_screen *screen ,int enable ,int lcdc_id)
#elif defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)
info->fbops->fb_pan_display(hdmi_var,info);
#endif
info->fbops->fb_ioctl(info,RK_FBIOSET_CONFIG_DONE,NULL);
#if defined(CONFIG_NO_DUAL_DISP) //close backlight for device whic do not support dual display
if(!enable)
rk29_backlight_set(1);