Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187180
b: refs/heads/master
c: dbb7884
h: refs/heads/master
v: v3
  • Loading branch information
Florian Tobias Schandinat authored and Linus Torvalds committed Mar 12, 2010
1 parent 841a0a9 commit fbf2c90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd140691bda491b417a6d1e81b03416b54cb8d8d
refs/heads/master: dbb7884be758ca9ac5ec84cbe7eb21f21bce9d8f
12 changes: 4 additions & 8 deletions trunk/drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ static void viafb_update_fix(struct fb_info *info)

info->fix.visual =
bpp == 8 ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
info->fix.line_length =
((info->var.xres_virtual + 7) & ~7) * bpp / 8;
info->fix.line_length = (info->var.xres_virtual * bpp / 8 + 7) & ~7;
}

static void viafb_setup_fixinfo(struct fb_fix_screeninfo *fix,
Expand Down Expand Up @@ -148,7 +147,7 @@ static int viafb_check_var(struct fb_var_screeninfo *var,
int htotal, vtotal, depth;
struct VideoModeTable *vmode_entry;
struct viafb_par *ppar = info->par;
u32 long_refresh;
u32 long_refresh, line;

DEBUG_MSG(KERN_INFO "viafb_check_var!\n");
/* Sanity check */
Expand Down Expand Up @@ -180,11 +179,8 @@ static int viafb_check_var(struct fb_var_screeninfo *var,
depth = 24;

viafb_fill_var_color_info(var, depth);
if ((var->xres_virtual * (var->bits_per_pixel >> 3)) & 0x1F)
/*32 pixel alignment */
var->xres_virtual = (var->xres_virtual + 31) & ~31;
if (var->xres_virtual * var->yres_virtual * var->bits_per_pixel / 8 >
ppar->memsize)
line = (var->xres_virtual * var->bits_per_pixel / 8 + 7) & ~7;
if (line * var->yres_virtual > ppar->memsize)
return -EINVAL;

/* Based on var passed in to calculate the refresh,
Expand Down

0 comments on commit fbf2c90

Please sign in to comment.