在代码中有
// VIDTCON0 #define VBPDE(n) (((n-1)&0xff)<<24) #define VBPD(n) (((n-1)&0xff)<<16) #define VFPD(n) (((n-1)&0xff)<<8) #define VSPW(n) (((n-1)&0xff)<<0) // VIDTCON1 #define VFPDE(n) (((n-1)&0xff)<<24) #define HBPD(n) (((n-1)&0xff)<<16) #define HFPD(n) (((n-1)&0xff)<<8) #define HSPW(n) (((n-1)&0xff)<<0) // VIDTCON2 #define LINEVAL(n) (((n-1)&0x7ff)<<11) #define HOZVAL(n) (((n-1)&0x7ff)<<0)
#ifdef CONFIG_FB_S3C_LTE480WV .width = 480, .height = 272, .bpp = 16, .freq = 60, .timing = { .h_fp = 2, //HFPD_Value = 2 .h_bp = 2, //HBPD_Value = 2 .h_sw = 41,//HSPW_Value = 41; .v_fp = 2, //VFPD_Value = 2 .v_fpe = 1, .v_bp = 2, //VBPD_Value = 2 .v_bpe = 1, .v_sw = 10, }, .polarity = { .rise_vclk = 0, .inv_hsync = 1, .inv_vsync = 1, .inv_vden = 0, }, #endif
里面的
v_fpe和h_bpe 是啥玩意呢?
在代码中有
int s3cfb_set_timing(struct s3cfb_global *ctrl) { struct s3cfb_lcd_timing *time; u32 cfg; time = &ctrl->lcd->timing; cfg = 0; cfg |= S3C_VIDTCON0_VBPDE(time->v_bpe - 1); cfg |= S3C_VIDTCON0_VBPD(time->v_bp - 1); cfg |= S3C_VIDTCON0_VFPD(time->v_fp - 1); cfg |= S3C_VIDTCON0_VSPW(time->v_sw - 1); writel(cfg, ctrl->regs + S3C_VIDTCON0); cfg = 0; cfg |= S3C_VIDTCON1_VFPDE(time->v_fpe - 1); cfg |= S3C_VIDTCON1_HBPD(time->h_bp - 1); cfg |= S3C_VIDTCON1_HFPD(time->h_fp - 1); cfg |= S3C_VIDTCON1_HSPW(time->h_sw - 1); writel(cfg, ctrl->regs + S3C_VIDTCON1); return 0; }
在手册有如下说明:
VBPDE [31:24] Vertical back porch specifies the number of inactive lines at the start of a frame after vertical synchronization period. (Only for even field of YVU interface) VFPDE [31:24] Vertical front porch specifies the number of inactive lines at the end of a frame before vertical synchronization period. (Only for the even field of YVU interface). Only for the even field of YVU interface 这个是啥意思?我在wince的VGA 1440*900 1280*720 1280*1024 当中根本没有设置这个 v_fpe和h_bpe,也就是默认就是0.在android下就有这玩意。明天再看怎么回事,今天太晚了。