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

From: Gerd Knorr
Date: Mon Oct 04 2004 - 05:42:25 EST


> > + /* 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;

> 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

No, it's intentional. Some bioses seem to report bogous values for the
total amount of memory, so you can use vram to fixup that. The
"size_total < size_vmode" check which is kida silly is there for the
very same reason: on a bug-free bios it should never ever trigger, but
looks like it is needed neverless.

We might want to add another parameter to allow the user to adjust
size_remap through. I'll prepare an updated patch one later today,
with other issue (line_length != width * depth) fixed as well.

Gerd

--
return -ENOSIG;
-
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/