From 4c36679ef63f5f07973af1f6603bbb5185f0568c Mon Sep 17 00:00:00 2001 From: zyw Date: Fri, 24 Dec 2010 13:16:39 +0800 Subject: [PATCH] support hdmi for default panel --- drivers/video/display/screen/Kconfig | 18 ++--- drivers/video/display/screen/Makefile | 2 +- .../video/display/screen/lcd_anx7150_720p.c | 72 +++++++++++++++++++ drivers/video/hdmi/hdmi-fb.c | 2 +- drivers/video/rk29_fb.c | 6 +- 5 files changed, 81 insertions(+), 19 deletions(-) create mode 100644 drivers/video/display/screen/lcd_anx7150_720p.c mode change 100755 => 100644 drivers/video/hdmi/hdmi-fb.c diff --git a/drivers/video/display/screen/Kconfig b/drivers/video/display/screen/Kconfig index 90e4594fde65..6de4a8beda7c 100755 --- a/drivers/video/display/screen/Kconfig +++ b/drivers/video/display/screen/Kconfig @@ -23,20 +23,10 @@ config LCD_NT35582 bool "MCU NT35582" config LCD_NT35580 bool "MCU NT35580" +config LCD_ANX7150_720P + bool "anx7150 720p for default panel" + ---help--- + if you want set anx7150(720p 50hz) for default panel, android UI size is 1280x720. endchoice -choice - depends on DISPLAY_SUPPORT - prompt "TVOUT Chip Select" -config TV_NULL - bool "NULL" -endchoice -choice - depends on DISPLAY_SUPPORT - prompt "HDMI Chip Select" -config HDMI_NULL - bool "NULL" -config HDMI_ANX7150 - bool "HDMI ANX7150" -endchoice diff --git a/drivers/video/display/screen/Makefile b/drivers/video/display/screen/Makefile index 4944ea197359..a9e8fdf4f238 100755 --- a/drivers/video/display/screen/Makefile +++ b/drivers/video/display/screen/Makefile @@ -18,5 +18,5 @@ obj-$(CONFIG_HDMI_ANX7150) += hdmi_anx7150.o obj-$(CONFIG_LCD_HX8357) += lcd_hx8357.o obj-$(CONFIG_LCD_HSD100PXN) += lcd_hsd100pxn.o - +obj-$(CONFIG_LCD_ANX7150_720P) += lcd_anx7150_720p.o diff --git a/drivers/video/display/screen/lcd_anx7150_720p.c b/drivers/video/display/screen/lcd_anx7150_720p.c new file mode 100644 index 000000000000..5464c109fcf0 --- /dev/null +++ b/drivers/video/display/screen/lcd_anx7150_720p.c @@ -0,0 +1,72 @@ +#include +#include +#include "../../rk29_fb.h" +#include +#include +#include +#include "screen.h" + +#define OUT_TYPE SCREEN_HDMI +#define OUT_FACE OUT_P888 +#define LCDC_ACLK 312000000 + +#define OUT_CLK 74250000 +#define H_PW 40 +#define H_BP 220 +#define H_VD 1280 +#define H_FP 440 +#define V_PW 5 +#define V_BP 20 +#define V_VD 720 +#define V_FP 5 + +#define LCD_WIDTH 1280 +#define LCD_HEIGHT 720 +/* Other */ +#define DCLK_POL 1 +#define SWAP_RB 0 + + +void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) +{ + /* screen type & face */ + screen->type = OUT_TYPE; + screen->face = OUT_FACE; + + /* Screen size */ + screen->x_res = H_VD; + screen->y_res = V_VD; + + screen->width = LCD_WIDTH; + screen->height = LCD_HEIGHT; + + /* Timing */ + screen->lcdc_aclk = LCDC_ACLK; + screen->pixclock = OUT_CLK; + screen->left_margin = H_BP; + screen->right_margin = H_FP; + screen->hsync_len = H_PW; + screen->upper_margin = V_BP; + screen->lower_margin = V_FP; + screen->vsync_len = V_PW; + + /* Pin polarity */ + screen->pin_hsync = 0; + screen->pin_vsync = 0; + screen->pin_den = 0; + screen->pin_dclk = DCLK_POL; + + /* Swap rule */ + screen->swap_rb = SWAP_RB; + screen->swap_rg = 0; + screen->swap_gb = 0; + screen->swap_delta = 0; + screen->swap_dumy = 0; + + /* Operation function*/ + screen->init = NULL; + screen->standby = NULL; +} + + + diff --git a/drivers/video/hdmi/hdmi-fb.c b/drivers/video/hdmi/hdmi-fb.c old mode 100755 new mode 100644 index c937dc72a512..1eb2e302e224 --- a/drivers/video/hdmi/hdmi-fb.c +++ b/drivers/video/hdmi/hdmi-fb.c @@ -9,7 +9,7 @@ /* Base */ #define LCD_ACLK 312000000 -#define OUT_TYPE SCREEN_RGB +#define OUT_TYPE SCREEN_HDMI #define OUT_FACE OUT_P888 #define DCLK_POL 1 #define SWAP_RB 0 diff --git a/drivers/video/rk29_fb.c b/drivers/video/rk29_fb.c index d11bbdb0b1ee..26c12fd332e1 100755 --- a/drivers/video/rk29_fb.c +++ b/drivers/video/rk29_fb.c @@ -579,11 +579,11 @@ void load_screen(struct fb_info *info, bool initscreen) return ; } - if(inf->cur_screen == &inf->panel1_info) { - inf->dclk_parent = clk_get(NULL, "general_pll"); - } else { + if((inf->cur_screen->type == SCREEN_HDMI) || (inf->cur_screen->type == SCREEN_TVOUT)){ inf->dclk_parent = clk_get(NULL, "codec_pll"); clk_set_rate(inf->dclk_parent, 297000000); + } else { + inf->dclk_parent = clk_get(NULL, "general_pll"); } if (IS_ERR(inf->dclk_parent)) -- 2.34.1