summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-05-12 16:26:58 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-05-12 16:26:58 -0700
commit4c727254da354cfd6f35148a334d046d67a50e99 (patch)
tree9cc2422074d290dd61f209bcadb90a9eb459b3db /src
parenta115c4b872a385530dcf94b7e7f2fa9b3b7e3155 (diff)
Remove the local, renamed copy of lnx_agp.c. The diff between lnx_agp.c and it
appeared to be removal of bugfixes.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/i830.h16
-rw-r--r--src/i830_agp.c366
-rw-r--r--src/i830_driver.c2
-rw-r--r--src/i830_memory.c38
-rw-r--r--src/i830_rotate.c42
6 files changed, 41 insertions, 424 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ad861e7e..f1726f11 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,7 +44,6 @@ i810_drv_la_SOURCES = \
i810_video.c \
i810_wmark.c \
i830_accel.c \
- i830_agp.c \
i830_common.h \
i830_cursor.c \
i830_dga.c \
diff --git a/src/i830.h b/src/i830.h
index 29506eae..cc26149d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -460,8 +460,6 @@ extern Bool I830DoPoolAllocation(ScrnInfoPtr pScrn, I830MemPool *pool);
extern Bool I830FixupOffsets(ScrnInfoPtr pScrn);
extern Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
extern Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
-extern Bool I830BindGARTMemory(int screenNum, int key, unsigned long offset);
-extern Bool I830UnbindGARTMemory(int screenNum, int key);
extern unsigned long I830AllocVidMem(ScrnInfoPtr pScrn, I830MemRange *result,
I830MemPool *pool, long size,
unsigned long alignment, int flags);
@@ -482,20 +480,6 @@ extern int I830GetBestRefresh(ScrnInfoPtr pScrn, int refresh);
extern Bool I830CheckModeSupport(ScrnInfoPtr pScrn, int x, int y, int mode);
extern Bool I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode);
extern Bool I830FixOffset(ScrnInfoPtr pScrn, I830MemRange *mem);
-
-/* AGP */
-extern Bool I830AgpGARTSupported(void);
-extern AgpInfoPtr I830GetAGPInfo(int screenNum);
-extern Bool I830AcquireGART(int screenNum);
-extern Bool I830ReleaseGART(int screenNum);
-extern int I830AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical);
-extern Bool I830DeallocateGARTMemory(int screenNum, int key);
-extern Bool I830BindGARTMemory(int screenNum, int key, unsigned long offset);
-extern Bool I830UnbindGARTMemory(int screenNum, int key);
-extern Bool I830EnableAGP(int screenNum, CARD32 mode);
-extern Bool I830GARTCloseScreen(int screenNum);
-
/*
* 12288 is set as the maximum, chosen because it is enough for
* 1920x1440@32bpp with a 2048 pixel line pitch with some to spare.
diff --git a/src/i830_agp.c b/src/i830_agp.c
deleted file mode 100644
index aba5bcf7..00000000
--- a/src/i830_agp.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Abstraction of the AGP GART interface.
- *
- * This version is for both Linux and FreeBSD.
- *
- * Copyright © 2000 VA Linux Systems, Inc.
- * Copyright © 2001 The XFree86 Project, Inc.
- */
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c,v 3.11 2003/04/03 22:47:42 dawes Exp $ */
-
-#if defined(linux)
-#include <sys/types.h>
-#include <linux/agpgart.h>
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/agpio.h>
-#include <sys/errno.h>
-#include <sys/fcntl.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-#include "i830.h"
-
-
-#ifndef AGP_DEVICE
-#define AGP_DEVICE "/dev/agpgart"
-#endif
-/* AGP page size is independent of the host page size. */
-#ifndef AGP_PAGE_SIZE
-#define AGP_PAGE_SIZE 4096
-#endif
-#define AGPGART_MAJOR_VERSION 0
-#define AGPGART_MINOR_VERSION 99
-
-static int gartFd = -1;
-static int acquiredScreen = -1;
-static Bool initDone = FALSE;
-/*
- * Close /dev/agpgart. This frees all associated memory allocated during
- * this server generation.
- */
-Bool
-I830GARTCloseScreen(int screenNum)
-{
- if(gartFd != -1) {
- close(gartFd);
- acquiredScreen = -1;
- gartFd = -1;
- initDone = FALSE;
- }
- return TRUE;
-}
-
-/*
- * Open /dev/agpgart. Keep it open until I830GARTCloseScreen is called.
- */
-static Bool
-GARTInit(int screenNum)
-{
- struct _agp_info agpinf;
-
- if (initDone)
- return (gartFd != -1);
-
- initDone = TRUE;
-
- if (gartFd == -1)
- gartFd = open(AGP_DEVICE, O_RDWR, 0);
- else
- return FALSE;
-
- if (gartFd == -1) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830GARTInit: Unable to open " AGP_DEVICE " (%s)\n",
- strerror(errno));
- return FALSE;
- }
-
- I830AcquireGART(-1);
- /* Check the kernel driver version. */
- if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830GARTInit: AGPIOC_INFO failed (%s)\n", strerror(errno));
- close(gartFd);
- gartFd = -1;
- return FALSE;
- }
- I830ReleaseGART(-1);
-
-#if defined(linux)
- /* Per Dave Jones, every effort will be made to keep the
- * agpgart interface backwards compatible, so allow all
- * future versions.
- */
- if (
-#if (AGPGART_MAJOR_VERSION > 0) /* quiet compiler */
- agpinf.version.major < AGPGART_MAJOR_VERSION ||
-#endif
- (agpinf.version.major == AGPGART_MAJOR_VERSION &&
- agpinf.version.minor < AGPGART_MINOR_VERSION)) {
- xf86DrvMsg(screenNum, X_ERROR,
- "GARTInit: Kernel agpgart driver version is not current"
- " (%d.%d vs %d.%d)\n",
- agpinf.version.major, agpinf.version.minor,
- AGPGART_MAJOR_VERSION, AGPGART_MINOR_VERSION);
- close(gartFd);
- gartFd = -1;
- return FALSE;
- }
-#endif
-
- return TRUE;
-}
-
-Bool
-I830AgpGARTSupported()
-{
- return GARTInit(-1);
-}
-
-AgpInfoPtr
-I830GetAGPInfo(int screenNum)
-{
- struct _agp_info agpinf;
- AgpInfoPtr info;
-
- if (!GARTInit(screenNum))
- return NULL;
-
-
- if ((info = xcalloc(sizeof(AgpInfo), 1)) == NULL) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830GetAGPInfo: Failed to allocate AgpInfo\n");
- return NULL;
- }
-
- if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830GetAGPInfo: AGPIOC_INFO failed (%s)\n",
- strerror(errno));
- return NULL;
- }
-
- info->bridgeId = agpinf.bridge_id;
- info->agpMode = agpinf.agp_mode;
- info->base = agpinf.aper_base;
- info->size = agpinf.aper_size;
- info->totalPages = agpinf.pg_total;
- info->systemPages = agpinf.pg_system;
- info->usedPages = agpinf.pg_used;
-
- return info;
-}
-
-/*
- * XXX If multiple screens can acquire the GART, should we have a reference
- * count instead of using acquiredScreen?
- */
-
-Bool
-I830AcquireGART(int screenNum)
-{
- if (screenNum != -1 && !GARTInit(screenNum))
- return FALSE;
-
- if (screenNum == -1 || acquiredScreen != screenNum) {
- if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "I830AcquireGART: AGPIOC_ACQUIRE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = screenNum;
- }
- return TRUE;
-}
-
-Bool
-I830ReleaseGART(int screenNum)
-{
- if (screenNum != -1 && !GARTInit(screenNum))
- return FALSE;
-
- if (acquiredScreen == screenNum) {
- /*
- * The FreeBSD agp driver removes allocations on release.
- * The Linux driver doesn't. I830ReleaseGART() is expected
- * to give up access to the GART, but not to remove any
- * allocations.
- */
-#if !defined(linux)
- if (screenNum == -1)
-#endif
- {
- if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "I830ReleaseGART: AGPIOC_RELEASE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = -1;
- }
- return TRUE;
- }
- return FALSE;
-}
-
-int
-I830AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical)
-{
- struct _agp_allocate alloc;
- int pages;
-
- /*
- * Allocates "size" bytes of GART memory (rounds up to the next
- * page multiple) or type "type". A handle (key) for the allocated
- * memory is returned. On error, the return value is -1.
- */
-
- if (!GARTInit(screenNum) || acquiredScreen != screenNum)
- return -1;
-
- pages = (size / AGP_PAGE_SIZE);
- if (size % AGP_PAGE_SIZE != 0)
- pages++;
-
- /* XXX check for pages == 0? */
-
- alloc.pg_count = pages;
- alloc.type = type;
-
- if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) {
- if (type != 3)
- xf86DrvMsg(screenNum, X_WARNING, "I830AllocateGARTMemory: "
- "allocation of %d pages failed\n\t(%s)\n", pages,
- strerror(errno));
- return -1;
- }
-
- if (physical)
- *physical = alloc.physical;
-
- return alloc.key;
-}
-
-Bool
-I830DeallocateGARTMemory(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, (int *)key) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,"I830DeAllocateGARTMemory: "
- "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
-I830BindGARTMemory(int screenNum, int key, unsigned long offset)
-{
- struct _agp_bind bind;
- int pageOffset;
-
- if (!GARTInit(screenNum) || acquiredScreen != screenNum)
- return FALSE;
-
- if (acquiredScreen != screenNum) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830BindGARTMemory: AGP not acquired by this screen\n");
- return FALSE;
- }
-
- if (offset % AGP_PAGE_SIZE != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "I830BindGARTMemory: "
- "offset (0x%lx) is not page-aligned (%d)\n",
- offset, AGP_PAGE_SIZE);
- return FALSE;
- }
- pageOffset = offset / AGP_PAGE_SIZE;
-
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "I830BindGARTMemory: bind key %d at 0x%08lx "
- "(pgoffset %d)\n", key, offset, pageOffset);
-
- bind.pg_start = pageOffset;
- bind.key = key;
-
- if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "I830BindGARTMemory: "
- "binding of gart memory with key %d\n"
- "\tat offset 0x%lx failed (%s)\n",
- key, offset, strerror(errno));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/* Unbind GART memory with "key" */
-Bool
-I830UnbindGARTMemory(int screenNum, int key)
-{
- struct _agp_unbind unbind;
-
- if (!GARTInit(screenNum) || acquiredScreen != screenNum)
- return FALSE;
-
- if (acquiredScreen != screenNum) {
- xf86DrvMsg(screenNum, X_ERROR,
- "I830UnbindGARTMemory: AGP not acquired by this screen\n");
- return FALSE;
- }
-
- unbind.priority = 0;
- unbind.key = key;
-
- if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "I830UnbindGARTMemory: "
- "unbinding of gart memory with key %d "
- "failed (%s)\n", key, strerror(errno));
- return FALSE;
- }
-
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "I830UnbindGARTMemory: unbind key %d\n", key);
-
- return TRUE;
-}
-
-
-/* XXX Interface may change. */
-Bool
-I830EnableAGP(int screenNum, CARD32 mode)
-{
- agp_setup setup;
-
- if (!GARTInit(screenNum) || acquiredScreen != screenNum)
- return FALSE;
-
- setup.agp_mode = mode;
- if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "I830EnableAGP: "
- "AGPIOC_SETUP with mode %ld failed (%s)\n",
- (unsigned long)mode, strerror(errno));
- return FALSE;
- }
-
- return TRUE;
-}
-
diff --git a/src/i830_driver.c b/src/i830_driver.c
index d36ff3ea..1e1e02df 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -6090,7 +6090,7 @@ I830BIOSCloseScreen(int scrnIndex, ScreenPtr pScreen)
}
if (I830IsPrimary(pScrn)) {
- I830GARTCloseScreen(scrnIndex);
+ xf86GARTCloseScreen(scrnIndex);
xfree(pI830->LpRing);
pI830->LpRing = NULL;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index e5c92151..accc0a76 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -210,15 +210,15 @@ AllocFromAGP(ScrnInfoPtr pScrn, I830MemRange *result, long size,
return 0;
if (flags & NEED_PHYSICAL_ADDR) {
- result->Key = I830AllocateGARTMemory(pScrn->scrnIndex, size, 2,
+ result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 2,
&(result->Physical));
} else {
/* Due to a bug in agpgart in 2.6 kernels resulting in very poor
* allocation performance we need to workaround it here...
*/
- result->Key = I830AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
+ result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
if (result->Key == -1)
- result->Key = I830AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
+ result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
}
if (result->Key == -1)
return 0;
@@ -248,7 +248,7 @@ I830FreeVidMem(ScrnInfoPtr pScrn, I830MemRange *range)
return;
if (range->Key != -1)
- I830DeallocateGARTMemory(pScrn->scrnIndex, range->Key);
+ xf86DeallocateGARTMemory(pScrn->scrnIndex, range->Key);
if (range->Pool) {
/*
@@ -635,7 +635,7 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags)
BOOLTOSTRING(flags & ALLOC_INITIAL));
if (!pI830->StolenOnly &&
- (!I830AgpGARTSupported() || !I830AcquireGART(pScrn->scrnIndex))) {
+ (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex))) {
if (!dryrun) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"AGP GART support is either not available or cannot "
@@ -977,9 +977,9 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags)
* allocation performance we need to workaround it here...
*/
pI830->Dummy.Key =
- I830AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
+ xf86AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
if (pI830->Dummy.Key == -1)
- pI830->Dummy.Key = I830AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
+ pI830->Dummy.Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
pI830->Dummy.Offset = 0;
}
#endif
@@ -1403,10 +1403,10 @@ I830DoPoolAllocation(ScrnInfoPtr pScrn, I830MemPool *pool)
* allocation performance we need to workaround it here...
*/
pool->Allocated.Key =
- I830AllocateGARTMemory(pScrn->scrnIndex, pool->Allocated.Size,
+ xf86AllocateGARTMemory(pScrn->scrnIndex, pool->Allocated.Size,
3, NULL);
if (pool->Allocated.Key == -1)
- pool->Allocated.Key = I830AllocateGARTMemory(pScrn->scrnIndex,
+ pool->Allocated.Key = xf86AllocateGARTMemory(pScrn->scrnIndex,
pool->Allocated.Size, 0, NULL);
if (pool->Allocated.Key == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Pool allocation failed\n");
@@ -1865,7 +1865,7 @@ BindMemRange(ScrnInfoPtr pScrn, I830MemRange *mem)
if (mem->Key == -1)
return TRUE;
- return I830BindGARTMemory(pScrn->scrnIndex, mem->Key, mem->Offset);
+ return xf86BindGARTMemory(pScrn->scrnIndex, mem->Key, mem->Offset);
}
Bool
@@ -1880,8 +1880,8 @@ I830BindAGPMemory(ScrnInfoPtr pScrn)
if (pI830->StolenOnly == TRUE)
return TRUE;
- if (I830AgpGARTSupported() && !pI830->GttBound) {
- if (!I830AcquireGART(pScrn->scrnIndex))
+ if (xf86AgpGARTSupported() && !pI830->GttBound) {
+ if (!xf86AcquireGART(pScrn->scrnIndex))
return FALSE;
#if REMAP_RESERVED
@@ -1950,7 +1950,7 @@ UnbindMemRange(ScrnInfoPtr pScrn, I830MemRange *mem)
if (mem->Key == -1)
return TRUE;
- return I830UnbindGARTMemory(pScrn->scrnIndex, mem->Key);
+ return xf86UnbindGARTMemory(pScrn->scrnIndex, mem->Key);
}
@@ -1966,7 +1966,7 @@ I830UnbindAGPMemory(ScrnInfoPtr pScrn)
if (pI830->StolenOnly == TRUE)
return TRUE;
- if (I830AgpGARTSupported() && pI830->GttBound) {
+ if (xf86AgpGARTSupported() && pI830->GttBound) {
#if REMAP_RESERVED
/* "unbind" the pre-allocated region. */
@@ -2019,7 +2019,7 @@ I830UnbindAGPMemory(ScrnInfoPtr pScrn)
return FALSE;
}
#endif
- if (!I830ReleaseGART(pScrn->scrnIndex))
+ if (!xf86ReleaseGART(pScrn->scrnIndex))
return FALSE;
pI830->GttBound = 0;
@@ -2034,10 +2034,10 @@ I830CheckAvailableMemory(ScrnInfoPtr pScrn)
AgpInfoPtr agpinf;
int maxPages;
- if (!I830AgpGARTSupported() ||
- !I830AcquireGART(pScrn->scrnIndex) ||
- (agpinf = I830GetAGPInfo(pScrn->scrnIndex)) == NULL ||
- !I830ReleaseGART(pScrn->scrnIndex))
+ if (!xf86AgpGARTSupported() ||
+ !xf86AcquireGART(pScrn->scrnIndex) ||
+ (agpinf = xf86GetAGPInfo(pScrn->scrnIndex)) == NULL ||
+ !xf86ReleaseGART(pScrn->scrnIndex))
return -1;
maxPages = agpinf->totalPages - agpinf->usedPages;
diff --git a/src/i830_rotate.c b/src/i830_rotate.c
index d0d9cf2d..82b2c5d9 100644
--- a/src/i830_rotate.c
+++ b/src/i830_rotate.c
@@ -737,17 +737,17 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
if (pI8301->TexMem.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key);
I830FreeVidMem(pScrn1, &(pI8301->TexMem));
if (pI8301->StolenPool.Allocated.Key != -1) {
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key);
- I830DeallocateGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key);
+ xf86DeallocateGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key);
}
if (pI8301->DepthBuffer.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key);
I830FreeVidMem(pScrn1, &(pI8301->DepthBuffer));
if (pI8301->BackBuffer.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key);
I830FreeVidMem(pScrn1, &(pI8301->BackBuffer));
}
#endif
@@ -756,7 +756,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
*pI830->used3D |= 1<<31; /* use high bit to denote new rotation occured */
if (pI8301->RotatedMem.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
I830FreeVidMem(pScrn1, &(pI8301->RotatedMem));
memset(&(pI8301->RotatedMem), 0, sizeof(pI8301->RotatedMem));
@@ -764,7 +764,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
if (pI830->entityPrivate) {
if (pI8301->RotatedMem2.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key);
I830FreeVidMem(pScrn1, &(pI8301->RotatedMem2));
memset(&(pI8301->RotatedMem2), 0, sizeof(pI8301->RotatedMem2));
@@ -832,7 +832,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
I830FixOffset(pScrn1, &(pI8301->RotatedMem2));
if (pI8301->RotatedMem2.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key, pI8301->RotatedMem2.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key, pI8301->RotatedMem2.Offset);
}
}
@@ -843,7 +843,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
I830FixOffset(pScrn1, &(pI8301->RotatedMem));
if (pI8301->RotatedMem.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key, pI8301->RotatedMem.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key, pI8301->RotatedMem.Offset);
}
}
@@ -898,13 +898,13 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
I830FixOffset(pScrn1, &(pI8301->DepthBuffer));
if (pI8301->BackBuffer.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key, pI8301->BackBuffer.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key, pI8301->BackBuffer.Offset);
if (pI8301->DepthBuffer.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key, pI8301->DepthBuffer.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key, pI8301->DepthBuffer.Offset);
if (pI8301->StolenPool.Allocated.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key, pI8301->StolenPool.Allocated.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key, pI8301->StolenPool.Allocated.Offset);
if (pI8301->TexMem.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key, pI8301->TexMem.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key, pI8301->TexMem.Offset);
I830SetupMemoryTiling(pScrn1);
/* update fence registers */
for (i = 0; i < 8; i++)
@@ -992,7 +992,7 @@ BAIL3:
BAIL2:
if (pI8301->rotation != RR_Rotate_0) {
if (pI8301->RotatedMem.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
I830FreeVidMem(pScrn1, &(pI8301->RotatedMem));
memset(&(pI8301->RotatedMem), 0, sizeof(pI8301->RotatedMem));
@@ -1002,7 +1002,7 @@ BAIL1:
if (pI830->entityPrivate) {
if (pI8302->rotation != RR_Rotate_0) {
if (pI8301->RotatedMem.Key != -1)
- I830UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
+ xf86UnbindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key);
I830FreeVidMem(pScrn1, &(pI8301->RotatedMem));
memset(&(pI8301->RotatedMem), 0, sizeof(pI8301->RotatedMem));
@@ -1041,7 +1041,7 @@ BAIL0:
I830FixOffset(pScrn1, &(pI8301->RotatedMem2));
if (pI8301->RotatedMem2.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key, pI8301->RotatedMem2.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem2.Key, pI8301->RotatedMem2.Offset);
}
}
@@ -1053,7 +1053,7 @@ BAIL0:
I830FixOffset(pScrn1, &(pI8301->RotatedMem));
if (pI8301->RotatedMem.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key, pI8301->RotatedMem.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->RotatedMem.Key, pI8301->RotatedMem.Offset);
}
shadowRemove (pScrn->pScreen, NULL);
@@ -1132,13 +1132,13 @@ BAIL0:
I830FixOffset(pScrn1, &(pI8301->DepthBuffer));
if (pI8301->BackBuffer.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key, pI8301->BackBuffer.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->BackBuffer.Key, pI8301->BackBuffer.Offset);
if (pI8301->DepthBuffer.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key, pI8301->DepthBuffer.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->DepthBuffer.Key, pI8301->DepthBuffer.Offset);
if (pI8301->StolenPool.Allocated.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key, pI8301->StolenPool.Allocated.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->StolenPool.Allocated.Key, pI8301->StolenPool.Allocated.Offset);
if (pI8301->TexMem.Key != -1)
- I830BindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key, pI8301->TexMem.Offset);
+ xf86BindGARTMemory(pScrn1->scrnIndex, pI8301->TexMem.Key, pI8301->TexMem.Offset);
I830SetupMemoryTiling(pScrn1);
/* update fence registers */
for (i = 0; i < 8; i++)