summaryrefslogtreecommitdiff
path: root/driver/xf86-video-intel/src/i830_xaa.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-25 20:16:45 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-25 20:16:45 +0000
commit1968cea3515172a985c8cad914ead74b3621d8ff (patch)
tree14f241250ecdc59597ec213a3b8f898fd5794bb8 /driver/xf86-video-intel/src/i830_xaa.c
parentf3606649643e49df0add499c50a7d11e99f0d4f5 (diff)
update to xf86-video-intel 2.7.1. Tested by many.
Diffstat (limited to 'driver/xf86-video-intel/src/i830_xaa.c')
-rw-r--r--driver/xf86-video-intel/src/i830_xaa.c85
1 files changed, 13 insertions, 72 deletions
diff --git a/driver/xf86-video-intel/src/i830_xaa.c b/driver/xf86-video-intel/src/i830_xaa.c
index c9c26b071..1f82840d0 100644
--- a/driver/xf86-video-intel/src/i830_xaa.c
+++ b/driver/xf86-video-intel/src/i830_xaa.c
@@ -91,7 +91,6 @@ static void I830SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
int skipleft);
static void I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
#endif
-static void I830RestoreAccelState(ScrnInfoPtr pScrn);
void
i830_xaa_composite(CARD8 op,
@@ -160,23 +159,10 @@ I830XAAInit(ScreenPtr pScreen)
}
- /* On the primary screen */
- if (pI830->init == 0) {
- if (pI830->xaa_scratch->size != 0) {
- width = ((pScrn->displayWidth + 31) & ~31) / 8;
- nr_buffers = pI830->xaa_scratch->size / width;
- ptr = pI830->FbBase + pI830->xaa_scratch->offset;
- }
- } else {
- /* On the secondary screen */
- I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
- if (pI8301->xaa_scratch_2->size != 0) {
- width = ((pScrn->displayWidth + 31) & ~31) / 8;
- nr_buffers = pI8301->xaa_scratch_2->size / width;
- /* We have to use the primary screen's FbBase, as that's where
- * we allocated xaa_scratch_2, so we get the correct pointer */
- ptr = pI8301->FbBase + pI8301->xaa_scratch_2->offset;
- }
+ if (pI830->xaa_scratch->size != 0) {
+ width = ((pScrn->displayWidth + 31) & ~31) / 8;
+ nr_buffers = pI830->xaa_scratch->size / width;
+ ptr = pI830->FbBase + pI830->xaa_scratch->offset;
}
if (nr_buffers) {
@@ -223,17 +209,6 @@ I830XAAInit(ScreenPtr pScreen)
#endif
}
- {
- Bool shared_accel = FALSE;
-
- for(i = 0; i < pScrn->numEntities; i++) {
- if(xf86IsEntityShared(pScrn->entityList[i]))
- shared_accel = TRUE;
- }
- if(shared_accel == TRUE)
- infoPtr->RestoreAccelState = I830RestoreAccelState;
- }
-
/* Set up pI830->bufferOffset */
I830SelectBuffer(pScrn, I830_SELECT_FRONT);
@@ -292,12 +267,6 @@ I830CheckTiling(ScrnInfoPtr pScrn)
{
return TRUE;
}
- if (pI830->third_buffer != NULL &&
- pI830->bufferOffset == pI830->third_buffer->offset &&
- pI830->third_buffer->tiling != TILE_NONE)
- {
- return TRUE;
- }
#endif
return FALSE;
@@ -314,7 +283,7 @@ I830SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
color, rop, planemask);
if (IS_I965G(pI830) && I830CheckTiling(pScrn)) {
- pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 4;
+ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 2;
} else {
pI830->BR[13] = (pScrn->displayWidth * pI830->cpp);
}
@@ -385,7 +354,7 @@ I830SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop,
xdir, ydir, rop, planemask, transparency_color);
if (IS_I965G(pI830) && I830CheckTiling(pScrn)) {
- pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 4;
+ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 2;
} else {
pI830->BR[13] = (pScrn->displayWidth * pI830->cpp);
}
@@ -468,7 +437,7 @@ I830SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int pattx, int patty,
pI830->BR[19] = fg;
if (IS_I965G(pI830) && I830CheckTiling(pScrn)) {
- pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 4;
+ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 2;
} else {
pI830->BR[13] = (pScrn->displayWidth * pI830->cpp);
}
@@ -565,7 +534,7 @@ I830SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
/* Fill out register values */
if (IS_I965G(pI830) && I830CheckTiling(pScrn)) {
- pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 4;
+ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 2;
} else {
pI830->BR[13] = (pScrn->displayWidth * pI830->cpp);
}
@@ -613,17 +582,8 @@ I830SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
I830Ptr pI830 = I830PTR(pScrn);
unsigned int tiled = I830CheckTiling(pScrn);
- if (pI830->init == 0) {
- pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
- pI830->FbBase);
- } else {
- I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-
- /* We have to use the primary screen's FbBase, as that's where
- * we allocated xaa_scratch_2, so we get the correct pointer */
- pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
- pI8301->FbBase);
- }
+ pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
+ pI830->FbBase);
if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
ErrorF("I830SubsequentColorExpandScanline %d (addr %x)\n",
@@ -671,7 +631,7 @@ I830SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop,
/* Fill out register values */
if (IS_I965G(pI830) && I830CheckTiling(pScrn)) {
- pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 4;
+ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp) >> 2;
} else {
pI830->BR[13] = (pScrn->displayWidth * pI830->cpp);
}
@@ -713,17 +673,8 @@ I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
I830Ptr pI830 = I830PTR(pScrn);
unsigned int tiled = I830CheckTiling(pScrn);
- if (pI830->init == 0) {
- pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
- pI830->FbBase);
- } else {
- I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-
- /* We have to use the primary screen's FbBase, as that's where
- * we allocated xaa_scratch_2, so we get the correct pointer */
- pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
- pI8301->FbBase);
- }
+ pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
+ pI830->FbBase);
if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
ErrorF("I830SubsequentImageWriteScanline %d (addr %x)\n",
@@ -876,13 +827,3 @@ fallback:
pI830->saved_composite = ps->Composite;
ps->Composite = i830_xaa_composite;
}
-
-static void
-I830RestoreAccelState(ScrnInfoPtr pScrn)
-{
-#if 0
- /* might be needed, but everything is on a ring, so I don't think so */
- I830Sync(pScrn);
-#endif
-}
-