Re: [PATCH] Fix vesafb with large memory

Geert Uytterhoeven (geert@linux-m68k.org)
Thu, 8 May 2003 08:50:01 +0200 (MEST)


On Wed, 7 May 2003, Linux Kernel Mailing List wrote:
> ChangeSet 1.1199, 2003/05/06 22:04:11-03:00, r.a.mercer@blueyonder.co.uk
>
> [PATCH] Fix vesafb with large memory
>
> Hi
>
> I've recently been having a problem with the vesafb refusing to boot on
> my system, after investigation the problem further I found that it had
> been mentioned on the 27 March 2003, in this thread
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=104878364823195&w=2
>
> In the thread Walt H, waltabbyh <at> comcast <dot> net, provides a fix.
> After just downloading 2.4.21-rc1 I noticed that this fix was not
> present. So heres a patch against 2.4.21-rc1 to fix this probelm.
>
> Please CC me with any responses as I'm not on the list.
>
> Cheers
>
> Adam
>
>
> # This patch includes the following deltas:
> # ChangeSet 1.1198 -> 1.1199
> # drivers/video/vesafb.c 1.7 -> 1.8
> #
>
> vesafb.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
>
> diff -Nru a/drivers/video/vesafb.c b/drivers/video/vesafb.c
> --- a/drivers/video/vesafb.c Wed May 7 13:04:32 2003
> +++ b/drivers/video/vesafb.c Wed May 7 13:04:32 2003
> @@ -520,7 +520,7 @@
> video_width = screen_info.lfb_width;
> video_height = screen_info.lfb_height;
> video_linelength = screen_info.lfb_linelength;
> - video_size = screen_info.lfb_size * 65536;
> + video_size = screen_info.lfb_width * screen_info.lfb_height * video_bpp;
> video_visual = (video_bpp == 8) ?
> FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;

video_size must be in bytes, hence it must be

video_size = screen_info.lfb_width*screen_info.lfb_height*video_bpp/8;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

- 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/