Re: [Linux-fbdev-devel] Re: [PATCH] vesafb memory size mismatch

From: Antonino A. Daplas
Date: Fri Oct 01 2004 - 15:32:01 EST


On Friday 01 October 2004 23:48, Gerd Knorr wrote:
> + /* size_vmode -- that is the amount of memory needed for the
> + * used video mode, i.e. the minimum amount of
> + * memory we need. */
> + size_vmode = (vesafb_defined.xres * vesafb_defined.yres *
> + vesafb_defined.bits_per_pixel) >> 3;
> +
> + /* size_total -- all video memory we have. Used for mtrr
> + * entries and bounds checking. */
> + size_total = screen_info.lfb_size * 65536;
> + if (size_total < size_vmode)
> + size_total = size_vmode;
> + if (vram)
> + size_total = vram * 1024 * 1024;
> +
> + /* size_remap -- the amount of video memory we are going to
> + * use for vesafb. With modern cards it is no
> + * option to simply use size_total as that
> + * wastes plenty of kernel address space. */
> + size_remap = size_vmode * 2;
> + if (size_remap > size_total)
> + size_remap = size_total;
> + vesafb_fix.smem_len = size_remap;

Probably a typo, but shouldn't it be...

size_remap = size_vmode * 2;
if (vram)
size_remap = vram * 1024 * 1024;
if (size_remap > size_total)
size_remap = size_total

... so vram doesn't mess up with mtrr and user and fbcon can multibuffer
> size_vmode?

Tony


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