mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
support hdmi for default panel
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
72
drivers/video/display/screen/lcd_anx7150_720p.c
Normal file
72
drivers/video/display/screen/lcd_anx7150_720p.c
Normal file
@@ -0,0 +1,72 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
2
drivers/video/hdmi/hdmi-fb.c
Executable file → Normal file
2
drivers/video/hdmi/hdmi-fb.c
Executable file → Normal file
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user