summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhartmann <jhartmann>2000-08-28 18:37:54 +0000
committerjhartmann <jhartmann>2000-08-28 18:37:54 +0000
commitadf7258cd234dd684afea2cfea3cc7c539175764 (patch)
tree90f147f10854c1b9cce46b4b2203e2244da6139e
parent525c490ceadde433dc10d335070bae68529d9100 (diff)
Removed clearing of front buffer from I810DRIInitBuffers, + some server regen fixes
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c3
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c21
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c11
3 files changed, 17 insertions, 18 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
index 4695e7b30..4713fa6c8 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
@@ -894,9 +894,6 @@ I810DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index)
I810SetupForSolidFill(pScrn, 0, GXcopy, -1);
while (nbox--) {
- I810SelectBuffer(pScrn, I810_FRONT);
- I810SubsequentSolidFillRect(pScrn, pbox->x1, pbox->y1,
- pbox->x2-pbox->x1, pbox->y2-pbox->y1);
I810SelectBuffer(pScrn, I810_BACK);
I810SubsequentSolidFillRect(pScrn, pbox->x1, pbox->y1,
pbox->x2-pbox->x1, pbox->y2-pbox->y1);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
index f105f9e4e..50bfb76cf 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
@@ -1930,20 +1930,23 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
I810Ptr pI810 = I810PTR(pScrn);
XAAInfoRecPtr infoPtr = pI810->AccelInfoRec;
-
+ if (pScrn->vtSema == TRUE) {
+ I810Restore(pScrn);
+ vgaHWLock(hwp);
+ }
#ifdef XF86DRI
- if (pI810->directRenderingEnabled) {
- I810DRICloseScreen(pScreen);
- pI810->directRenderingEnabled=FALSE;
- }
+ if (pI810->directRenderingEnabled) {
+ I810DRICloseScreen(pScreen);
+ pI810->directRenderingEnabled=FALSE;
+ }
#endif
+ if (pScrn->vtSema == TRUE) {
+ I810UnbindGARTMemory(pScrn);
+ }
- if(pScrn->vtSema == TRUE) I810UnbindGARTMemory(pScrn);
- I810Restore(pScrn);
- vgaHWLock(hwp);
I810UnmapMem(pScrn);
vgaHWUnmapMem(pScrn);
-
+
if (pI810->ScanlineColorExpandBuffers) {
xfree(pI810->ScanlineColorExpandBuffers);
pI810->ScanlineColorExpandBuffers = 0;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
index c6fbeb34a..04dae03d7 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
@@ -61,7 +61,6 @@ int I810AllocLow( I810MemRange *result, I810MemRange *pool, int size )
return 1;
}
-
int I810AllocHigh( I810MemRange *result, I810MemRange *pool, int size )
{
if (size > pool->Size) return 0;
@@ -73,7 +72,6 @@ int I810AllocHigh( I810MemRange *result, I810MemRange *pool, int size )
return 1;
}
-
int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
{
#ifdef AGPIOC_ACQUIRE
@@ -85,6 +83,11 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
long tom = 0;
int gartfd = -1;
+ if (pI810->agpAcquired2d == TRUE) {
+ I810BindGARTMemory(pScrn);
+ return TRUE;
+ }
+
gartfd = open("/dev/agpgart", O_RDWR, 0);
if (gartfd == -1) {
@@ -93,10 +96,6 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
}
if (ioctl(gartfd, AGPIOC_ACQUIRE, 0) != 0) {
- if(pI810->agpAcquired2d == TRUE) {
- close(gartfd);
- return TRUE;
- }
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "AGPIOC_ACQUIRE failed\n");
return FALSE;
}