From: Huang Jiachai Date: Tue, 10 May 2016 02:53:41 +0000 (+0800) Subject: video: rockchip: fb: add DUAL_LCD mode X-Git-Tag: firefly_0821_release~2661 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e9eb853bd0f4d9e8082034b7280ea69635de66ec;p=firefly-linux-kernel-4.4.55.git video: rockchip: fb: add DUAL_LCD mode this mode is used for the case just like two LCD output and display kernel logo when power on. Change-Id: I188b95bc638a66338de3401fd7b9eec049d7071a Signed-off-by: Huang Jiachai --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index a67cf66dbf5d..8e703de9db2a 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -1656,6 +1656,7 @@ static void rk_fb_update_win(struct rk_lcdc_driver *dev_drv, win->area[i].smem_start = reg_win_data->reg_area_data[i].smem_start; if (inf->disp_mode == DUAL || + inf->disp_mode == DUAL_LCD || inf->disp_mode == NO_DUAL) { win->area[i].xpos = reg_win_data->reg_area_data[i].xpos; @@ -4420,13 +4421,15 @@ int rk_fb_register(struct rk_lcdc_driver *dev_drv, struct fb_info *extend_fbi = rk_fb->fb[dev_drv->fb_index_base]; extend_fbi->var.pixclock = rk_fb->fb[0]->var.pixclock; - extend_fbi->fbops->fb_open(extend_fbi, 1); - if (dev_drv->iommu_enabled) { - if (dev_drv->mmu_dev) - rockchip_iovmm_set_fault_handler(dev_drv->dev, - rk_fb_sysmmu_fault_handler); + if (rk_fb->disp_mode == DUAL_LCD) { + extend_fbi->fbops->fb_open(extend_fbi, 1); + if (dev_drv->iommu_enabled) { + if (dev_drv->mmu_dev) + rockchip_iovmm_set_fault_handler(dev_drv->dev, + rk_fb_sysmmu_fault_handler); + } + rk_fb_alloc_buffer(extend_fbi); } - rk_fb_alloc_buffer(extend_fbi); } #endif return 0; diff --git a/include/dt-bindings/display/rk_fb.h b/include/dt-bindings/display/rk_fb.h index 6d757703cbb2..e9d341d4adc0 100755 --- a/include/dt-bindings/display/rk_fb.h +++ b/include/dt-bindings/display/rk_fb.h @@ -12,6 +12,7 @@ #define NO_DUAL 0 #define ONE_DUAL 1 #define DUAL 2 +#define DUAL_LCD 3 /******************************************************************** ** display output interface supported by rockchip ** ********************************************************************/