rk30,rk3066b,rk3188 lcdc:support rk616 for one lcdc dual output interface
authoryxj <yxj@rock-chips.com>
Mon, 22 Apr 2013 06:43:20 +0000 (14:43 +0800)
committeryxj <yxj@rock-chips.com>
Thu, 25 Apr 2013 13:02:03 +0000 (21:02 +0800)
drivers/video/rockchip/lcdc/rk3066b_lcdc.c
drivers/video/rockchip/lcdc/rk30_lcdc.c
drivers/video/rockchip/lcdc/rk3188_lcdc.c

index c47132c9acfd826bf70318516958e31cf90565b5..9a1a7cf2e08bb111fe26cff373e3bc99ad5894b6 100755 (executable)
@@ -1139,7 +1139,7 @@ static int __devinit rk3066b_lcdc_probe (struct platform_device *pdev)
        screen->lcdc_id = lcdc_dev->id;
        screen->screen_id = 0;
 
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& defined(CONFIG_RK610_LVDS)
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
        screen1 =  kzalloc(sizeof(rk_screen), GFP_KERNEL);
        if(!screen1)
        {
@@ -1181,7 +1181,7 @@ static int __devinit rk3066b_lcdc_probe (struct platform_device *pdev)
        printk("lcdc%d:reg_phy_base = 0x%08x,reg_vir_base:0x%p\n",pdev->id,lcdc_dev->reg_phy_base, lcdc_dev->preg);
        lcdc_dev->driver.dev=&pdev->dev;
        lcdc_dev->driver.screen0 = screen;
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& defined(CONFIG_RK610_LVDS)
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
        lcdc_dev->driver.screen1 = screen1;
 #endif
        lcdc_dev->driver.cur_screen = screen;
index 1d594077e484c87a7c4a181f27cc6e1eed27a283..c23c5b837b2b77de8029e2edb50767fca5692513 100644 (file)
@@ -1512,6 +1512,7 @@ static int __devinit rk30_lcdc_probe (struct platform_device *pdev)
 {
        struct rk30_lcdc_device *lcdc_dev=NULL;
        rk_screen *screen;
+       rk_screen *screen1;
        struct rk29fb_info *screen_ctr_info;
        struct resource *res = NULL;
        struct resource *mem;
@@ -1534,6 +1535,25 @@ static int __devinit rk30_lcdc_probe (struct platform_device *pdev)
                ret =  -ENOMEM;
                goto err0;
        }
+       else
+       {
+               lcdc_dev->screen = screen;
+               screen->lcdc_id = lcdc_dev->id;
+               screen->screen_id = 0;
+       }
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&&  (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
+       screen1 =  kzalloc(sizeof(rk_screen), GFP_KERNEL);
+       if(!screen1)
+       {
+               dev_err(&pdev->dev, ">>rk30 lcdc screen1 kmalloc fail!");
+               ret =  -ENOMEM;
+               goto err0;
+       }
+       screen1->lcdc_id = 1;
+       screen1->screen_id = 1;
+       printk("use lcdc%d and jetta implemention dual display!\n",lcdc_dev->id);
+       
+#endif
        /****************get lcdc0 reg  *************************/
        res = platform_get_resource(pdev, IORESOURCE_MEM,0);
        if (res == NULL)
@@ -1570,9 +1590,13 @@ static int __devinit rk30_lcdc_probe (struct platform_device *pdev)
        lcdc_dev->dsp_lut_addr_base = (lcdc_dev->regs + DSP_LUT_ADDR);
        printk("lcdc%d:reg_phy_base = 0x%08x,reg_vir_base:0x%p\n",pdev->id,lcdc_dev->reg_phy_base, lcdc_dev->regs);
        lcdc_dev->driver.dev=&pdev->dev;
-       lcdc_dev->driver.screen0 = screen;
+
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
+       lcdc_dev->driver.screen1 = screen1;
+#endif
        lcdc_dev->driver.cur_screen = screen;
        lcdc_dev->driver.screen_ctr_info = screen_ctr_info;
+       
        spin_lock_init(&lcdc_dev->reg_lock);
        lcdc_dev->irq = platform_get_irq(pdev, 0);
        if(lcdc_dev->irq < 0)
index 5042067774f2b71950ce36dead785e50dbba4da0..9c490b41d5dc1fd18f8bb10772fd6c4c45fe2b33 100644 (file)
@@ -1392,7 +1392,7 @@ static int __devinit rk3188_lcdc_probe(struct platform_device *pdev)
        }
        screen->lcdc_id = lcdc_dev->id;
        screen->screen_id = 0;
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& defined(CONFIG_RK610_LVDS)
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&&  (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
        screen1 =  kzalloc(sizeof(rk_screen), GFP_KERNEL);
        if(!screen1)
        {
@@ -1402,7 +1402,7 @@ static int __devinit rk3188_lcdc_probe(struct platform_device *pdev)
        }
        screen1->lcdc_id = 1;
        screen1->screen_id = 1;
-       printk("use lcdc%d and rk610 implemention dual display!\n",lcdc_dev->id);
+       printk("use lcdc%d and jetta implemention dual display!\n",lcdc_dev->id);
        
 #endif
        
@@ -1442,7 +1442,7 @@ static int __devinit rk3188_lcdc_probe(struct platform_device *pdev)
        printk("lcdc%d:reg_phy_base = 0x%08x,reg_vir_base:0x%p\n",pdev->id,lcdc_dev->reg_phy_base, lcdc_dev->regs);
        lcdc_dev->driver.dev = dev;
        lcdc_dev->driver.screen0 = screen;
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& defined(CONFIG_RK610_LVDS)
+#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)&& (defined(CONFIG_RK610_LVDS) || defined(CONFIG_RK616_LVDS))
        lcdc_dev->driver.screen1 = screen1;
 #endif
        lcdc_dev->driver.cur_screen = screen;