Automatic merge of master.kernel.org:/home/rmk/linux-2.6-rmk.git

This commit is contained in:
Linus Torvalds 2005-04-28 16:09:57 -07:00
commit 2604f6da1a
3 changed files with 34 additions and 18 deletions

View file

@ -125,11 +125,11 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
case 2:
case 4:
case 8:
var->red.length = 8;
var->red.length = var->bits_per_pixel;
var->red.offset = 0;
var->green.length = 8;
var->green.length = var->bits_per_pixel;
var->green.offset = 0;
var->blue.length = 8;
var->blue.length = var->bits_per_pixel;
var->blue.offset = 0;
break;
case 16:
@ -146,7 +146,7 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
var->blue.offset = 10;
}
break;
case 24:
case 32:
if (fb->panel->cntl & CNTL_LCDTFT) {
var->red.length = 8;
var->green.length = 8;
@ -178,6 +178,12 @@ static int clcdfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (fb->board->check)
ret = fb->board->check(fb, var);
if (ret == 0 &&
var->xres_virtual * var->bits_per_pixel / 8 *
var->yres_virtual > fb->fb.fix.smem_len)
ret = -EINVAL;
if (ret == 0)
ret = clcdfb_set_bitfields(fb, var);