#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
\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
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