static int s3c2410fb_activate_var(struct s3c2410fb_info *fbi, struct fb_var_screeninfo *var) 
static void s3c2410fb_activate_var(struct s3c2410fb_info *fbi, struct fb_var_screeninfo *var) 
static int s3c2410fb_activate_var(struct s3c2410fb_info *fbi,				  struct fb_var_screeninfo *var){	fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK;	dprintk("%s: var->xres  = %d\n", __FUNCTION__, var->xres);	dprintk("%s: var->yres  = %d\n", __FUNCTION__, var->yres);	dprintk("%s: var->bpp   = %d\n", __FUNCTION__, var->bits_per_pixel);	switch (var->bits_per_pixel) {	case 1:		fbi->regs.lcdcon1 |= S3C2410_LCDCON1_TFT1BPP;		break;	case 2:		fbi->regs.lcdcon1 |= S3C2410_LCDCON1_TFT2BPP;		break;	case 4:		fbi->regs.lcdcon1 |= S3C2410_LCDCON1_TFT4BPP;		break;	case 8:		fbi->regs.lcdcon1 |= S3C2410_LCDCON1_TFT8BPP;		break;	case 16:		fbi->regs.lcdcon1 |= S3C2410_LCDCON1_TFT16BPP;		break;	}	/* check to see if we need to update sync/borders */	if (!fbi->mach_info->fixed_syncs) {		dprintk("setting vert: up=%d, low=%d, sync=%d\n",			var->upper_margin, var->lower_margin,			var->vsync_len);		dprintk("setting horz: lft=%d, rt=%d, sync=%d\n",			var->left_margin, var->right_margin,			var->hsync_len);		fbi->regs.lcdcon2 =			S3C2410_LCDCON2_VBPD(var->upper_margin - 1) |			S3C2410_LCDCON2_VFPD(var->lower_margin - 1) |			S3C2410_LCDCON2_VSPW(var->vsync_len - 1);		fbi->regs.lcdcon3 =			S3C2410_LCDCON3_HBPD(var->right_margin - 1) |			S3C2410_LCDCON3_HFPD(var->left_margin - 1);		fbi->regs.lcdcon4 &= ~S3C2410_LCDCON4_HSPW(0xff);		fbi->regs.lcdcon4 |=  S3C2410_LCDCON4_HSPW(var->hsync_len - 1);	}	/* update X/Y info */	fbi->regs.lcdcon2 &= ~S3C2410_LCDCON2_LINEVAL(0x3ff);	fbi->regs.lcdcon2 |=  S3C2410_LCDCON2_LINEVAL(var->yres - 1);	fbi->regs.lcdcon3 &= ~S3C2410_LCDCON3_HOZVAL(0x7ff);	fbi->regs.lcdcon3 |=  S3C2410_LCDCON3_HOZVAL(var->xres - 1);	if (var->pixclock > 0) {		int clkdiv = s3c2410fb_calc_pixclk(fbi, var->pixclock);		clkdiv = (clkdiv / 2) -1;		if (clkdiv < 0)			clkdiv = 0;		fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_CLKVAL(0x3ff);		fbi->regs.lcdcon1 |=  S3C2410_LCDCON1_CLKVAL(clkdiv);	}	/* write new registers */	dprintk("new register set:\n");	dprintk("lcdcon[1] = 0x%08lx\n", fbi->regs.lcdcon1);	dprintk("lcdcon[2] = 0x%08lx\n", fbi->regs.lcdcon2);	dprintk("lcdcon[3] = 0x%08lx\n", fbi->regs.lcdcon3);	dprintk("lcdcon[4] = 0x%08lx\n", fbi->regs.lcdcon4);	dprintk("lcdcon[5] = 0x%08lx\n", fbi->regs.lcdcon5);	writel(fbi->regs.lcdcon1 & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1);	writel(fbi->regs.lcdcon2, S3C2410_LCDCON2);	writel(fbi->regs.lcdcon3, S3C2410_LCDCON3);	writel(fbi->regs.lcdcon4, S3C2410_LCDCON4);	writel(fbi->regs.lcdcon5, S3C2410_LCDCON5);	/* set lcd address pointers */	s3c2410fb_set_lcdaddr(fbi);	writel(fbi->regs.lcdcon1, S3C2410_LCDCON1);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fe984bba30a29398578da3d8c0503fa39e84b838/s3c2410fb.c/buggy/drivers/video/s3c2410fb.c