update fb for accurate dclk
authorzyw <zyw@rock-chips.com>
Thu, 8 Sep 2011 02:53:19 +0000 (10:53 +0800)
committerzyw <zyw@rock-chips.com>
Thu, 8 Sep 2011 02:53:19 +0000 (10:53 +0800)
drivers/video/rk29_fb.c

index 931849ade0a903c7c6c0d73c4d29459c969a2ba4..a8b1a2fcec80933c805a8179eb26e322aed9e310 100755 (executable)
@@ -670,7 +670,7 @@ void load_screen(struct fb_info *info, bool initscreen)
     {
         printk(KERN_ERR ">>>>>> set lcdc dclk failed\n");
     }
-    inf->fb0->var.pixclock = inf->fb1->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
+    inf->fb0->var.pixclock = inf->fb1->var.pixclock = div_u64(1000000000000llu, clk_get_rate(inf->dclk));
     if(initscreen)
     {
         ret = clk_set_parent(inf->aclk, inf->aclk_parent);
@@ -2774,7 +2774,7 @@ static int __init rk29fb_probe (struct platform_device *pdev)
     inf->fb0->var.yres_virtual = screen->y_res;
     inf->fb0->var.width = screen->width;
     inf->fb0->var.height = screen->height;
-    inf->fb0->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
+    //inf->fb0->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
     inf->fb0->var.left_margin = screen->left_margin;
     inf->fb0->var.right_margin = screen->right_margin;
     inf->fb0->var.upper_margin = screen->upper_margin;
@@ -2863,7 +2863,7 @@ static int __init rk29fb_probe (struct platform_device *pdev)
     inf->fb1->var.yres_virtual = screen->y_res;
     inf->fb1->var.width = screen->width;
     inf->fb1->var.height = screen->height;
-    inf->fb1->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
+    //inf->fb1->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
     inf->fb1->var.left_margin = screen->left_margin;
     inf->fb1->var.right_margin = screen->right_margin;
     inf->fb1->var.upper_margin = screen->upper_margin;