PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

VRAM speed

Lennard Feddersen · 17 Jun 2003, 20:44 UTC
I have just run a simple test on top of GAPI to color the video screen black. I call GAPIBeginDraw to get a pointer to the frame buffer, fill using a single loop and 32 bit value (2 pixels at once to the 16 bit framebuffer). This takes about 33 ms on my Toshiba E335. The same loop takes about 3 ms when not writing to VRAM returned from GAPIBeginDraw but instead to malloc'ed heap RAM.

Is this just the speed of VRAM access on this device? Anybody have any insights as to how this might be overcome? Am I just flat out missing something?
There is basically two possibilities here:

1) Your device is actually using real VRAM (i.e. memory that resides on-board the LCD controller). This memory would be much slower then system memory (RAM). Could happen on devices using the MQ200 or ATI LCD controllers.

2) Your PPC is actually using real system memory, but that memory is flagged as "non-cacheable", and that could make it slower.

My bet is on #1 though to explain such a big difference. What device are you testing with?
I am sure it is #1.
As far as I know all strong arm based devices have framebuffer marked as non-cacheable and while this results in a slower performance than writing to a cacheable system ram the difference is nowhere near 10 times.
There was a thread about that recently on GapiDraw forum and to summarize it looks like the problem with Toshiba e335 is directly related to MediaQ chip.
In another words, while MediaQ does indeed accelerate graphic operations , bypassing the chip and accessing framebuffer memory directly results in this kind of delay.
Lennard: I got your email but reply here instead.. Interesting findings.. A couple of questions:

(1) Do you call GXEndDraw after you have copied all data using 32-bit DWORD writes?
(2) Is the display double buffered? I.e. if you do not call GXEndDraw and fill only half of the display with some color, is it updated on the display?
(3) If you call GXBeginDraw before filling the same amount of system memory, is the performance the same? (The device could have a thread running that simply copies the contents of the RAM buffer to the display - providing support for those applications that only call GXBeginDraw once).