From 31a599cbf418a0bf8776367a04092c4c3bc64ca3 Mon Sep 17 00:00:00 2001 From: hjc Date: Wed, 19 Mar 2014 22:35:52 +0800 Subject: [PATCH] rk fb: fix win init error --- drivers/video/rockchip/lcdc/rk3288_lcdc.c | 4 ++-- drivers/video/rockchip/rk_fb.c | 6 +++--- include/linux/rk_fb.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk3288_lcdc.c b/drivers/video/rockchip/lcdc/rk3288_lcdc.c index 44a774e2580c..3f5c79f3621e 100755 --- a/drivers/video/rockchip/lcdc/rk3288_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3288_lcdc.c @@ -208,7 +208,7 @@ static int rk3288_lcdc_pre_init(struct rk_lcdc_driver *dev_drv) int *cbase = (int *)lcdc_dev->regs; if (lcdc_dev->pre_init) return 0; - +#ifdef CONFIG_RK_FPGA lcdc_dev->hclk = devm_clk_get(lcdc_dev->dev, "hclk_lcdc"); lcdc_dev->aclk = devm_clk_get(lcdc_dev->dev, "aclk_lcdc"); lcdc_dev->dclk = devm_clk_get(lcdc_dev->dev, "dclk_lcdc"); @@ -218,7 +218,7 @@ static int rk3288_lcdc_pre_init(struct rk_lcdc_driver *dev_drv) dev_err(lcdc_dev->dev, "failed to get lcdc%d clk source\n", lcdc_dev->id); } - +#endif /*uboot display has enabled lcdc in boot */ if (!support_uboot_display()) { rk_disp_pwr_enable(dev_drv); diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 8fa5b6362e7f..c6e8e5ae4a39 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -2621,9 +2621,9 @@ static int init_lcdc_win(struct rk_lcdc_driver *dev_drv, struct rk_lcdc_win *def return -ENOMEM; } - strcpy(win->name, def_win->name); - win->id = def_win->id; - win->support_3d = def_win->support_3d; + strcpy(win->name, def_win[i].name); + win->id = def_win[i].id; + win->support_3d = def_win[i].support_3d; dev_drv->win[i] = win; } diff --git a/include/linux/rk_fb.h b/include/linux/rk_fb.h index 091e1137e7f4..e13d1e8cacc8 100755 --- a/include/linux/rk_fb.h +++ b/include/linux/rk_fb.h @@ -549,12 +549,12 @@ extern int rk_disp_pwr_disable(struct rk_lcdc_driver *dev_drv); extern bool is_prmry_rk_lcdc_registered(void); extern int rk_fb_prase_timing_dt(struct device_node *np, struct rk_screen *screen); - +#ifdef CONFIG_RK_FPGA static int inline support_uboot_display(void) { return 0; } - +#endif extern int rk_disp_prase_timing_dt(struct rk_lcdc_driver *dev_drv); extern int rk_fb_dpi_open(bool open); -- 2.34.1