Who can explain the diff between Xserver-1.6.4 version and >1.7 version about the ExaGetPixmapAddress?

Cui, Hunk Hunk.Cui at amd.com
Tue Jun 8 18:49:41 PDT 2010


Hi, all,
	About the exaGetPixmapOffset function in exa.c, please see below,
In Xserver 1.6.4 version, describe as:

static _X_INLINE void*
ExaGetPixmapAddress(PixmapPtr p)
{
    ExaPixmapPriv(p);

    if (pExaPixmap->offscreen && pExaPixmap->fb_ptr)
	return pExaPixmap->fb_ptr;
    else
	return pExaPixmap->sys_ptr;
}

/**
 * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of
 * the beginning of the given pixmap.
 *
 * Note that drivers are free to, and often do, munge this offset as necessary
 * for handing to the hardware -- for example, translating it into a different
 * aperture.  This function may need to be extended in the future if we grow
 * support for having multiple card-accessible offscreen, such as an AGP memory
 * pool alongside the framebuffer pool.
 */
unsigned long
exaGetPixmapOffset(PixmapPtr pPix)
{
    ExaScreenPriv (pPix->drawable.pScreen);

    return ((unsigned long)ExaGetPixmapAddress(pPix) -
	    (unsigned long)pExaScr->info->memoryBase);
}



In > Xserver 1.7 version, describe as:
/**
 * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of
 * the beginning of the given pixmap.
 *
 * Note that drivers are free to, and often do, munge this offset as necessary
 * for handing to the hardware -- for example, translating it into a different
 * aperture.  This function may need to be extended in the future if we grow
 * support for having multiple card-accessible offscreen, such as an AGP memory
 * pool alongside the framebuffer pool.
 */
unsigned long
exaGetPixmapOffset(PixmapPtr pPix)
{
    ExaScreenPriv (pPix->drawable.pScreen);
    ExaPixmapPriv (pPix);

    return (CARD8 *)pExaPixmap->fb_ptr - pExaScr->info->memoryBase;
}


Who can explain the change? Why del the the part of sys_ptr in > 1.7 version?

Thanks,
Hunk Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100609/344c2dac/attachment.html>


More information about the xorg-devel mailing list