Re: Direct access to paged Video ram

Search this archive.

From: matan@svgalib.org
Date: Mon 06 Nov 2000 - 11:01:16 IST


On Mon, 6 Nov 2000, Richard A. Smith wrote:

> I am haveing some trouble trying to put an image into paged video RAM
> of a 640x480x256 display.

> So far all the various functions I have tried are either not
> fastenough or don't seem to work at all.
> 
> vga_drawscanline, and vga_drawpixel are too slow.

vga_drawpixel is certainly too slow. vga_drawscanline is almost as fast as
can be.
It is possible that your speed problem relates to incorrect MTRR setting.
Try running linearspeed and speedtest, and see what rates you get. on PCI,
anything under 60MB/s might mean incorrect configuration.

> Here's my test code:
> 
> 	vga_setpage(0);
> 	vidmem = vga_getgraphmem();
> 	offset = 0;
> 	vidndx = vidbuf;
> 	for (pagecounter = 0 ; pagecounter < 65536 ; pagecounter++) {
> 		*(vidmem + offset) = *vidndx;
> 		offset++;
> 		vidndx++;
> 	}
> 	
> 
> vidbuf is a pointer to wher my image is stored.I would have thought
> that this would allow me to fill the first 64k page with the top
> portion of my image as fast as possible.But all it does is appear to
> fill one line.By changing the value given to setpage I can create that
> single line in numerous spots on the screen but I can't get anything
> that looks like part of my image.

There might be problems with vga_getgraphmem. Please try using the
variable graph_mem instead. 



-- 
Matan Ziv-Av                          matan@svgalib.org


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST