xf86-video-intel: Branch 'intel-batchbuffer' - 3 commits - src/i830_accel.c src/i830_dri.c src/i830_xaa.c

Dave Airlie airlied at kemper.freedesktop.org
Sun Oct 21 16:38:42 PDT 2007


 src/i830_accel.c |   27 +++++++++++++++------------
 src/i830_dri.c   |   25 +++++++++++++++----------
 src/i830_xaa.c   |    2 +-
 3 files changed, 31 insertions(+), 23 deletions(-)

New commits:
commit cc25171dbdeeb4696bf0e014d6b811df45b73b21
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Oct 22 09:36:27 2007 +1000

    batchbuffer: don't wait for ring do batchbuffer finish

diff --git a/src/i830_accel.c b/src/i830_accel.c
index 5cfd46e..46f969f 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -184,7 +184,7 @@ I830Sync(ScrnInfoPtr pScrn)
    if (pI830->entityPrivate && !pI830->entityPrivate->RingRunning) return;
 
    if (pI830->use_ttm_batch) {
-     intel_batchbuffer_flush(pI830->batch);
+     intel_batchbuffer_finish(pI830->batch);
    }
    else
    {
@@ -202,10 +202,10 @@ I830Sync(ScrnInfoPtr pScrn)
        OUT_RING(MI_NOOP);		/* pad to quadword */
        ADVANCE_LP_RING();
      }
-   }
-   I830WaitLpRing(pScrn, pI830->LpRing->mem->size - 8, 0);
+     I830WaitLpRing(pScrn, pI830->LpRing->mem->size - 8, 0);
 
-   pI830->LpRing->space = pI830->LpRing->mem->size - 8;
+     pI830->LpRing->space = pI830->LpRing->mem->size - 8;
+   }
    pI830->nextColorExpandBuf = 0;
 }
 
@@ -215,14 +215,17 @@ I830EmitFlush(ScrnInfoPtr pScrn)
    I830Ptr pI830 = I830PTR(pScrn);
    int flags = MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE;
 
-   if (IS_I965G(pI830))
-      flags = 0;
-
-   {
-       BEGIN_LP_RING(2);
-       OUT_RING(MI_FLUSH | flags);
-       OUT_RING(MI_NOOP);		/* pad to quadword */
-       ADVANCE_LP_RING();
+   if (pI830->use_ttm_batch)
+      intel_batchbuffer_flush(pI830->batch);
+   else {
+      if (IS_I965G(pI830))
+         flags = 0;
+       {
+           BEGIN_BATCH(2);
+           OUT_BATCH(MI_FLUSH | flags);
+           OUT_BATCH(MI_NOOP);		/* pad to quadword */
+           ADVANCE_BATCH();
+       }
    }
 }
 
commit 0711e7fb1278e7467a6ede56df631b56b099d9d6
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Oct 22 09:36:10 2007 +1000

    xaa: fix misplaced bracket

diff --git a/src/i830_xaa.c b/src/i830_xaa.c
index 4edea27..382dd53 100644
--- a/src/i830_xaa.c
+++ b/src/i830_xaa.c
@@ -326,7 +326,7 @@ I830SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
      */
     pI830->BR[13] |= (I830PatternROP[rop] << 16);
 #else
-    pI830->BR[13] |= ((XAAGetPatternROP(rop) << 16);
+    pI830->BR[13] |= (XAAGetPatternROP(rop) << 16);
 #endif
 
     pI830->BR[16] = color;
commit d1795a6bdeb2ebe0612b9e8809540277a8edaefd
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Oct 22 09:35:52 2007 +1000

    dri: attempt to use batchbuffer for refresh area

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 2a071ff..2746e89 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1065,16 +1065,16 @@ I830DRIDoRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox, CARD32 dst)
    }
 
    for (i = 0 ; i < num ; i++, pbox++) {
-      BEGIN_LP_RING(8);
-      OUT_RING(cmd);
-      OUT_RING(br13);
-      OUT_RING((pbox->y1 << 16) | pbox->x1);
-      OUT_RING((pbox->y2 << 16) | pbox->x2);
-      OUT_RING(dst);
-      OUT_RING((pbox->y1 << 16) | pbox->x1);
-      OUT_RING(br13 & 0xffff);
-      OUT_RING(pI830->front_buffer->offset);
-      ADVANCE_LP_RING();
+      BEGIN_BATCH(8);
+      OUT_BATCH(cmd);
+      OUT_BATCH(br13);
+      OUT_BATCH((pbox->y1 << 16) | pbox->x1);
+      OUT_BATCH((pbox->y2 << 16) | pbox->x2);
+      OUT_BATCH(dst);
+      OUT_BATCH((pbox->y1 << 16) | pbox->x1);
+      OUT_BATCH(br13 & 0xffff);
+      OUT_BATCH(pI830->front_buffer->offset);
+      ADVANCE_BATCH();
    }
 }
 
@@ -1090,12 +1090,17 @@ I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
    if (!pSAREAPriv->pf_active && pSAREAPriv->pf_current_page == 0)
       return;
 
+   if (pI830->use_ttm_batch)
+       intel_batchbuffer_flush(pI830->batch);
+
    I830DRIDoRefreshArea(pScrn, num, pbox, pI830->back_buffer->offset);
 
    if (pI830->third_buffer) {
       I830DRIDoRefreshArea(pScrn, num, pbox, pI830->third_buffer->offset);
    }
 
+   if (pI830->use_ttm_batch)
+       intel_batchbuffer_finish(pI830->batch);
    DamageEmpty(pI830->pDamage);
 }
 #endif


More information about the xorg-commit mailing list