rk3066b sdk : lcd screen b101ew05,add rk610 lvds transmitter support
authoryxj <yxj@rock-chips.com>
Sat, 8 Sep 2012 06:39:44 +0000 (14:39 +0800)
committeryxj <yxj@rock-chips.com>
Sat, 8 Sep 2012 09:26:51 +0000 (17:26 +0800)
drivers/video/display/screen/lcd_b101ew05.c

index 609743e6a0787ef7abd72c09172b44de8b1b432e..b1d9bfef9b96a123b365ed954b59fa0c7f99d153 100755 (executable)
@@ -1,14 +1,23 @@
 #include <linux/fb.h>\r
 #include <linux/delay.h>\r
-#include "../../rk29_fb.h"\r
+#include <linux/rk_fb.h>\r
 #include <mach/gpio.h>\r
 #include <mach/iomux.h>\r
 #include <mach/board.h>\r
 #include "screen.h"\r
 \r
+#ifdef CONFIG_RK610_LCD\r
+#include "../lcd/rk610_lcd.h"\r
+#endif\r
+\r
 \r
 /* Base */\r
+#ifdef CONFIG_RK610_LCD\r
+#define OUT_TYPE           SCREEN_LVDS\r
+#define OUT_FORMAT      LVDS_8BIT_2\r
+#else\r
 #define OUT_TYPE           SCREEN_RGB\r
+#endif\r
 \r
 #define OUT_FACE           OUT_D888_P666\r
 \r
 #define LCD_WIDTH          216\r
 #define LCD_HEIGHT         135\r
 /* Other */\r
-#define DCLK_POL               0\r
+#ifdef CONFIG_RK610_LCD\r
+#define DCLK_POL       1\r
+#else\r
+#define DCLK_POL       0\r
+\r
+#endif\r
 #define SWAP_RB                0\r
 \r
 int dsp_lut[256] ={\r
@@ -70,20 +84,21 @@ int dsp_lut[256] ={
 \r
 void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )\r
 {\r
-    /* screen type & face */\r
-    screen->type = OUT_TYPE;\r
-    screen->face = OUT_FACE;\r
-\r
-    /* Screen size */\r
-    screen->x_res = H_VD;\r
-    screen->y_res = V_VD;\r
-\r
-    screen->width = LCD_WIDTH;\r
-    screen->height = LCD_HEIGHT;\r
+       /* screen type & face */\r
+       screen->type = OUT_TYPE;\r
+       screen->face = OUT_FACE;\r
+       screen->hw_format = OUT_FORMAT;\r
+       \r
+       /* Screen size */\r
+       screen->x_res = H_VD;\r
+       screen->y_res = V_VD;\r
+\r
+       screen->width = LCD_WIDTH;\r
+       screen->height = LCD_HEIGHT;\r
 \r
     /* Timing */\r
-    screen->lcdc_aclk = LCDC_ACLK;\r
-    screen->pixclock = OUT_CLK;\r
+       screen->lcdc_aclk = LCDC_ACLK;\r
+       screen->pixclock = OUT_CLK;\r
        screen->left_margin = H_BP;\r
        screen->right_margin = H_FP;\r
        screen->hsync_len = H_PW;\r
@@ -98,14 +113,18 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
        screen->pin_dclk = DCLK_POL;\r
 \r
        /* Swap rule */\r
-    screen->swap_rb = SWAP_RB;\r
-    screen->swap_rg = 0;\r
-    screen->swap_gb = 0;\r
-    screen->swap_delta = 0;\r
-    screen->swap_dumy = 0;\r
-\r
-    /* Operation function*/\r
-    screen->init = NULL;\r
-    screen->standby = NULL;\r
-    screen->dsp_lut = dsp_lut;\r
+       screen->swap_rb = SWAP_RB;\r
+       screen->swap_rg = 0;\r
+       screen->swap_gb = 0;\r
+       screen->swap_delta = 0;\r
+       screen->swap_dumy = 0;\r
+\r
+       /* Operation function*/\r
+       screen->init = NULL;\r
+       screen->standby = NULL;\r
+       screen->dsp_lut = dsp_lut;\r
+       screen->sscreen_get = NULL;//set_scaler_info;\r
+#ifdef CONFIG_RK610_LCD\r
+       screen->sscreen_set = rk610_lcd_scaler_set_param;\r
+#endif\r
 }\r