rk30 fb: add default screen config for hdmi
authoryxj <yxj@rock-chips.com>
Wed, 18 Apr 2012 07:54:19 +0000 (15:54 +0800)
committeryxj <yxj@rock-chips.com>
Wed, 18 Apr 2012 07:56:39 +0000 (15:56 +0800)
 before register_framebuffer,we must init fb_var_screeninfo

drivers/video/rockchip/rk_fb.c

index ace40a3e0c021b157e15b2cc73b2e0c3be6b2dd7..1b290e9cf216f2f5f4ef9b37bbd9fb906042a417 100644 (file)
@@ -798,6 +798,13 @@ int rk_fb_register(struct rk_lcdc_device_driver *dev_drv,
        {
                set_lcd_info(dev_drv->screen, fb_inf->mach_info->lcd_info);
        }
+       else if(id == 1)
+       {
+               memcpy(dev_drv->screen,fb_inf->lcdc_dev_drv[0]->screen,sizeof(rk_screen));
+               dev_drv->screen->init = NULL;
+               dev_drv->screen->standby = NULL;
+       }
+               
        dev_drv->init_lcdc(dev_drv);
        dev_drv->load_screen(dev_drv,1);
        /************fb set,one layer one fb ***********/
@@ -822,7 +829,7 @@ int rk_fb_register(struct rk_lcdc_device_driver *dev_drv,
         fbi->var.yres_virtual = fb_inf->lcdc_dev_drv[lcdc_id]->screen->y_res;
         fbi->var.width = fb_inf->lcdc_dev_drv[lcdc_id]->screen->width;
         fbi->var.height = fb_inf->lcdc_dev_drv[lcdc_id]->screen->height;
-        fbi->var.pixclock =fb_inf->lcdc_dev_drv[lcdc_id]->pixclock;
+        fbi->var.pixclock = fb_inf->lcdc_dev_drv[lcdc_id]->pixclock;
         fbi->var.left_margin = fb_inf->lcdc_dev_drv[lcdc_id]->screen->left_margin;
         fbi->var.right_margin = fb_inf->lcdc_dev_drv[lcdc_id]->screen->right_margin;
         fbi->var.upper_margin = fb_inf->lcdc_dev_drv[lcdc_id]->screen->upper_margin;