Re: Page Flipping

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Sun 19 May 2002 - 14:06:49 IDT


On Sun, 19 May 2002, James wrote:

> Hello all,
> 
>  Just need to know exactly how the function vga_setdisplaystart()
> operates. I can think of two possibilities:
> 
> a) The page switch takes affect during the NEXT vertical blank.
> b) The page switch happens immediatley.

The functions writes the new value immediately to the necessary
registers.
In most (modern) video cards those registers are double bufferred, and
the change actually takes affect only at the next vertical refresh
period.

There are three other behaviours:
1- change takes place immediatelly.
2- There is a register that decides if the change is immediate or at VR.
3- The standard registers are not double bufferred, but there is an
   extra set of display start registers which are.

Until now (actually, about a month ago), I ignored this issue. From now,
I'll try to fix the drivers for card which are in case 2 or 3, to behave
as in the double buffered case.

For example: riva128 (nv3) has non double bufferred registers, but nv10
and later are double bufferred. Not sure about nv4, nv5.
Cirrus Logic Laguna chipset is type 3.
Rage 128 is type 2.


> If it works likecase "a" then I would do something like this:
> 
> vga_setdisplaystart();  // page flip
> vga_waitretrace();        // only takes affect now
> 
> 
> however if its more like case "b" then I`d do this;
> 
> vga_waitretrace();       // wait for the blank
> vga_setdisplaystart(); // switch pages

Just remember that vga_waitretrace() does busy waiting, rather than
blocking.


-- 
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:25 IST