aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/i810/i810_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/i810/i810_main.c')
-rw-r--r--drivers/video/i810/i810_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index a24e680d2b9c..2e940199fc89 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -993,6 +993,7 @@ static int i810_check_params(struct fb_var_screeninfo *var,
993 struct i810fb_par *par = info->par; 993 struct i810fb_par *par = info->par;
994 int line_length, vidmem, mode_valid = 0, retval = 0; 994 int line_length, vidmem, mode_valid = 0, retval = 0;
995 u32 vyres = var->yres_virtual, vxres = var->xres_virtual; 995 u32 vyres = var->yres_virtual, vxres = var->xres_virtual;
996
996 /* 997 /*
997 * Memory limit 998 * Memory limit
998 */ 999 */
@@ -1002,12 +1003,12 @@ static int i810_check_params(struct fb_var_screeninfo *var,
1002 if (vidmem > par->fb.size) { 1003 if (vidmem > par->fb.size) {
1003 vyres = par->fb.size/line_length; 1004 vyres = par->fb.size/line_length;
1004 if (vyres < var->yres) { 1005 if (vyres < var->yres) {
1005 vyres = yres; 1006 vyres = info->var.yres;
1006 vxres = par->fb.size/vyres; 1007 vxres = par->fb.size/vyres;
1007 vxres /= var->bits_per_pixel >> 3; 1008 vxres /= var->bits_per_pixel >> 3;
1008 line_length = get_line_length(par, vxres, 1009 line_length = get_line_length(par, vxres,
1009 var->bits_per_pixel); 1010 var->bits_per_pixel);
1010 vidmem = line_length * yres; 1011 vidmem = line_length * info->var.yres;
1011 if (vxres < var->xres) { 1012 if (vxres < var->xres) {
1012 printk("i810fb: required video memory, " 1013 printk("i810fb: required video memory, "
1013 "%d bytes, for %dx%d-%d (virtual) " 1014 "%d bytes, for %dx%d-%d (virtual) "