programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c

programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c
programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h
//bugs.freedesktop.org/show_bug.cgi?id=3164> Add xf86DeallocateGARTMemory()
    function call (Austin Yuan)
This commit is contained in:
Alan Hourihane 2005-07-19 20:51:46 +00:00
parent 931abdba84
commit bf32f4739c
4 changed files with 28 additions and 0 deletions

View File

@ -295,6 +295,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86AcquireGART)
SYMFUNC(xf86ReleaseGART)
SYMFUNC(xf86AllocateGARTMemory)
SYMFUNC(xf86DeallocateGARTMemory)
SYMFUNC(xf86BindGARTMemory)
SYMFUNC(xf86UnbindGARTMemory)
SYMFUNC(xf86EnableAGP)

View File

@ -248,6 +248,27 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
return alloc.key;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
if (!GARTInit(screenNum) || acquiredScreen != screenNum)
return FALSE;
if (acquiredScreen != screenNum) {
xf86DrvMsg(screenNum, X_ERROR,
"xf86UnbindGARTMemory: AGP not acquired by this screen\n");
return FALSE;
}
if (ioctl(gartFd, AGPIOC_DEALLOCATE, (char *)&key) != 0) {
xf86DrvMsg(screenNum, X_WARNING,"xf86DeAllocateGARTMemory: "
"deallocation gart memory with key %d failed\n\t(%s)\n",
key, strerror(errno));
return FALSE;
}
return TRUE;
}
/* Bind GART memory with "key" at "offset" */
Bool

View File

@ -81,6 +81,11 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
return -1;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
return FALSE;
}
Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)

View File

@ -198,6 +198,7 @@ extern Bool xf86AcquireGART(int screenNum);
extern Bool xf86ReleaseGART(int screenNum);
extern int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
unsigned long *physical);
extern Bool xf86DeallocateGARTMemory(int screenNum, int key);
extern Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset);
extern Bool xf86UnbindGARTMemory(int screenNum, int key);
extern Bool xf86EnableAGP(int screenNum, CARD32 mode);