summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-12-11 13:16:53 -0800
committerIan Romanick <idr@us.ibm.com>2006-12-11 13:16:53 -0800
commit36c444e80324c82f7d02d9d95372123c923336a0 (patch)
tree1989fec6bbe1d5546e431ca774441aa2550c10bc
parentf2191d412832312b494f313841d094f87f64a5ff (diff)
parente361a9523394a2f0558f7d2648bf6a43ebe31f2e (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage into pci-rework
Conflicts: src/savage_driver.c
-rw-r--r--configure.ac4
-rw-r--r--src/savage_dri.c20
-rw-r--r--src/savage_driver.c20
-rw-r--r--src/savage_driver.h7
-rw-r--r--src/savage_exa.c3
5 files changed, 34 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 75bc26a..1ffacad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-savage],
- 2.1.1,
+ 2.1.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-savage)
@@ -59,7 +59,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.1.0 xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
diff --git a/src/savage_dri.c b/src/savage_dri.c
index 432df3d..41e8bb1 100644
--- a/src/savage_dri.c
+++ b/src/savage_dri.c
@@ -338,7 +338,9 @@ static void SAVAGEWakeupHandler( int screenNum, pointer wakeupData,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
SavagePtr psav = SAVPTR(pScrn);
- DRILock(pScreen, 0);
+ psav->pDRIInfo->wrap.WakeupHandler = psav->coreWakeupHandler;
+ (*psav->pDRIInfo->wrap.WakeupHandler) (screenNum, wakeupData, result, pReadmask);
+ psav->pDRIInfo->wrap.WakeupHandler = SAVAGEWakeupHandler;
psav->LockHeld = 1;
if (psav->ShadowStatus) {
/* fetch the global shadow counter */
@@ -350,7 +352,10 @@ static void SAVAGEWakeupHandler( int screenNum, pointer wakeupData,
#endif
psav->ShadowCounter = psav->ShadowVirtual[1023] & 0xffff;
}
- psav->AccelInfoRec->NeedToSync = TRUE;
+ if (psav->useEXA)
+ exaMarkSync(pScreen);
+ else
+ psav->AccelInfoRec->NeedToSync = TRUE;
/* FK: this flag doesn't seem to be used. */
}
@@ -376,7 +381,9 @@ static void SAVAGEBlockHandler( int screenNum, pointer blockData,
psav->ShadowVirtual[1023] = globalShadowCounter;
}
psav->LockHeld = 0;
- DRIUnlock(pScreen);
+ psav->pDRIInfo->wrap.BlockHandler = psav->coreBlockHandler;
+ (*psav->pDRIInfo->wrap.BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
+ psav->pDRIInfo->wrap.BlockHandler = SAVAGEBlockHandler;
}
void SAVAGESelectBuffer( ScrnInfoPtr pScrn, int which )
@@ -888,7 +895,9 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScreen )
pDRIInfo->ddxDrawableTableEntry = SAVAGE_MAX_DRAWABLES;
/* override default DRI block and wakeup handler */
+ psav->coreBlockHandler = pDRIInfo->wrap.BlockHandler;
pDRIInfo->wrap.BlockHandler = SAVAGEBlockHandler;
+ psav->coreWakeupHandler = pDRIInfo->wrap.WakeupHandler;
pDRIInfo->wrap.WakeupHandler = SAVAGEWakeupHandler;
pDRIInfo->wrap.ValidateTree = NULL;
@@ -1529,7 +1538,10 @@ SAVAGEDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
}
BCI_SEND(0xc0020000); /* wait for 2D idle */
- psav->AccelInfoRec->NeedToSync = TRUE;
+ if (psav->useEXA)
+ exaMarkSync(pScreen);
+ else
+ psav->AccelInfoRec->NeedToSync = TRUE;
}
static void
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 2ac254d..c76147f 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -1587,6 +1587,13 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
/* maybe throw in some more sanity checks here */
+ if (!SavageMapMem(pScrn)) {
+ SavageFreeRec(pScrn);
+ vbeFree(psav->pVbe);
+ psav->pVbe = NULL;
+ return FALSE;
+ }
+
vgaCRIndex = psav->vgaIOBase + 4;
vgaCRReg = psav->vgaIOBase + 5;
@@ -1773,6 +1780,9 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
pScrn->videoRam);
}
+ pScrn->fbOffset = (psav->IsSecondary)
+ ? pScrn->videoRam * 1024 : 0;
+
/* reset graphics engine to avoid memory corruption */
VGAOUT8(vgaCRIndex, 0x66);
cr66 = VGAIN8(vgaCRReg);
@@ -1783,13 +1793,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
VGAOUT8(vgaCRReg, cr66 & ~0x02); /* clear reset flag */
usleep(10000);
- if (!SavageMapMem(pScrn)) {
- SavageFreeRec(pScrn);
- vbeFree(psav->pVbe);
- psav->pVbe = NULL;
- return FALSE;
- }
-
/* Set status word positions based on chip type. */
SavageInitStatus(pScrn);
@@ -2834,9 +2837,6 @@ static Bool SavageMapMem(ScrnInfoPtr pScrn)
psav->ApertureMap += 0x1000000;
}
- pScrn->fbOffset = (psav->IsSecondary)
- ? pScrn->videoRam * 1024 : 0;
-
pScrn->memPhysBase = psav->PciInfo->regions[0].base_addr;
return TRUE;
diff --git a/src/savage_driver.h b/src/savage_driver.h
index 5314592..159f561 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -180,10 +180,10 @@ typedef struct
#define SAVAGE_TV_ON 4
#define SAVAGE_DRIVER_NAME "savage"
-#define SAVAGE_DRIVER_VERSION "2.1.1"
+#define SAVAGE_DRIVER_VERSION "2.1.2"
#define SAVAGE_VERSION_MAJOR 2
#define SAVAGE_VERSION_MINOR 1
-#define SAVAGE_PATCHLEVEL 1
+#define SAVAGE_PATCHLEVEL 2
#define SAVAGE_VERSION ((SAVAGE_VERSION_MAJOR << 24) | \
(SAVAGE_VERSION_MINOR << 16) | \
SAVAGE_PATCHLEVEL)
@@ -446,7 +446,8 @@ typedef struct _Savage {
__GLXvisualConfig* pVisualConfigs;
SAVAGEConfigPrivPtr pVisualConfigsPriv;
SAVAGEDRIServerPrivatePtr DRIServerInfo;
-
+ ScreenWakeupHandlerProcPtr coreWakeupHandler;
+ ScreenBlockHandlerProcPtr coreBlockHandler;
#if 0
Bool haveQuiescense;
diff --git a/src/savage_exa.c b/src/savage_exa.c
index 942fe86..8e6da38 100644
--- a/src/savage_exa.c
+++ b/src/savage_exa.c
@@ -431,13 +431,14 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
/*ErrorF("in UTS\n");*/
- psav->WaitQueue(psav, 5);
+ psav->WaitQueue(psav, 6);
BCI_SEND(cmd);
/* dst */
BCI_SEND(psav->sbd_offset);
BCI_SEND(psav->sbd_high);
+ BCI_SEND(BCI_CLIP_LR(x, x+w-1));
BCI_SEND(BCI_X_Y(x, y));
BCI_SEND(BCI_W_H(w, h));