📄 s3c2410fb.h
字号:
/* * linux/drivers/video/s3c2410fb.h * -- StrongARM 1100 LCD Controller Frame Buffer Device * * Copyright (C) 1999 Eric A. Thomas * Based on acornfb.c Copyright (C) Russell King. * 2001 Sangwook Lee (hitchcar@sec.samsung.com) S3C2400 * 2002 Sangwook Lee (hitchcar@sec.samsung.com) S3C2410 * *//* * struct fb_bitfield { * __u32 offset; beginning of bitfield * __u32 length; length of bitfield * __u32 msb_right; != 0 : Most significant bit is * right * }; * These are the bitfields for each * display depth that we support. */struct s3c2410fb_rgb { struct fb_bitfield red; struct fb_bitfield green; struct fb_bitfield blue; struct fb_bitfield transp;};/* * This structure describes the machine which we are running on. */struct s3c2410fb_mach_info { u_long pixclock; u_short xres; u_short yres; u_char bpp; u_char hsync_len; u_char left_margin; u_char right_margin; u_char vsync_len; u_char upper_margin; u_char lower_margin; u_char sync; u_int cmap_greyscale:1, cmap_inverse:1, cmap_static:1, unused:29;};/* Shadows for LCD controller registers */struct s3c2410fb_lcd_reg { unsigned long lcdcon1; unsigned long lcdcon2; unsigned long lcdcon3; unsigned long lcdcon4; unsigned long lcdcon5; unsigned long lcdsaddr1; unsigned long lcdsaddr2; unsigned long lcdsaddr3; unsigned long lpcsel; unsigned long lcdintmsk; unsigned long tpal;};#define RGB_8 (0)#define RGB_16 (1)#define NR_RGB 2struct s3c2410fb_info { struct fb_info fb; signed int currcon; struct s3c2410fb_rgb *rgb[NR_RGB]; u_int max_bpp; u_int max_xres; u_int max_yres; /* * These are the addresses we mapped * the framebuffer memory region to. */ dma_addr_t map_dma; u_char * map_cpu; u_int map_size; u_char * screen_cpu; dma_addr_t screen_dma; u16 * palette_cpu; dma_addr_t palette_dma; u_int palette_size; u_int cmap_inverse:1, cmap_static:1, unused:30; u_int reg_lcdcon1; u_int reg_lcdcon2; u_int reg_lcdcon3; u_int reg_lcdcon4; u_int reg_lcdcon5; u_int reg_lcdsaddr1; u_int reg_lcdsaddr2; u_int reg_lcdsaddr3; u_int reg_lpcsel; u_int reg_lcdintmsk; volatile u_char state; volatile u_char task_state; struct semaphore ctrlr_sem; wait_queue_head_t ctrlr_wait; struct tq_struct task;#ifdef CONFIG_PM struct pm_dev *pm;#endif#ifdef CONFIG_CPU_FREQ struct notifier_block clockchg;#endif};#define __type_entry(ptr,type,member) ((type *)((char *)(ptr)-offsetof(type,member)))#define TO_INF(ptr,member) __type_entry(ptr,struct s3c2410fb_info,member)#define S3C2410_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9)/* * These are the actions for set_ctrlr_state */#define C_DISABLE (0)#define C_ENABLE (1)#define C_DISABLE_CLKCHANGE (2)#define C_ENABLE_CLKCHANGE (3)#define C_REENABLE (4)#define S3C2410_NAME "S3C2410"/* * Debug macros */#if DEBUG# define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ## args)#else# define DPRINTK(fmt, args...)#endif/* * Minimum X and Y resolutions */#define MIN_XRES 64#define MIN_YRES 64/* * LCD Parameter * Used in drivers/video/s3c2410fb.c *///#define TFT240_320 1//#define STN320_240 2#define TFT640_480 3 /* Used in s3c2410fb.c *///#define LCD_TYPE TFT240_320//#define LCD_TYPE STN320_240#define LCD_TYPE TFT640_480 #if defined(TFT240_320)#define CURRENT_LCD_X 240 /* used in Touch Screen */#define CURRENT_LCD_Y 320 /* used in Touch Screen */#elif defined(TFT640_480)#define CURRENT_LCD_X 640 /* used in Touch Screen */#define CURRENT_LCD_Y 480 /* used in Touch Screen */#elif defined(STN320_240)#define CURRENT_LCD_X 320 /* used in Touch Screen */#define CURRENT_LCD_Y 240 /* used in Touch Screen */#endif #define MVAL (13)#define MVAL_USED (0)#define M5D(n) ((n) & 0x1fffff) #if defined(TFT240_320) #define VBPD ((5)&0xff) #define VFPD ((2)&0xff) #define VSPW ((1) &0x3f) #define HBPD ((69-1)&0x7f) #define HFPD ((2)&0xff) #define HSPW ((3)&0xff) #define CLKVAL_STN_MONO (22) //69.14hz @60Mhz,WLH=16clk,WDLY=16clk,LINEBLANK=1*8,VD=4 #define CLKVAL_STN_GRAY (12) //124hz @60Mhz,WLH=16clk,WDLY=16clk,LINEBLANK=1*8,VD=4 #define CLKVAL_CSTN (8) //135hz @60Mhz,WLH=16clk,WDLY=16clk,LINEBLANK=1*8,VD=8 #define CLKVAL_TFT (4)#elif defined(STN320_240) #define CLKVAL_CSTN (6) // 130hz @50Mhz,WLH=16hclk,WDLY=16hclk,LINEBLANK=16*8hclk,VD=8 #define LINEVAL_CSTN (CURRENT_LCD_Y - 1) #define WDLY_CSTN (0) #define HOZVAL_CSTN (CURRENT_LCD_X*3/8-1) #define LINEBLANK_CSTN (16 & 0xff) #define WLH_CSTN (0)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -