LcdWrReg(lcdc_dev, WIN1_SCL_FACTOR_CBR, v_X_SCL_FACTOR(ScaleCbrX) | v_Y_SCL_FACTOR(ScaleCbrY));
LcdMskReg(lcdc_dev, SYS_CTRL1, m_W1_EN|m_W1_FORMAT, v_W1_EN(1)|v_W1_FORMAT(par->format));
LcdWrReg(lcdc_dev, WIN1_YRGB_MST, addr);
- LcdWrReg(lcdc_dev, WIN0_ACT_INFO,v_ACT_WIDTH(xact) | v_ACT_HEIGHT(yact));
+ LcdWrReg(lcdc_dev, WIN1_ACT_INFO,v_ACT_WIDTH(xact) | v_ACT_HEIGHT(yact));
LcdWrReg(lcdc_dev, WIN1_DSP_ST,v_DSP_STX(xpos) | v_DSP_STY(ypos));
LcdWrReg(lcdc_dev, WIN1_DSP_INFO,v_DSP_WIDTH(par->xsize) | v_DSP_HEIGHT(par->ysize));
// enable win1 color key and set the color to black(rgb=0)
fb1 and fb3 are used for video play,the buffer is alloc by android,and
pass the phy addr to fix.smem_start by ioctl
****************************************************************************/
+static int rk_fb_open(struct fb_info *info,int user)
+{
+ struct rk_fb_inf *inf = dev_get_drvdata(info->device);
+ struct fb_fix_screeninfo *fix = &info->fix;
+ if(!strcmp(fix->id,"fb1")){
+ inf->video_mode = 1;
+ }
+
+ return 0;
+
+}
+static int rk_fb_release(struct fb_info *info,int user)
+{
+ struct rk_fb_inf *inf = dev_get_drvdata(info->device);
+ struct fb_fix_screeninfo *fix = &info->fix;
+ if(!strcmp(fix->id,"fb1")){
+ inf->video_mode = 0;
+ }
+
+ return 0;
+}
static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
static struct fb_ops fb_ops = {
.owner = THIS_MODULE,
+ .fb_open = rk_fb_open,
+ .fb_release = rk_fb_release,
.fb_check_var = rk_fb_check_var,
.fb_set_par = rk_fb_set_par,
.fb_blank = rk_fb_blank,