From: Huang Jiachai Date: Tue, 13 Sep 2016 11:36:10 +0000 (+0800) Subject: video: rockchip: fb: update for one vop dual mipi ver scan mode X-Git-Tag: firefly_0821_release~1540 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=651dc6cdce8ed4dd13a0271cc3b962c2d4506579;p=firefly-linux-kernel-4.4.55.git video: rockchip: fb: update for one vop dual mipi ver scan mode Change-Id: I07b5970a6f3dc01110dde59615e537612c408e2a Signed-off-by: Huang Jiachai --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index fb2e34f690df..4a838803dc1e 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -4242,6 +4242,12 @@ int rk_fb_register(struct rk_lcdc_driver *dev_drv, fbi->fix = def_fix; sprintf(fbi->fix.id, "fb%d", rk_fb->num_fb); fb_videomode_to_var(&fbi->var, &dev_drv->cur_screen->mode); + if (dev_drv->dsp_mode == ONE_VOP_DUAL_MIPI_VER_SCAN) { + fbi->var.xres /= 2; + fbi->var.yres *= 2; + fbi->var.xres_virtual /= 2; + fbi->var.yres_virtual *= 2; + } fbi->var.width = dev_drv->cur_screen->width; fbi->var.height = dev_drv->cur_screen->height; fbi->var.grayscale |= @@ -4253,8 +4259,6 @@ int rk_fb_register(struct rk_lcdc_driver *dev_drv, #endif fbi->fix.line_length = (fbi->var.xres_virtual) * (fbi->var.bits_per_pixel >> 3); - fbi->var.width = dev_drv->cur_screen->width; - fbi->var.height = dev_drv->cur_screen->height; if (dev_drv->iommu_enabled) fb_ops.fb_mmap = rk_fb_mmap; fbi->fbops = &fb_ops;