Re: [PATCH] drivers/video/vesafb.c, kernel 2.6.0-test1

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Jul 20 2003 - 07:21:39 EST


On Sul, 2003-07-20 at 03:11, Roberto Sanchez wrote:
> --- linux-2.6.0-test1.orig/drivers/video/vesafb.c 2003-07-13
> 23:30:36.000000000 -0400
> +++ linux/drivers/video/vesafb.c 2003-07-19 20:30:18.000000000 -0400
> @@ -227,7 +227,7 @@
> vesafb_defined.xres = screen_info.lfb_width;
> vesafb_defined.yres = screen_info.lfb_height;
> vesafb_fix.line_length = screen_info.lfb_linelength;
> - vesafb_fix.smem_len = screen_info.lfb_size * 65536;
> + vesafb_fix.smem_len = screen_info.lfb_width * screen_info.lfb_height *
> screen_info.lfb_depth;
> vesafb_fix.visual = (vesafb_defined.bits_per_pixel == 8) ?
> FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;

This will make some systems crash on boot.

width * height * depth is in bits. You tben need to chop that down to
bytes and maybe allow room for the scroll buffer, but only if its still
under the size of the entire frame buffer.

See the final 2.4 changes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:39 EST