[Xorg] Question about X Server Internal

Adam Jackson ajax at nwnk.net
Sat Aug 21 16:56:05 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 21 August 2004 19:26, Amir Bukhari wrote:
> On Sun, 2004-08-22 at 01:00, Vladimir Dergachev wrote:
> > Most accelerated drivers do not access framebuffer directly, just cause
> > the card to perform the corresponding operation.
>
> that is right when XAA is used but I would like to understand cfb code
> (actually how it access the framebuffer).

Since you keep mentioning cfb:

Just don't.  cfb is designed for a much earlier generation of video cards.  
It's largely dead code, and I really want to mark it deprecated and cut it in 
the next release.  programs/Xserver/fb has the framebuffer core that almost 
all of the drivers use these days (excluding sunffb and sunleo, both of which 
could probably be easily converted to fb).

Anyway.  The driver tells the fb layer where the framebuffer is by calling 
fbScreenInit during startup.  tdfx_driver.c is typical:

if (!fbScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
                  pScrn->virtualX, pScrn->virtualY,
                  pScrn->xDpi, pScrn->yDpi,
                  pScrn->displayWidth, pScrn->bitsPerPixel))
    return FALSE;

Here the second argument is the visible portion of VRAM.  The driver has 
already mmap()ed the framebuffer by this point, so framebuffer access is just 
memory access.

cfb does something similar, check the sunleo driver for an example.

- - ajax
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBJ+EYW4otUKDs0NMRAuo6AJ441NaiLwbqt1c2b3XrJPdTNq2pLACdEn3R
Ij+BH2GApBv6g3w/tbj2ims=
=c4ID
-----END PGP SIGNATURE-----



More information about the xorg mailing list