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:
parent
931abdba84
commit
bf32f4739c
@ -295,6 +295,7 @@ LOOKUP xfree86LookupTab[] = {
|
||||
SYMFUNC(xf86AcquireGART)
|
||||
SYMFUNC(xf86ReleaseGART)
|
||||
SYMFUNC(xf86AllocateGARTMemory)
|
||||
SYMFUNC(xf86DeallocateGARTMemory)
|
||||
SYMFUNC(xf86BindGARTMemory)
|
||||
SYMFUNC(xf86UnbindGARTMemory)
|
||||
SYMFUNC(xf86EnableAGP)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user