Re: MTRR vesafb and wrong X performance
From: Gerd Knorr
Date: Mon Nov 29 2004 - 13:02:36 EST
> size_total is calculated thus:
>
> size_total = screen_info.lfb_size * 65536;
That comes almost directly from the BIOS, the screen_info struct is
filled by the real mode boot code (vga.S IIRC).
> if (vram_total)
> size_total = vram_total * 1024 * 1024;
The vesafb option to override stuff.
> if (size_total < size_vmode)
> size_total = size_vmode;
Thats kida silly, but as I've found some simliar construct in the old
code I left it in to avoid breaking stuff. Guess there is a reason that
this was there. I'll take that as proof that broken BIOSes exist which
don't fill screen_info.lfb_size correctly ;)
> or blacklist if there aren't too many perhaps?
Hmm, how identify them? Map the BIOS and poke around there?
screen_info gives next to no info here.
Maybe it works better to walk the PCI device list, find the correct
gfx card using the framebuffer start address, then double-check the
size by looking at the PCI ressources?
Gerd
--
#define printk(args...) fprintf(stderr, ## args)
-
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/