The patch titled viafb: some virtual_xres handling fixes has been added to the -mm tree. Its filename is viafb-some-virtual_xres-handling-fixes.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: viafb: some virtual_xres handling fixes From: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx> Do not require the virtual_xres to be aligned as line length is for such purposes. Calculate always the smallest line length required. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx> Cc: Joseph Chan <JosephChan@xxxxxxxxxx> Cc: Scott Fang <ScottFang@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/via/viafbdev.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff -puN drivers/video/via/viafbdev.c~viafb-some-virtual_xres-handling-fixes drivers/video/via/viafbdev.c --- a/drivers/video/via/viafbdev.c~viafb-some-virtual_xres-handling-fixes +++ a/drivers/video/via/viafbdev.c @@ -107,8 +107,7 @@ static void viafb_update_fix(struct fb_i 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, @@ -148,7 +147,7 @@ static int viafb_check_var(struct fb_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 */ @@ -180,11 +179,8 @@ static int viafb_check_var(struct fb_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, _ Patches currently in -mm which might be from FlorianSchandinat@xxxxxx are viafb-deprecate-private-ioctls.patch viafb-remove-dead-code.patch viafb-split-global-index-up.patch viafb-split-global-index-up-fix.patch viafb-remove-the-remaining-via_res_-uses.patch viafb-some-dvi-cleanup.patch viafb-yet-another-dead-code-removal.patch viafb-reorder-initialization-for-dual-framebuffer-mode.patch viafb-video-address-setting-revisited.patch viafb-make-viafb_set_par-more-dual-framebuffer-compatible.patch viafb-introduce-strict-parameter-checking.patch viafb-split-color-mode-setting-up.patch viafb-remove-dead-code-due-to-iga1_iga2.patch viafb-make-some-variables-a-bit-less-global.patch viafb-rework-color-checking.patch viafb-some-virtual_xres-handling-fixes.patch viafb-rework-color-setting.patch viafb-support-color-depth-15-and-30.patch drivers-video-via-fix-continuation-line-formats.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html