和面板有關的參數設定在 struct s3c2410fb_display 這個結構中,其宣告為
struct s3c2410fb_display {
/* LCD type */
unsigned type;
/* Screen size */
unsigned short width;
unsigned short height;
/* Screen info */
unsigned short xres;
unsigned short yres;
unsigned short bpp;
unsigned pixclock; /* pixclock in picoseconds */
unsigned short left_margin; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short hsync_len; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short upper_margin; /* value in lines (TFT) or 0 (STN) */
unsigned short lower_margin; /* value in lines (TFT) or 0 (STN) */
unsigned short vsync_len; /* value in lines (TFT) or 0 (STN) */
/* lcd configuration registers */
unsigned long lcdcon5;
};
以我的面板為例,這塊面板是 HITACHI 的七吋面板,型號為 TX18D16VM1CAA,根據手冊所記載,其可接受的 pixel clock 的最大週期為 33ns (相當於 30KHz);Hsync 訊號寬度為 128 個 pclk,螢幕左方邊界寬度為 88 個 pclk,右方為 40 pclk;Vsync 訊號寬度為 2 個 Hsync 週期,上方邊界寬度為 32 個 Hsync,下方為 11 個 Hsync。解析度為 800x480。
程式碼加入後,在 make config 中開啟 S3C24xx 之 frame buffer 支援,重新編譯後下載至開發板即可。
另外,你也可以在核心啟動參數中加上 fbcon=rotate:<n>