if (fb->panel->cntl & CNTL_LCDTFT) val |= (fb->fb.var.xres_virtual - 1) << 16; else if (fb->panel->cntl & CNTL_LCDBW) printk("what value for CPL for stnmono panels?"); else val |= ((fb->fb.var.xres_virtual * 8 / 3) - 1) << 16; regs->tim2 = val; 
cpl = fb->fb.var.xres_virtual; if (fb->panel->cntl & CNTL_LCDTFT)	  /* TFT */ /* / 1 */; else if (!fb->fb.var.grayscale)		  /* STN color */ cpl = cpl * 8 / 3; else if (fb->panel->cntl & CNTL_LCDMONO8) /* STN monochrome, 8bit */ cpl /= 8; else					  /* STN monochrome, 4bit */ cpl /= 4;  regs->tim2 = val | ((cpl - 1) << 16); 
static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs){	u32 val;	/*	 * Program the CLCD controller registers and start the CLCD	 */	val = ((fb->fb.var.xres / 16) - 1) << 2;	val |= (fb->fb.var.hsync_len - 1) << 8;	val |= (fb->fb.var.right_margin - 1) << 16;	val |= (fb->fb.var.left_margin - 1) << 24;	regs->tim0 = val;	val = fb->fb.var.yres - 1;	val |= (fb->fb.var.vsync_len - 1) << 10;	val |= fb->fb.var.lower_margin << 16;	val |= fb->fb.var.upper_margin << 24;	regs->tim1 = val;	val = fb->panel->tim2;	val |= fb->fb.var.sync & FB_SYNC_HOR_HIGH_ACT  ? 0 : TIM2_IHS;	val |= fb->fb.var.sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS;	if (fb->panel->cntl & CNTL_LCDTFT)		val |= (fb->fb.var.xres_virtual - 1) << 16;	else if (fb->panel->cntl & CNTL_LCDBW)		printk("what value for CPL for stnmono panels?");	else		val |= ((fb->fb.var.xres_virtual * 8 / 3) - 1) << 16;	regs->tim2 = val;	regs->tim3 = fb->panel->tim3;	val = fb->panel->cntl;	if (fb->fb.var.grayscale)		val |= CNTL_LCDBW;	switch (fb->fb.var.bits_per_pixel) {	case 1:		val |= CNTL_LCDBPP1;		break;	case 2:		val |= CNTL_LCDBPP2;		break;	case 4:		val |= CNTL_LCDBPP4;		break;	case 8:		val |= CNTL_LCDBPP8;		break;	case 16:		val |= CNTL_LCDBPP16;		break;	case 24:		val |= CNTL_LCDBPP24;		break;	}	regs->cntl = val;	regs->pixclock = fb->fb.var.pixclock;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c4d12b98ead8bb2437f656c17e7ef065fa160e13/amba_clcd.h/buggy/include/asm-arm/hardware/amba_clcd.h