rk312x lcdc: fix fb_par->state error.

This commit is contained in:
hjc
2014-11-25 11:44:25 +08:00
parent eb28b49bcc
commit 8fb2012aaa
2 changed files with 7 additions and 3 deletions

View File

@@ -531,9 +531,9 @@ static void lcdc_layer_enable(struct lcdc_device *lcdc_dev, unsigned int win_id,
"wakeup from standby!\n");
lcdc_dev->standby = 0;
}
lcdc_dev->atv_layer_cnt++;
} else if ((lcdc_dev->atv_layer_cnt > 0) && (!open)) {
lcdc_dev->atv_layer_cnt--;
lcdc_dev->atv_layer_cnt |= (1 << win_id);
} else if ((lcdc_dev->atv_layer_cnt & (1 << win_id)) && (!open)) {
lcdc_dev->atv_layer_cnt &= ~(1 << win_id);
}
lcdc_dev->driver.win[win_id]->state = open;
if (!open) {

View File

@@ -2707,6 +2707,10 @@ static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd,
case RK_FBIOSET_ENABLE:
if (copy_from_user(&enable, argp, sizeof(enable)))
return -EFAULT;
if (enable)
fb_par->state++;
else
fb_par->state--;
dev_drv->ops->open(dev_drv, win_id, enable);
break;
case RK_FBIOGET_ENABLE: