From e3d5de7ad781babecc2448fbd73b28e8089baf6d Mon Sep 17 00:00:00 2001 From: zyw Date: Thu, 9 Dec 2010 18:49:45 +0800 Subject: [PATCH] add panel dpi --- drivers/video/display/screen/lcd_a060se02.c | 5 +++++ drivers/video/display/screen/lcd_hl070vm4.c | 7 +++++++ drivers/video/display/screen/lcd_hsd100pxn.c | 5 +++++ drivers/video/display/screen/lcd_hsd800x480.c | 6 ++++++ drivers/video/display/screen/lcd_hx8357.c | 6 ++++++ drivers/video/display/screen/lcd_nt35580.c | 6 ++++++ drivers/video/display/screen/lcd_nt35582.c | 6 ++++++ drivers/video/display/screen/lcd_s1d13521.c | 6 ++++++ drivers/video/display/screen/lcd_td043mgea1.c | 6 ++++++ drivers/video/display/screen/lcd_tj048nc01ca.c | 6 ++++++ drivers/video/display/screen/screen.h | 6 ++++-- drivers/video/rk29_fb.c | 8 ++++---- 12 files changed, 67 insertions(+), 6 deletions(-) mode change 100755 => 100644 drivers/video/display/screen/lcd_a060se02.c mode change 100755 => 100644 drivers/video/display/screen/lcd_hl070vm4.c mode change 100644 => 100755 drivers/video/display/screen/lcd_hsd100pxn.c mode change 100755 => 100644 drivers/video/display/screen/lcd_hsd800x480.c mode change 100755 => 100644 drivers/video/display/screen/lcd_hx8357.c mode change 100755 => 100644 drivers/video/display/screen/lcd_nt35580.c mode change 100755 => 100644 drivers/video/display/screen/lcd_nt35582.c mode change 100755 => 100644 drivers/video/display/screen/lcd_s1d13521.c mode change 100755 => 100644 drivers/video/display/screen/lcd_td043mgea1.c mode change 100755 => 100644 drivers/video/display/screen/lcd_tj048nc01ca.c diff --git a/drivers/video/display/screen/lcd_a060se02.c b/drivers/video/display/screen/lcd_a060se02.c old mode 100755 new mode 100644 index b24540b5f31a..4cb18754d162 --- a/drivers/video/display/screen/lcd_a060se02.c +++ b/drivers/video/display/screen/lcd_a060se02.c @@ -26,6 +26,8 @@ #define DCLK_POL 0 #define SWAP_RB 0 +#define LCD_WIDTH 600 //need modify +#define LCD_HEIGHT 800 int lcd_init(void) @@ -127,6 +129,9 @@ void set_lcd_info(struct rk29fb_screen *screen) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->left_margin = H_BP; screen->right_margin = H_FP; diff --git a/drivers/video/display/screen/lcd_hl070vm4.c b/drivers/video/display/screen/lcd_hl070vm4.c old mode 100755 new mode 100644 index f81aadaf5954..50edbfbb0f9e --- a/drivers/video/display/screen/lcd_hl070vm4.c +++ b/drivers/video/display/screen/lcd_hl070vm4.c @@ -22,6 +22,10 @@ #define V_VD 480 #define V_FP 10 + +#define LCD_WIDTH 800 //need modify +#define LCD_HEIGHT 480 + /* Other */ #define DCLK_POL 1 ///0 #define SWAP_RB 0 @@ -57,6 +61,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk2918lcd_info *lcd_info screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/lcd_hsd100pxn.c b/drivers/video/display/screen/lcd_hsd100pxn.c old mode 100644 new mode 100755 index 5bd792e9f846..459261a0b683 --- a/drivers/video/display/screen/lcd_hsd100pxn.c +++ b/drivers/video/display/screen/lcd_hsd100pxn.c @@ -24,6 +24,8 @@ #define V_VD 768 #define V_FP 18 +#define LCD_WIDTH 202 +#define LCD_HEIGHT 152 /* Other */ #define DCLK_POL 0 #define SWAP_RB 0 @@ -39,6 +41,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/lcd_hsd800x480.c b/drivers/video/display/screen/lcd_hsd800x480.c old mode 100755 new mode 100644 index 43b96070b0c8..84f157e59818 --- a/drivers/video/display/screen/lcd_hsd800x480.c +++ b/drivers/video/display/screen/lcd_hsd800x480.c @@ -28,6 +28,9 @@ #define DCLK_POL 1 #define SWAP_RB 0 +#define LCD_WIDTH 800 //need modify +#define LCD_HEIGHT 480 + #define TXD_PORT gLcd_info->txd_pin #define CLK_PORT gLcd_info->clk_pin #define CS_PORT gLcd_info->cs_pin @@ -59,6 +62,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/lcd_hx8357.c b/drivers/video/display/screen/lcd_hx8357.c old mode 100755 new mode 100644 index 4990d9aeee53..19e4efc719f2 --- a/drivers/video/display/screen/lcd_hx8357.c +++ b/drivers/video/display/screen/lcd_hx8357.c @@ -23,6 +23,9 @@ #define V_VD 480 //***480 #define V_FP 40 +#define LCD_WIDTH 320 //need modify +#define LCD_HEIGHT 480 + /* Other */ #define DCLK_POL 0 #define SWAP_RB 0 @@ -172,6 +175,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; /*>2*/ diff --git a/drivers/video/display/screen/lcd_nt35580.c b/drivers/video/display/screen/lcd_nt35580.c old mode 100755 new mode 100644 index e1b63fef9569..39fea0c4ef7e --- a/drivers/video/display/screen/lcd_nt35580.c +++ b/drivers/video/display/screen/lcd_nt35580.c @@ -23,6 +23,9 @@ #define V_VD 800 #define V_FP 2 +#define LCD_WIDTH 480 //need modify +#define LCD_HEIGHT 800 + /* Other */ #define DCLK_POL 0 #define SWAP_RB 0 @@ -432,6 +435,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk2918lcd_info *lcd_info screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/lcd_nt35582.c b/drivers/video/display/screen/lcd_nt35582.c old mode 100755 new mode 100644 index 66941e23910c..7ddf8646c2fe --- a/drivers/video/display/screen/lcd_nt35582.c +++ b/drivers/video/display/screen/lcd_nt35582.c @@ -20,6 +20,9 @@ #define V_VD 800 #define V_FP 1 +#define LCD_WIDTH 480 //need modify +#define LCD_HEIGHT 800 + #define P_WR 27 #define USE_FMARK 0 //2 //ÊÇ·ñʹÓÃFMK (0:²»Ö§³Ö 1:ºáÆÁÖ§³Ö 2:ºáÊúÆÁ¶¼Ö§³Ö) #define FRMRATE 60 //MCUÆÁµÄË¢ÐÂÂÊ (FMKÓÐЧʱÓÃ) @@ -388,6 +391,9 @@ void set_lcd_info(struct rk29fb_screen *screen) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->left_margin = H_BP; screen->right_margin = H_FP; diff --git a/drivers/video/display/screen/lcd_s1d13521.c b/drivers/video/display/screen/lcd_s1d13521.c old mode 100755 new mode 100644 index 804170aeb25a..c2f7cdf958c5 --- a/drivers/video/display/screen/lcd_s1d13521.c +++ b/drivers/video/display/screen/lcd_s1d13521.c @@ -25,6 +25,9 @@ #define P_WR 200 +#define LCD_WIDTH 600 //need modify +#define LCD_HEIGHT 800 + /* Other */ #define DCLK_POL 0 #define SWAP_RB 0 @@ -314,6 +317,9 @@ void set_lcd_info(struct rk28fb_screen *screen) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->left_margin = H_BP; screen->right_margin = H_FP; diff --git a/drivers/video/display/screen/lcd_td043mgea1.c b/drivers/video/display/screen/lcd_td043mgea1.c old mode 100755 new mode 100644 index 6764031d9298..f67e344244fe --- a/drivers/video/display/screen/lcd_td043mgea1.c +++ b/drivers/video/display/screen/lcd_td043mgea1.c @@ -23,6 +23,9 @@ #define V_VD 480 #define V_FP 10 +#define LCD_WIDTH 800 //need modify +#define LCD_HEIGHT 480 + /* Other */ #define DCLK_POL 0 #define SWAP_RB 0 @@ -58,6 +61,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/lcd_tj048nc01ca.c b/drivers/video/display/screen/lcd_tj048nc01ca.c old mode 100755 new mode 100644 index d9f0e133e1b2..ef298599ee10 --- a/drivers/video/display/screen/lcd_tj048nc01ca.c +++ b/drivers/video/display/screen/lcd_tj048nc01ca.c @@ -23,6 +23,9 @@ #define V_VD 480 #define V_FP 4 +#define LCD_WIDTH 800 //need modify +#define LCD_HEIGHT 480 + /* Other */ #define DCLK_POL 1 #define SWAP_RB 0 @@ -57,6 +60,9 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->x_res = H_VD; screen->y_res = V_VD; + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + /* Timing */ screen->pixclock = OUT_CLK; screen->left_margin = H_BP; diff --git a/drivers/video/display/screen/screen.h b/drivers/video/display/screen/screen.h index 6d15bb498730..b661d07655d7 100755 --- a/drivers/video/display/screen/screen.h +++ b/drivers/video/display/screen/screen.h @@ -41,9 +41,11 @@ struct rk29fb_screen { /* Screen size */ u16 x_res; u16 y_res; + u16 width; + u16 height; /* Timing */ - u16 pixclock; + u32 pixclock; u16 left_margin; u16 right_margin; u16 hsync_len; @@ -61,7 +63,7 @@ struct rk29fb_screen { u8 pin_vsync; u8 pin_den; u8 pin_dclk; - u8 lcdc_aclk; + u32 lcdc_aclk; u8 pin_dispon; /* Swap rule */ diff --git a/drivers/video/rk29_fb.c b/drivers/video/rk29_fb.c index 14310f085d93..18f529942a55 100755 --- a/drivers/video/rk29_fb.c +++ b/drivers/video/rk29_fb.c @@ -1792,8 +1792,8 @@ static int __init rk29fb_probe (struct platform_device *pdev) inf->win1fb->var.bits_per_pixel = 16; inf->win1fb->var.xres_virtual = screen->x_res; inf->win1fb->var.yres_virtual = screen->y_res; - inf->win1fb->var.width = screen->x_res; - inf->win1fb->var.height = screen->y_res; + inf->win1fb->var.width = screen->width; + inf->win1fb->var.height = screen->height; inf->win1fb->var.pixclock = screen->pixclock; inf->win1fb->var.left_margin = screen->left_margin; inf->win1fb->var.right_margin = screen->right_margin; @@ -1850,8 +1850,8 @@ static int __init rk29fb_probe (struct platform_device *pdev) inf->win0fb->var.bits_per_pixel = 16; inf->win0fb->var.xres_virtual = screen->x_res; inf->win0fb->var.yres_virtual = screen->y_res; - inf->win0fb->var.width = screen->x_res; - inf->win0fb->var.height = screen->y_res; + inf->win0fb->var.width = screen->width; + inf->win0fb->var.height = screen->height; inf->win0fb->var.pixclock = screen->pixclock; inf->win0fb->var.left_margin = screen->left_margin; inf->win0fb->var.right_margin = screen->right_margin; -- 2.34.1