Xserver: sys_ptr & fb_ptr question

Michel Dänzer michel at daenzer.net
Wed Jun 30 23:25:11 PDT 2010


On Don, 2010-07-01 at 13:32 +0800, Cui, Hunk wrote: 
> 	
> 	I mean your suggestion, now in our geode driver, I have modified the Rotate_mem. Rotateddata has to be allocated between memoryBase and memorySize.
> 	Now my question: Please see the link:
> http://cgit.freedesktop.org/xorg/xserver/tree/exa/exa_classic.c#n170
> Code:
> 	if (pExaScr->info->memoryBase && pPixData) {
> 	    if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
> 		((CARD8 *)pPixData - pExaScr->info->memoryBase) <
> 				pExaScr->info->memorySize) {
> 		pExaPixmap->fb_ptr = pPixData;
> 		pExaPixmap->fb_pitch = devKind;
> 		pExaPixmap->use_gpu_copy = TRUE;
> 	    }
> 	}
> In Xserver 1.6, Does not exist the judge.
> In Xserver version >=1.7, Occur this judge.
> 
> My question is: 
> 	What is effect of the judge?

It considers the pPixData pointer passed in to be the GPU copy if it
falls within the offscreen memory range.

> What are the different between sys_ptr and fb_ptr?

From exa_priv.h:

    CARD8           *sys_ptr;   /**< pointer to pixmap data in system memory */
    CARD8           *fb_ptr;    /**< pointer to pixmap data in framebuffer memory */

Basically, fb_* refer to the GPU copy, sys_* to the system memory copy
of the pixmap contents.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list