#include "../../../drivers/staging/android/timed_gpio.h"
#endif
-#define RK30_FB0_MEM_SIZE 8*SZ_1M
+#define RK30_FB0_MEM_SIZE 12*SZ_1M
#ifdef CONFIG_VIDEO_RK29
/*---------------- Camera Sensor Macro Define Begin ------------------------*/
}
- 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->screen->ft+5));
- if(!timeout&&(!dev_drv->frame_done.done))
+ if(dev_drv->num_buf < 3) //3buffer ,no need to wait for sysn
{
- 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->screen->ft+5));
+ if(!timeout&&(!dev_drv->frame_done.done))
+ {
+ printk(KERN_ERR "wait for new frame start time out!\n");
+ return -ETIMEDOUT;
+ }
}
-
return 0;
}
LcdMskReg(lcdc_dev, INT_STATUS, m_FRM_START_INT_CLEAR, v_FRM_START_INT_CLEAR(1));
LCDC_REG_CFG_DONE();
//LcdMskReg(lcdc_dev, INT_STATUS, m_LINE_FLAG_INT_CLEAR, v_LINE_FLAG_INT_CLEAR(1));
-
- spin_lock(&(lcdc_dev->driver.cpl_lock));
- complete(&(lcdc_dev->driver.frame_done));
- spin_unlock(&(lcdc_dev->driver.cpl_lock));
+
+ if(lcdc_dev->driver.num_buf < 3) //three buffer ,no need to wait for sync
+ {
+ spin_lock(&(lcdc_dev->driver.cpl_lock));
+ complete(&(lcdc_dev->driver.frame_done));
+ spin_unlock(&(lcdc_dev->driver.cpl_lock));
+ }
return IRQ_HANDLED;
}
int layer_id = get_fb_layer_id(&info->fix);
int enable; // enable fb:1 enable;0 disable
int ovl; //overlay:0 win1 on the top of win0;1,win0 on the top of win1
+ int num_buf; //buffer_number
void __user *argp = (void __user *)arg;
switch(cmd)
if (copy_from_user(&ovl, argp, sizeof(ovl)))
return -EFAULT;
dev_drv->ovl_mgr(dev_drv,ovl,1);
+ break;
case FBIOGET_OVERLAY_STATE:
ovl = dev_drv->ovl_mgr(dev_drv,0,0);
if (copy_to_user(argp, &ovl, sizeof(ovl)))
return -EFAULT;
+ break;
+ case FBIOPUT_NUM_BUFFERS:
+ if (copy_from_user(&num_buf, argp, sizeof(num_buf)))
+ return -EFAULT;
+ dev_drv->num_buf = num_buf;
+ break;
case FBIOGET_SCREEN_STATE:
case FBIOPUT_SET_CURSOR_EN:
case FBIOPUT_SET_CURSOR_POS:
#define FBIOPUT_SET_CURSOR_CMAP 0x460c
#define FBIOPUT_GET_CURSOR_RESOLUTION 0x460d
#define FBIOPUT_GET_CURSOR_EN 0x460e
+#define FBIOPUT_NUM_BUFFERS 0x460f
+
#ifdef __KERNEL__
#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user)
#else
struct layer_par *layer_par[RK_MAX_FB_SUPPORT];
struct layer_par *def_layer_par;
int num_layer;
+ int num_buf; //the num_of buffer
int fb_index_base; //the first fb index of the lcdc device
rk_screen *screen;
u32 pixclock;