xf86-video-intel: Branch 'exa' - 4 commits - src/i830_exa.c src/i915_exa_render.c
Eric Anholt
anholt at kemper.freedesktop.org
Thu Sep 14 21:17:23 EEST 2006
src/i830_exa.c | 61 ++++++++++++++++++++------------------------------
src/i915_exa_render.c | 10 --------
2 files changed, 25 insertions(+), 46 deletions(-)
New commits:
diff-tree bd758030a6a59af32f9d73655cb691e018e94a7d (from f46c70e877a3432ba23696e1a16d5906183876af)
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 14 11:12:03 2006 -0700
Add a compile flag to enable syncing after each operation in EXA.
This replaces other debug sync options sprinkled around the EXA code. It
doesn't change the mis-rendering of text on the 915.
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 6a7028f..c633747 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -41,6 +41,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#define DEBUG_I830FALLBACK 1
#endif
+#define ALWAYS_SYNC 1
+
#ifdef DEBUG_I830FALLBACK
#define I830FALLBACK(s, arg...) \
do { \
@@ -206,7 +208,11 @@ I830EXASolid(PixmapPtr pPixmap, int x1,
static void
I830EXADoneSolid(PixmapPtr pPixmap)
{
- return;
+#if ALWAYS_SYNC
+ ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
+
+ I830Sync(pScrn);
+#endif
}
/**
@@ -281,7 +287,11 @@ I830EXACopy(PixmapPtr pDstPixmap, int sr
static void
I830EXADoneCopy(PixmapPtr pDstPixmap)
{
- return;
+#if ALWAYS_SYNC
+ ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+
+ I830Sync(pScrn);
+#endif
}
static void
@@ -399,17 +409,16 @@ IntelEXAComposite(PixmapPtr pDst, int sr
}
ADVANCE_LP_RING();
}
-#ifdef I830DEBUG
- ErrorF("sync after 3dprimitive");
- I830Sync(pScrn);
-#endif
-
}
static void
IntelEXADoneComposite(PixmapPtr pDst)
{
- return;
+#if ALWAYS_SYNC
+ ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+
+ I830Sync(pScrn);
+#endif
}
/*
* TODO:
diff --git a/src/i915_exa_render.c b/src/i915_exa_render.c
index cb96898..62b2507 100644
--- a/src/i915_exa_render.c
+++ b/src/i915_exa_render.c
@@ -312,11 +312,6 @@ I915TextureSetup(PicturePtr pPict, Pixma
is_transform[unit] = FALSE;
}
-#ifdef I830DEBUG
- ErrorF("try to sync to show any errors...");
- I830Sync(pScrn);
-#endif
-
return TRUE;
}
@@ -494,10 +489,5 @@ I915EXAPrepareComposite(int op, PictureP
}
FS_END();
-#ifdef I830DEBUG
- ErrorF("try to sync to show any errors...");
- I830Sync(pScrn);
-#endif
-
return TRUE;
}
diff-tree f46c70e877a3432ba23696e1a16d5906183876af (from ce00db054bf0b7f62ff0be312d7e3470141922dc)
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 14 10:05:51 2006 -0700
Add a note on maxX/maxY for the 2D rendering.
diff --git a/src/i830_exa.c b/src/i830_exa.c
index a2382ba..6a7028f 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -452,6 +452,8 @@ I830EXAInit(ScreenPtr pScreen)
pI830->EXADriverPtr->pixmapOffsetAlign = 256;
pI830->EXADriverPtr->pixmapPitchAlign = 64;
+
+ /* i845 and i945 2D limits rendering to 65536 lines and pitch of 32768. */
pI830->EXADriverPtr->maxX = 4095;
pI830->EXADriverPtr->maxY = 4095;
diff-tree ce00db054bf0b7f62ff0be312d7e3470141922dc (from 71c2dd63361be9616c77db80a93445307d63dd41)
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 14 10:00:06 2006 -0700
Replace a couple of mis-uses of the screen's bpp when the pixmap's was needed.
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 4009327..a2382ba 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -229,7 +229,7 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap,
pI830->BR[13] = exaGetPixmapPitch(pDstPixmap);
pI830->BR[13] |= I830CopyROP[alu] << 16;
- switch (pScrn->bitsPerPixel) {
+ switch (pSrcPixmap->drawable.bitsPerPixel) {
case 8:
break;
case 16:
@@ -260,7 +260,7 @@ I830EXACopy(PixmapPtr pDstPixmap, int sr
{
BEGIN_LP_RING(8);
- if (pScrn->bitsPerPixel == 32)
+ if (pDstPixmap->drawable.bitsPerPixel == 32)
OUT_RING(XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA |
XY_SRC_COPY_BLT_WRITE_RGB);
else
diff-tree 71c2dd63361be9616c77db80a93445307d63dd41 (from 59ce4180b95270432540624a1fdf7ae8dd18a7f3)
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 14 09:54:19 2006 -0700
Replace duplicated sync code in exa with a call to I830Sync.
The I830Sync version has additional code for the 965.
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 2bab0c7..4009327 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -123,38 +123,16 @@ extern Bool I915EXAPrepareComposite(int,
* @pScreen: current screen
* @marker: marker command to wait for
*
- * Wait for the command specified by @marker to finish, then return.
+ * Wait for the command specified by @marker to finish, then return. We don't
+ * actually do marker waits, though we might in the future. For now, just
+ * wait for a full idle.
*/
static void
I830EXASync(ScreenPtr pScreen, int marker)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- I830Ptr pI830 = I830PTR(pScrn);
-
-#ifdef XF86DRI
- /* VT switching tries to do this. */
- if (!pI830->LockHeld && pI830->directRenderingEnabled)
- return;
-#endif
-
- if (pI830->entityPrivate && !pI830->entityPrivate->RingRunning)
- return;
-
- /* Send a flush instruction and then wait till the ring is empty.
- * This is stronger than waiting for the blitter to finish as it also
- * flushes the internal graphics caches.
- */
- {
- BEGIN_LP_RING(2);
- OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
- OUT_RING(MI_NOOP); /* pad to quadword */
- ADVANCE_LP_RING();
- }
- I830WaitLpRing(pScrn, pI830->LpRing->mem.Size - 8, 0);
-
- pI830->LpRing->space = pI830->LpRing->mem.Size - 8;
- pI830->nextColorExpandBuf = 0;
+ I830Sync(pScrn);
}
/**
More information about the xorg-commit
mailing list