xf86-video-intel: Branch 'intel-batchbuffer' - src/dri_bufmgr.c src/dri_bufmgr.h src/i830_accel.c src/i830_dri.c src/i830_driver.c src/i830_exa.c src/i830.h src/i965_render.c src/intel_batchbuffer.c src/intel_batchbuffer.h src/intel_bufmgr_ttm.c src/intel_bufmgr_ttm.h

Dave Airlie airlied at kemper.freedesktop.org
Wed Oct 31 18:00:14 PDT 2007


 src/dri_bufmgr.c        |   36 +++++++-------
 src/dri_bufmgr.h        |   66 +++++++++++++--------------
 src/i830.h              |    8 +--
 src/i830_accel.c        |    4 -
 src/i830_dri.c          |    8 +--
 src/i830_driver.c       |    2 
 src/i830_exa.c          |   12 ++--
 src/i965_render.c       |   16 +++---
 src/intel_batchbuffer.c |   48 +++++++++----------
 src/intel_batchbuffer.h |   55 +++++++++++-----------
 src/intel_bufmgr_ttm.c  |  116 ++++++++++++++++++++++++------------------------
 src/intel_bufmgr_ttm.h  |    6 +-
 12 files changed, 189 insertions(+), 188 deletions(-)

New commits:
commit 62281b1ed4adc90d7f8f893f50c166e16b39c68d
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Nov 1 11:39:39 2007 +1100

    intel: avoid symbol collisions with Mesa in AIGLX situations..
    
    So re-using code from Mesa in the DDX as-is?? bad plan, Mesa tries
    to use the DDX functions with the same names...
    
    Maybe someday symbol visibility will save the world

diff --git a/src/dri_bufmgr.c b/src/dri_bufmgr.c
index 3c20789..b5da3b9 100644
--- a/src/dri_bufmgr.c
+++ b/src/dri_bufmgr.c
@@ -32,8 +32,8 @@
  * Convenience functions for buffer management methods.
  */
 
-dri_bo *
-dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size,
+ddx_bo *
+ddx_bo_alloc(ddx_bufmgr *bufmgr, const char *name, unsigned long size,
 	     unsigned int alignment, unsigned int location_mask)
 {
    assert((location_mask & ~(DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_MEM_TT |
@@ -44,8 +44,8 @@ dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size,
    return bufmgr->bo_alloc(bufmgr, name, size, alignment, location_mask);
 }
 
-dri_bo *
-dri_bo_alloc_static(dri_bufmgr *bufmgr, const char *name, unsigned long offset,
+ddx_bo *
+ddx_bo_alloc_static(ddx_bufmgr *bufmgr, const char *name, unsigned long offset,
 		    unsigned long size, void *virtual,
 		    unsigned int location_mask)
 {
@@ -60,13 +60,13 @@ dri_bo_alloc_static(dri_bufmgr *bufmgr, const char *name, unsigned long offset,
 }
 
 void
-dri_bo_reference(dri_bo *bo)
+ddx_bo_reference(ddx_bo *bo)
 {
    bo->bufmgr->bo_reference(bo);
 }
 
 void
-dri_bo_unreference(dri_bo *bo)
+ddx_bo_unreference(ddx_bo *bo)
 {
    if (bo == NULL)
       return;
@@ -75,13 +75,13 @@ dri_bo_unreference(dri_bo *bo)
 }
 
 int
-dri_bo_map(dri_bo *buf, Bool write_enable)
+ddx_bo_map(ddx_bo *buf, Bool write_enable)
 {
    return buf->bufmgr->bo_map(buf, write_enable);
 }
 
 int
-dri_bo_unmap(dri_bo *buf)
+ddx_bo_unmap(ddx_bo *buf)
 {
    return buf->bufmgr->bo_unmap(buf);
 }
@@ -108,47 +108,47 @@ dri_fence_unreference(dri_fence *fence)
 }
 
 void
-dri_bo_subdata(dri_bo *bo, unsigned long offset,
+ddx_bo_subdata(ddx_bo *bo, unsigned long offset,
 	       unsigned long size, const void *data)
 {
    if (size == 0 || data == NULL)
       return;
 
-   dri_bo_map(bo, TRUE);
+   ddx_bo_map(bo, TRUE);
    memcpy((unsigned char *)bo->virtual + offset, data, size);
-   dri_bo_unmap(bo);
+   ddx_bo_unmap(bo);
 }
 
 void
-dri_bo_get_subdata(dri_bo *bo, unsigned long offset,
+ddx_bo_get_subdata(ddx_bo *bo, unsigned long offset,
 		   unsigned long size, void *data)
 {
    if (size == 0 || data == NULL)
       return;
 
-   dri_bo_map(bo, FALSE);
+   ddx_bo_map(bo, FALSE);
    memcpy(data, (unsigned char *)bo->virtual + offset, size);
-   dri_bo_unmap(bo);
+   ddx_bo_unmap(bo);
 }
 
 void
-dri_bufmgr_destroy(dri_bufmgr *bufmgr)
+ddx_bufmgr_destroy(ddx_bufmgr *bufmgr)
 {
    bufmgr->destroy(bufmgr);
 }
 
 
-void dri_emit_reloc(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, dri_bo *relocatee)
+void dri_emit_reloc(ddx_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, ddx_bo *relocatee)
 {
    batch_buf->bufmgr->emit_reloc(batch_buf, flags, delta, offset, relocatee);
 }
 
-void *dri_process_relocs(dri_bo *batch_buf, uint32_t *count)
+void *dri_process_relocs(ddx_bo *batch_buf, uint32_t *count)
 {
    return batch_buf->bufmgr->process_relocs(batch_buf, count);
 }
 
-void dri_post_submit(dri_bo *batch_buf, dri_fence **last_fence)
+void dri_post_submit(ddx_bo *batch_buf, dri_fence **last_fence)
 {
    batch_buf->bufmgr->post_submit(batch_buf, last_fence);
 }
diff --git a/src/dri_bufmgr.h b/src/dri_bufmgr.h
index cddafb6..57bc715 100644
--- a/src/dri_bufmgr.h
+++ b/src/dri_bufmgr.h
@@ -38,11 +38,11 @@
 
 #include "xf86str.h"
 
-typedef struct _dri_bufmgr dri_bufmgr;
-typedef struct _dri_bo dri_bo;
+typedef struct _ddx_bufmgr ddx_bufmgr;
+typedef struct _ddx_bo ddx_bo;
 typedef struct _dri_fence dri_fence;
 
-struct _dri_bo {
+struct _ddx_bo {
    /** Size in bytes of the buffer object. */
    unsigned long size;
    /**
@@ -55,7 +55,7 @@ struct _dri_bo {
     */
    void *virtual;
    /** Buffer manager context associated with this buffer object */
-   dri_bufmgr *bufmgr;
+   ddx_bufmgr *bufmgr;
 };
 
 struct _dri_fence {
@@ -67,7 +67,7 @@ struct _dri_fence {
     */
    unsigned int type;
    /** Buffer manager context associated with this fence */
-   dri_bufmgr *bufmgr;
+   ddx_bufmgr *bufmgr;
 };
 
 /**
@@ -75,7 +75,7 @@ struct _dri_fence {
  *
  * Contains public methods followed by private storage for the buffer manager.
  */
-struct _dri_bufmgr {
+struct _ddx_bufmgr {
    /**
     * Allocate a buffer object.
     *
@@ -84,7 +84,7 @@ struct _dri_bufmgr {
     * bo_map() to be used by the CPU, and validated for use using bo_validate()
     * to be used from the graphics device.
     */
-   dri_bo *(*bo_alloc)(dri_bufmgr *bufmgr_ctx, const char *name,
+   ddx_bo *(*bo_alloc)(ddx_bufmgr *bufmgr_ctx, const char *name,
 		       unsigned long size, unsigned int alignment,
 		       unsigned int location_mask);
 
@@ -94,18 +94,18 @@ struct _dri_bufmgr {
     * Static allocations are ones such as the front buffer that are offered by
     * the X Server, which are never evicted and never moved.
     */
-   dri_bo *(*bo_alloc_static)(dri_bufmgr *bufmgr_ctx, const char *name,
+   ddx_bo *(*bo_alloc_static)(ddx_bufmgr *bufmgr_ctx, const char *name,
 			      unsigned long offset, unsigned long size,
 			      void *virtual, unsigned int location_mask);
 
    /** Takes a reference on a buffer object */
-   void (*bo_reference)(dri_bo *bo);
+   void (*bo_reference)(ddx_bo *bo);
 
    /**
     * Releases a reference on a buffer object, freeing the data if
     * rerefences remain.
     */
-   void (*bo_unreference)(dri_bo *bo);
+   void (*bo_unreference)(ddx_bo *bo);
 
    /**
     * Maps the buffer into userspace.
@@ -113,10 +113,10 @@ struct _dri_bufmgr {
     * This function will block waiting for any existing fence on the buffer to
     * clear, first.  The resulting mapping is available at buf->virtual.
 \    */
-   int (*bo_map)(dri_bo *buf, Bool write_enable);
+   int (*bo_map)(ddx_bo *buf, Bool write_enable);
 
    /** Reduces the refcount on the userspace mapping of the buffer object. */
-   int (*bo_unmap)(dri_bo *buf);
+   int (*bo_unmap)(ddx_bo *buf);
 
    /** Takes a reference on a fence object */
    void (*fence_reference)(dri_fence *fence);
@@ -135,52 +135,52 @@ struct _dri_bufmgr {
    /**
     * Tears down the buffer manager instance.
     */
-   void (*destroy)(dri_bufmgr *bufmgr);
+   void (*destroy)(ddx_bufmgr *bufmgr);
    
    /**
     * Add relocation
     */
-   void (*emit_reloc)(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, dri_bo *relocatee);
+   void (*emit_reloc)(ddx_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, ddx_bo *relocatee);
 
-  void *(*process_relocs)(dri_bo *batch_buf, uint32_t *count);
+  void *(*process_relocs)(ddx_bo *batch_buf, uint32_t *count);
 
-   void (*post_submit)(dri_bo *batch_buf, dri_fence **fence);
+   void (*post_submit)(ddx_bo *batch_buf, dri_fence **fence);
 };
 
-dri_bo *dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size,
+ddx_bo *ddx_bo_alloc(ddx_bufmgr *bufmgr, const char *name, unsigned long size,
 		     unsigned int alignment, unsigned int location_mask);
-dri_bo *dri_bo_alloc_static(dri_bufmgr *bufmgr, const char *name,
+ddx_bo *ddx_bo_alloc_static(ddx_bufmgr *bufmgr, const char *name,
 			    unsigned long offset, unsigned long size,
 			    void *virtual, unsigned int location_mask);
-void dri_bo_reference(dri_bo *bo);
-void dri_bo_unreference(dri_bo *bo);
-int dri_bo_map(dri_bo *buf, Bool write_enable);
-int dri_bo_unmap(dri_bo *buf);
+void ddx_bo_reference(ddx_bo *bo);
+void ddx_bo_unreference(ddx_bo *bo);
+int ddx_bo_map(ddx_bo *buf, Bool write_enable);
+int ddx_bo_unmap(ddx_bo *buf);
 void dri_fence_wait(dri_fence *fence);
 void dri_fence_reference(dri_fence *fence);
 void dri_fence_unreference(dri_fence *fence);
 
-void dri_bo_subdata(dri_bo *bo, unsigned long offset,
+void ddx_bo_subdata(ddx_bo *bo, unsigned long offset,
 		    unsigned long size, const void *data);
-void dri_bo_get_subdata(dri_bo *bo, unsigned long offset,
+void ddx_bo_get_subdata(ddx_bo *bo, unsigned long offset,
 			unsigned long size, void *data);
 
-dri_bufmgr *dri_bufmgr_ttm_init(int fd, unsigned int fence_type,
+ddx_bufmgr *ddx_bufmgr_ttm_init(int fd, unsigned int fence_type,
 				unsigned int fence_type_flush);
 
-void dri_bufmgr_fake_contended_lock_take(dri_bufmgr *bufmgr);
-dri_bufmgr *dri_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
+void ddx_bufmgr_fake_contended_lock_take(ddx_bufmgr *bufmgr);
+ddx_bufmgr *ddx_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
 				 unsigned long size,
 				 unsigned int (*fence_emit)(void *private),
 				 int (*fence_wait)(void *private,
 						   unsigned int cookie),
 				 void *driver_priv);
-void dri_bufmgr_destroy(dri_bufmgr *bufmgr);
-dri_bo *dri_ttm_bo_create_from_handle(dri_bufmgr *bufmgr, const char *name,
+void ddx_bufmgr_destroy(ddx_bufmgr *bufmgr);
+ddx_bo *dri_ttm_bo_create_from_handle(ddx_bufmgr *bufmgr, const char *name,
 				      unsigned int handle);
 
-void dri_emit_reloc(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, dri_bo *relocatee);
-void *dri_process_relocs(dri_bo *batch_buf, uint32_t *count);
-void dri_post_process_relocs(dri_bo *batch_buf);
-void dri_post_submit(dri_bo *batch_buf, dri_fence **last_fence);
+void dri_emit_reloc(ddx_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset, ddx_bo *relocatee);
+void *dri_process_relocs(ddx_bo *batch_buf, uint32_t *count);
+void dri_post_process_relocs(ddx_bo *batch_buf);
+void dri_post_submit(ddx_bo *batch_buf, dri_fence **last_fence);
 #endif
diff --git a/src/i830.h b/src/i830.h
index 12b4e77..7784274 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -132,7 +132,7 @@ enum tile_format {
     TILE_YMAJOR
 };
 
-struct intel_batchbuffer;
+struct intelddx_batchbuffer;
 
 /** Record of a linear allocation in the aperture. */
 typedef struct _i830_memory i830_memory;
@@ -574,8 +574,8 @@ typedef struct _I830Rec {
 
    /* batchbuffer support */
    struct i965_exastate_buffer *exa965;
-   struct intel_batchbuffer *batch;
-   dri_bufmgr *bufmgr;
+   struct intelddx_batchbuffer *batch;
+   ddx_bufmgr *bufmgr;
    unsigned int maxBatchSize;
    Bool use_ttm_batch;
 } I830Rec;
@@ -592,7 +592,7 @@ typedef struct _I830Rec {
 
 /* i830 pixmap private for TTM */
 struct i830_exa_pixmap_priv {
-    dri_bo *bo;
+    ddx_bo *bo;
     dri_fence *fence;
     int flags;
 };
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 46f969f..5988d33 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_finish(pI830->batch);
+     intelddx_batchbuffer_finish(pI830->batch);
    }
    else
    {
@@ -216,7 +216,7 @@ I830EmitFlush(ScrnInfoPtr pScrn)
    int flags = MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE;
 
    if (pI830->use_ttm_batch)
-      intel_batchbuffer_flush(pI830->batch);
+      intelddx_batchbuffer_flush(pI830->batch);
    else {
       if (IS_I965G(pI830))
          flags = 0;
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 2746e89..0102db9 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -524,13 +524,13 @@ I830InitBufMgr(ScreenPtr pScreen)
    }
 
    pI830->maxBatchSize = BATCH_SZ;
-   pI830->bufmgr = intel_bufmgr_ttm_init(pI830->drmSubFD, DRM_FENCE_TYPE_EXE,
+   pI830->bufmgr = intelddx_bufmgr_ttm_init(pI830->drmSubFD, DRM_FENCE_TYPE_EXE,
 			DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW,
 			BATCH_SZ);
 
    if (!pI830->bufmgr)
 	return;
-   pI830->batch = intel_batchbuffer_alloc(pScrn);
+   pI830->batch = intelddx_batchbuffer_alloc(pScrn);
    pI830->use_ttm_batch = TRUE;
 
 }
@@ -1091,7 +1091,7 @@ I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
       return;
 
    if (pI830->use_ttm_batch)
-       intel_batchbuffer_flush(pI830->batch);
+       intelddx_batchbuffer_flush(pI830->batch);
 
    I830DRIDoRefreshArea(pScrn, num, pbox, pI830->back_buffer->offset);
 
@@ -1100,7 +1100,7 @@ I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
    }
 
    if (pI830->use_ttm_batch)
-       intel_batchbuffer_finish(pI830->batch);
+       intelddx_batchbuffer_finish(pI830->batch);
    DamageEmpty(pI830->pDamage);
 }
 #endif
diff --git a/src/i830_driver.c b/src/i830_driver.c
index a8801c1..0ac7266 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2271,7 +2271,7 @@ I830BlockHandler(int i,
     pScreen->BlockHandler = I830BlockHandler;
 
     if (pI830->batch)
-    	intel_batchbuffer_flush(pI830->batch);
+    	intelddx_batchbuffer_flush(pI830->batch);
     I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
 }
 
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 069df40..6e1c5bd 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -399,7 +399,7 @@ static void *I830EXACreatePixmap(ScreenPtr pScreen, int size, int align)
     if (size == 0)
 	return new_priv;
 
-    new_priv->bo = dri_bo_alloc(pI830->bufmgr, "pixmap",
+    new_priv->bo = ddx_bo_alloc(pI830->bufmgr, "pixmap",
 				size, 4096, DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED);
 
     return new_priv;
@@ -412,9 +412,9 @@ static void I830EXADestroyPixmap(ScreenPtr pScreen, void *driverPriv)
     struct i830_exa_pixmap_priv *driver_priv = driverPriv;
 
     if (driver_priv->flags & I830_EXA_PIXMAP_IS_MAPPED)
-        dri_bo_unmap(driver_priv->bo);
+        ddx_bo_unmap(driver_priv->bo);
 
-    dri_bo_unreference(driver_priv->bo);
+    ddx_bo_unreference(driver_priv->bo);
     xfree(driverPriv);
 }
 
@@ -445,7 +445,7 @@ static Bool I830EXAPrepareAccess(PixmapPtr pPix, int index)
 	return FALSE;
 
     /* TODO : make this more conditional */
-    intel_batchbuffer_flush(pI830->batch);
+    intelddx_batchbuffer_flush(pI830->batch);
     dri_fence_wait(pI830->batch->last_fence);
 
     if (driver_priv->bo) {
@@ -454,7 +454,7 @@ static Bool I830EXAPrepareAccess(PixmapPtr pPix, int index)
 	if ((driver_priv->flags & I830_EXA_PIXMAP_IS_MAPPED))
 	    return TRUE;
 
-	ret = dri_bo_map(driver_priv->bo, 1);
+	ret = ddx_bo_map(driver_priv->bo, 1);
 	if (ret)
 	    return FALSE;
 
@@ -481,7 +481,7 @@ static Bool I830EXAModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
         driver_priv->flags |= I830_EXA_PIXMAP_IS_FRONTBUFFER;
 
 	/* get a reference to the front buffer handle */
-	driver_priv->bo = intel_ttm_bo_create_from_handle(pI830->bufmgr, "front", pI830->front_buffer->bo.handle);
+	driver_priv->bo = intelddx_ttm_bo_create_from_handle(pI830->bufmgr, "front", pI830->front_buffer->bo.handle);
 	miModifyPixmapHeader(pPixmap, width, height, depth,
 			     bitsPerPixel, devKind, NULL);
 
diff --git a/src/i965_render.c b/src/i965_render.c
index 1e423a2..142200e 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -703,14 +703,14 @@ i965_exastate_reset(struct i965_exastate_buffer *state)
     I830Ptr pI830 = I830PTR(state->pScrn);
 
     if (state->buf != NULL) {
-	dri_bo_unreference(state->buf);
+	ddx_bo_unreference(state->buf);
 	state->buf = NULL;
     }
 
-    state->buf = dri_bo_alloc(pI830->bufmgr, "exa state buffer",
+    state->buf = ddx_bo_alloc(pI830->bufmgr, "exa state buffer",
 			      EXASTATE_SZ, 4096,
 			      DRM_BO_FLAG_MEM_TT);
-    dri_bo_map(state->buf, TRUE);
+    ddx_bo_map(state->buf, TRUE);
 
     state->map = state->buf->virtual;
     i965_init_state_objects(state->pScrn, state->map);
@@ -809,7 +809,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     dest_surf_state->ss0.surface_format = dst_format;
 
     if (pI830->use_ttm_batch) {
-    	intel_batchbuffer_emit_pixmap(pDst,
+    	intelddx_batchbuffer_emit_pixmap(pDst,
 				     DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_WRITE,
 				     DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_CACHED,
 				     pI830->exa965->buf, dest_surf_offset + 4, 0);
@@ -828,7 +828,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     src_surf_state->ss0.surface_format = i965_get_card_format(pSrcPicture);
 
     if (pI830->use_ttm_batch) {
-        intel_batchbuffer_emit_pixmap(pSrc,
+        intelddx_batchbuffer_emit_pixmap(pSrc,
 				 DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
 				 DRM_BO_MASK_MEM | DRM_BO_FLAG_READ | DRM_BO_FLAG_CACHED,
 				 pI830->exa965->buf, src_surf_offset + 4, 0);
@@ -846,7 +846,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
 	mask_surf_state = (void *)(start_base + mask_surf_offset);
    	mask_surf_state->ss0.surface_format = i965_get_card_format(pMaskPicture);
         if (pI830->use_ttm_batch) {
-	   intel_batchbuffer_emit_pixmap(pMask, 
+	   intelddx_batchbuffer_emit_pixmap(pMask, 
 				     DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
 				     DRM_BO_MASK_MEM | DRM_BO_FLAG_READ | DRM_BO_FLAG_CACHED,
 				     pI830->exa965->buf, mask_surf_offset + 4, 0);
@@ -1265,8 +1265,8 @@ void i965_done_composite(PixmapPtr pDst)
     }
 
     if (pI830->use_ttm_batch) {
-	dri_bo_unmap(pI830->exa965->buf);
-	intel_batchbuffer_flush(pI830->batch);
+	ddx_bo_unmap(pI830->exa965->buf);
+	intelddx_batchbuffer_flush(pI830->batch);
     } else {
 	I830Sync(pScrn);
     }
diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c
index fdb7b51..f29f069 100644
--- a/src/intel_batchbuffer.c
+++ b/src/intel_batchbuffer.c
@@ -77,38 +77,38 @@
  */
 
 void
-intel_batchbuffer_reset(struct intel_batchbuffer *batch)
+intelddx_batchbuffer_reset(struct intelddx_batchbuffer *batch)
 {
    I830Ptr pI830 = I830PTR(batch->pScrn);
 
    if (batch->buf != NULL) {
-      dri_bo_unreference(batch->buf);
+      ddx_bo_unreference(batch->buf);
       batch->buf = NULL;
    }
 
-   batch->buf = dri_bo_alloc(pI830->bufmgr, "batchbuffer",
+   batch->buf = ddx_bo_alloc(pI830->bufmgr, "batchbuffer",
 			     pI830->maxBatchSize, 4096,
 			     DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED);
-   dri_bo_map(batch->buf, TRUE);
+   ddx_bo_map(batch->buf, TRUE);
    batch->map = batch->buf->virtual;
    batch->size = pI830->maxBatchSize;
    batch->ptr = batch->map;
 }
 
-struct intel_batchbuffer *
-intel_batchbuffer_alloc(ScrnInfoPtr pScrn)
+struct intelddx_batchbuffer *
+intelddx_batchbuffer_alloc(ScrnInfoPtr pScrn)
 {
-   struct intel_batchbuffer *batch = calloc(sizeof(*batch), 1);
+   struct intelddx_batchbuffer *batch = calloc(sizeof(*batch), 1);
 
    batch->pScrn = pScrn;
    batch->last_fence = NULL;
-   intel_batchbuffer_reset(batch);
+   intelddx_batchbuffer_reset(batch);
 
    return batch;
 }
 
 void
-intel_batchbuffer_free(struct intel_batchbuffer *batch)
+intelddx_batchbuffer_free(struct intelddx_batchbuffer *batch)
 {
    if (batch->last_fence) {
       dri_fence_wait(batch->last_fence);
@@ -116,10 +116,10 @@ intel_batchbuffer_free(struct intel_batchbuffer *batch)
       batch->last_fence = NULL;
    }
    if (batch->map) {
-      dri_bo_unmap(batch->buf);
+      ddx_bo_unmap(batch->buf);
       batch->map = NULL;
    }
-   dri_bo_unreference(batch->buf);
+   ddx_bo_unreference(batch->buf);
    batch->buf = NULL;
    free(batch);
 }
@@ -157,7 +157,7 @@ intel_exec_ioctl(ScrnInfoPtr pScrn,
       exit(1);
    }
 
-   fo = intel_ttm_fence_create_from_arg(pI830->bufmgr, "fence buffers",
+   fo = intelddx_ttm_fence_create_from_arg(pI830->bufmgr, "fence buffers",
                                         &execbuf.fence_arg);
    if (!fo) {
       fprintf(stderr, "failed to fence handle: %08x\n", execbuf.fence_arg.handle);
@@ -168,7 +168,7 @@ intel_exec_ioctl(ScrnInfoPtr pScrn,
 
 
 static void
-do_flush_locked(struct intel_batchbuffer *batch,
+do_flush_locked(struct intelddx_batchbuffer *batch,
 		uint32_t used,
 		Bool ignore_cliprects, Bool allow_unlock)
 {
@@ -196,7 +196,7 @@ do_flush_locked(struct intel_batchbuffer *batch,
 }
 
 void
-intel_batchbuffer_flush(struct intel_batchbuffer *batch)
+intelddx_batchbuffer_flush(struct intelddx_batchbuffer *batch)
 {
    I830Ptr pI830 = I830PTR(batch->pScrn);
    uint32_t used = batch->ptr - batch->map;
@@ -226,13 +226,13 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch)
      
    /* Reset the buffer:
     */
-   intel_batchbuffer_reset(batch);
+   intelddx_batchbuffer_reset(batch);
 }
 
 void
-intel_batchbuffer_finish(struct intel_batchbuffer *batch)
+intelddx_batchbuffer_finish(struct intelddx_batchbuffer *batch)
 {
-   intel_batchbuffer_flush(batch);
+   intelddx_batchbuffer_flush(batch);
    if (batch->last_fence != NULL)
       dri_fence_wait(batch->last_fence);
 }
@@ -241,8 +241,8 @@ intel_batchbuffer_finish(struct intel_batchbuffer *batch)
 /*  This is the only way buffers get added to the validate list.
  */
 Bool
-intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
-                             dri_bo *buffer,
+intelddx_batchbuffer_emit_reloc(struct intelddx_batchbuffer *batch,
+                             ddx_bo *buffer,
                              uint32_t flags, uint32_t delta)
 {
    dri_emit_reloc(batch->buf, flags, delta, batch->ptr - batch->map, buffer);
@@ -252,18 +252,18 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
 }
 
 void
-intel_batchbuffer_data(struct intel_batchbuffer *batch,
+intelddx_batchbuffer_data(struct intelddx_batchbuffer *batch,
                        const void *data, uint32_t bytes, uint32_t flags)
 {
    assert((bytes & 3) == 0);
-   intel_batchbuffer_require_space(batch, bytes, flags);
+   intelddx_batchbuffer_require_space(batch, bytes, flags);
    memcpy(batch->ptr, data, bytes);
    batch->ptr += bytes;
 }
 
 Bool
-intel_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
-			      unsigned int mask, dri_bo *reloc_buf,
+intelddx_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
+			      unsigned int mask, ddx_bo *reloc_buf,
 			      unsigned int offset, unsigned int delta)
 {
     ScreenPtr pScreen = pPixmap->drawable.pScreen;
@@ -272,7 +272,7 @@ intel_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
     struct i830_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPixmap);
 
     if (driver_priv->flags & I830_EXA_PIXMAP_IS_MAPPED) {
-	dri_bo_unmap(driver_priv->bo);
+	ddx_bo_unmap(driver_priv->bo);
 	driver_priv->flags &= ~I830_EXA_PIXMAP_IS_MAPPED;
     }
     dri_emit_reloc(reloc_buf, flags, delta, offset, driver_priv->bo);
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index 6784bdc..01e2e18 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -9,11 +9,11 @@ struct intel_context;
 #define EXASTATE_SZ 48000
 #define BATCH_RESERVED 16
 
-struct intel_batchbuffer
+struct intelddx_batchbuffer
 {
    ScrnInfoPtr pScrn;
 
-   dri_bo *buf;
+   ddx_bo *buf;
    dri_fence *last_fence;
    uint32_t flags;
 
@@ -24,36 +24,36 @@ struct intel_batchbuffer
 };
 
 struct i965_exastate_buffer {
-   dri_bo *buf;
+   ddx_bo *buf;
    dri_fence *last_fence;
    ScrnInfoPtr pScrn;
    unsigned char *map;
 };
 
-struct intel_batchbuffer *intel_batchbuffer_alloc(ScrnInfoPtr pScrn);
+struct intelddx_batchbuffer *intelddx_batchbuffer_alloc(ScrnInfoPtr pScrn);
 
-void intel_batchbuffer_free(struct intel_batchbuffer *batch);
+void intelddx_batchbuffer_free(struct intelddx_batchbuffer *batch);
 
 
-void intel_batchbuffer_finish(struct intel_batchbuffer *batch);
+void intelddx_batchbuffer_finish(struct intelddx_batchbuffer *batch);
 
-void intel_batchbuffer_flush(struct intel_batchbuffer *batch);
+void intelddx_batchbuffer_flush(struct intelddx_batchbuffer *batch);
 
-void intel_batchbuffer_reset(struct intel_batchbuffer *batch);
+void intelddx_batchbuffer_reset(struct intelddx_batchbuffer *batch);
 
 
 /* Unlike bmBufferData, this currently requires the buffer be mapped.
  * Consider it a convenience function wrapping multple
  * intel_buffer_dword() calls.
  */
-void intel_batchbuffer_data(struct intel_batchbuffer *batch,
+void intelddx_batchbuffer_data(struct intelddx_batchbuffer *batch,
                             const void *data, uint32_t bytes, uint32_t flags);
 
-void intel_batchbuffer_release_space(struct intel_batchbuffer *batch,
+void intelddx_batchbuffer_release_space(struct intelddx_batchbuffer *batch,
                                      uint32_t bytes);
 
-Bool intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
-                                       dri_bo *buffer,
+Bool intelddx_batchbuffer_emit_reloc(struct intelddx_batchbuffer *batch,
+                                       ddx_bo *buffer,
                                        uint32_t flags, uint32_t offset);
 
 /* Inline functions - might actually be better off with these
@@ -62,38 +62,39 @@ Bool intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
  * work...
  */
 static inline uint32_t
-intel_batchbuffer_space(struct intel_batchbuffer *batch)
+intelddx_batchbuffer_space(struct intelddx_batchbuffer *batch)
 {
    return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);
 }
 
 
 static inline void
-intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, uint32_t dword)
+intelddx_batchbuffer_emit_dword(struct intelddx_batchbuffer *batch, uint32_t dword)
 {
    assert(batch->map);
-   assert(intel_batchbuffer_space(batch) >= 4);
+   assert(intelddx_batchbuffer_space(batch) >= 4);
    *(uint32_t *) (batch->ptr) = dword;
    batch->ptr += 4;
 }
 
 static inline void
-intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
+intelddx_batchbuffer_require_space(struct intelddx_batchbuffer *batch,
                                 uint32_t sz, uint32_t flags)
 {
    assert(sz < batch->size - 8);
-   if (intel_batchbuffer_space(batch) < sz ||
+   if (intelddx_batchbuffer_space(batch) < sz ||
        (batch->flags != 0 && flags != 0 && batch->flags != flags))
-      intel_batchbuffer_flush(batch);
+      intelddx_batchbuffer_flush(batch);
 
    batch->flags |= flags;
 }
 
-extern Bool intel_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
-					 unsigned int mask,
-					 dri_bo *reloc_buf,
-					 unsigned int offset,
-					 unsigned int delta);
+extern Bool intelddx_batchbuffer_emit_pixmap(PixmapPtr pPixmap,
+					     unsigned int flags,
+					     unsigned int mask,
+					     ddx_bo *reloc_buf,
+					     unsigned int offset,
+					     unsigned int delta);
 
 /* Here are the crusty old macros, to be removed:
  */
@@ -102,13 +103,13 @@ extern Bool intel_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
 #define BEGIN_BATCH(n)  							\
 	RING_LOCALS 								\
 	if (pI830->use_ttm_batch)						\
-   		intel_batchbuffer_require_space(pI830->batch, (n)*4, 0);	\
+   		intelddx_batchbuffer_require_space(pI830->batch, (n)*4, 0);	\
 	 else { \
    DO_LP_RING(n) ; }
 
 #define OUT_BATCH(d) \
 	 if (pI830->use_ttm_batch) \
-		intel_batchbuffer_emit_dword(pI830->batch, d); \
+		intelddx_batchbuffer_emit_dword(pI830->batch, d); \
 	 else { OUT_RING(d);  }
 
 #define OUT_BATCH_F(x) do {                     \
@@ -118,11 +119,11 @@ extern Bool intel_batchbuffer_emit_pixmap(PixmapPtr pPixmap, unsigned int flags,
 } while(0)
 
 #define OUT_RELOC(buf, flags, delta) do {	\
-   intel_batchbuffer_emit_reloc(pI830->batch, buf, flags, delta);	\
+   intelddx_batchbuffer_emit_reloc(pI830->batch, buf, flags, delta);	\
 } while (0)
 
 #define OUT_PIXMAP_RELOC(pixmap, flags, mask, delta) if (pI830->use_ttm_batch) { \
-    intel_batchbuffer_emit_pixmap((pixmap), (flags), (mask),             \
+    intelddx_batchbuffer_emit_pixmap((pixmap), (flags), (mask),             \
                                  pI830->batch->buf, (pI830->batch->ptr - pI830->batch->map), (delta)); \
     pI830->batch->ptr += 4;						\
   } else {								\
diff --git a/src/intel_bufmgr_ttm.c b/src/intel_bufmgr_ttm.c
index a476f82..ccc93f4 100644
--- a/src/intel_bufmgr_ttm.c
+++ b/src/intel_bufmgr_ttm.c
@@ -87,8 +87,8 @@ struct intel_bo_list {
     void (*destroy)(void *node);
 };
 
-typedef struct _dri_bufmgr_ttm {
-   dri_bufmgr bufmgr;
+typedef struct _ddx_bufmgr_ttm {
+   ddx_bufmgr bufmgr;
 
    int fd;
    unsigned int fence_type;
@@ -99,15 +99,15 @@ typedef struct _dri_bufmgr_ttm {
    struct intel_bo_list list;
    struct intel_bo_list reloc_list;
 
-} dri_bufmgr_ttm;
+} ddx_bufmgr_ttm;
 
-typedef struct _dri_bo_ttm {
-   dri_bo bo;
+typedef struct _ddx_bo_ttm {
+   ddx_bo bo;
 
    int refcount;		/* Protected by bufmgr->mutex */
    drmBO drm_bo;
    const char *name;
-} dri_bo_ttm;
+} ddx_bo_ttm;
 
 typedef struct _dri_fence_ttm
 {
@@ -238,14 +238,14 @@ static void intel_free_reloc_list(int fd, struct intel_bo_list *reloc_list)
     }
 }
 
-static int intel_add_validate_buffer(struct intel_bo_list *list, dri_bo *buf, unsigned flags,
+static int intel_add_validate_buffer(struct intel_bo_list *list, ddx_bo *buf, unsigned flags,
 				     unsigned mask, int *itemLoc, void (*destroy_cb)(void *))
 {
     struct intel_bo_node *node, *cur;
     drmMMListHead *l;
     int count = 0;
     int ret = 0;
-    drmBO *buf_bo = &((dri_bo_ttm *)buf)->drm_bo;
+    drmBO *buf_bo = &((ddx_bo_ttm *)buf)->drm_bo;
     cur = NULL;
 
     for (l = list->list.next; l != &list->list; l = l->next) {
@@ -412,18 +412,18 @@ driFenceSignaled(DriFenceObject * fence, unsigned type)
 }
 #endif
 
-static dri_bo *
-dri_ttm_alloc(dri_bufmgr *bufmgr, const char *name,
+static ddx_bo *
+dri_ttm_alloc(ddx_bufmgr *bufmgr, const char *name,
 	      unsigned long size, unsigned int alignment,
 	      unsigned int location_mask)
 {
-   dri_bufmgr_ttm *ttm_bufmgr;
-   dri_bo_ttm *ttm_buf;
+   ddx_bufmgr_ttm *ttm_bufmgr;
+   ddx_bo_ttm *ttm_buf;
    unsigned int pageSize = getpagesize();
    int ret;
    unsigned int flags, hint;
 
-   ttm_bufmgr = (dri_bufmgr_ttm *)bufmgr;
+   ttm_bufmgr = (ddx_bufmgr_ttm *)bufmgr;
 
    ttm_buf = malloc(sizeof(*ttm_buf));
    if (!ttm_buf)
@@ -462,28 +462,28 @@ dri_ttm_alloc(dri_bufmgr *bufmgr, const char *name,
  * privelege for the non-fake case, and the lock in the fake case where we were
  * working around the X Server not creating buffers and passing handles to us.
  */
-static dri_bo *
-dri_ttm_alloc_static(dri_bufmgr *bufmgr, const char *name,
+static ddx_bo *
+dri_ttm_alloc_static(ddx_bufmgr *bufmgr, const char *name,
 		     unsigned long offset, unsigned long size, void *virtual,
 		     unsigned int location_mask)
 {
    return NULL;
 }
 
-/** Returns a dri_bo wrapping the given buffer object handle.
+/** Returns a ddx_bo wrapping the given buffer object handle.
  *
  * This can be used when one application needs to pass a buffer object
  * to another.
  */
-dri_bo *
-intel_ttm_bo_create_from_handle(dri_bufmgr *bufmgr, const char *name,
+ddx_bo *
+intelddx_ttm_bo_create_from_handle(ddx_bufmgr *bufmgr, const char *name,
 			      unsigned int handle)
 {
-   dri_bufmgr_ttm *ttm_bufmgr;
-   dri_bo_ttm *ttm_buf;
+   ddx_bufmgr_ttm *ttm_bufmgr;
+   ddx_bo_ttm *ttm_buf;
    int ret;
 
-   ttm_bufmgr = (dri_bufmgr_ttm *)bufmgr;
+   ttm_bufmgr = (ddx_bufmgr_ttm *)bufmgr;
 
    ttm_buf = malloc(sizeof(*ttm_buf));
    if (!ttm_buf)
@@ -510,18 +510,18 @@ intel_ttm_bo_create_from_handle(dri_bufmgr *bufmgr, const char *name,
 }
 
 static void
-dri_ttm_bo_reference(dri_bo *buf)
+dri_ttm_bo_reference(ddx_bo *buf)
 {
-   dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
+   ddx_bo_ttm *ttm_buf = (ddx_bo_ttm *)buf;
 
    ttm_buf->refcount++;
 }
 
 static void
-dri_ttm_bo_unreference(dri_bo *buf)
+dri_ttm_bo_unreference(ddx_bo *buf)
 {
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)buf->bufmgr;
-   dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)buf->bufmgr;
+   ddx_bo_ttm *ttm_buf = (ddx_bo_ttm *)buf;
 
    if (!buf)
       return;
@@ -544,13 +544,13 @@ dri_ttm_bo_unreference(dri_bo *buf)
 }
 
 static int
-dri_ttm_bo_map(dri_bo *buf, Bool write_enable)
+dri_ttm_bo_map(ddx_bo *buf, Bool write_enable)
 {
-   dri_bufmgr_ttm *bufmgr_ttm;
-   dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
+   ddx_bufmgr_ttm *bufmgr_ttm;
+   ddx_bo_ttm *ttm_buf = (ddx_bo_ttm *)buf;
    unsigned int flags;
 
-   bufmgr_ttm = (dri_bufmgr_ttm *)buf->bufmgr;
+   bufmgr_ttm = (ddx_bufmgr_ttm *)buf->bufmgr;
 
    flags = DRM_BO_FLAG_READ;
    if (write_enable)
@@ -566,15 +566,15 @@ dri_ttm_bo_map(dri_bo *buf, Bool write_enable)
 }
 
 static int
-dri_ttm_bo_unmap(dri_bo *buf)
+dri_ttm_bo_unmap(ddx_bo *buf)
 {
-   dri_bufmgr_ttm *bufmgr_ttm;
-   dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
+   ddx_bufmgr_ttm *bufmgr_ttm;
+   ddx_bo_ttm *ttm_buf = (ddx_bo_ttm *)buf;
 
    if (buf == NULL)
       return 0;
 
-   bufmgr_ttm = (dri_bufmgr_ttm *)buf->bufmgr;
+   bufmgr_ttm = (ddx_bufmgr_ttm *)buf->bufmgr;
 
    assert(buf->virtual != NULL);
 
@@ -587,19 +587,19 @@ dri_ttm_bo_unmap(dri_bo *buf)
    return drmBOUnmap(bufmgr_ttm->fd, &ttm_buf->drm_bo);
 }
 
-/* Returns a dri_bo wrapping the given buffer object handle.
+/* Returns a ddx_bo wrapping the given buffer object handle.
  *
  * This can be used when one application needs to pass a buffer object
  * to another.
  */
 dri_fence *
-intel_ttm_fence_create_from_arg(dri_bufmgr *bufmgr, const char *name,
+intelddx_ttm_fence_create_from_arg(ddx_bufmgr *bufmgr, const char *name,
 				drm_fence_arg_t *arg)
 {
-   dri_bufmgr_ttm *ttm_bufmgr;
+   ddx_bufmgr_ttm *ttm_bufmgr;
    dri_fence_ttm *ttm_fence;
 
-   ttm_bufmgr = (dri_bufmgr_ttm *)bufmgr;
+   ttm_bufmgr = (ddx_bufmgr_ttm *)bufmgr;
 
    ttm_fence = malloc(sizeof(*ttm_fence));
    if (!ttm_fence)
@@ -641,7 +641,7 @@ static void
 dri_ttm_fence_unreference(dri_fence *fence)
 {
    dri_fence_ttm *fence_ttm = (dri_fence_ttm *)fence;
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)fence->bufmgr;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)fence->bufmgr;
 
    if (!fence)
       return;
@@ -668,7 +668,7 @@ static void
 dri_ttm_fence_wait(dri_fence *fence)
 {
    dri_fence_ttm *fence_ttm = (dri_fence_ttm *)fence;
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)fence->bufmgr;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)fence->bufmgr;
    int ret;
 
    ret = drmFenceWait(bufmgr_ttm->fd, 0, &fence_ttm->drm_fence, 0);
@@ -685,9 +685,9 @@ dri_ttm_fence_wait(dri_fence *fence)
 }
 
 static void
-dri_bufmgr_ttm_destroy(dri_bufmgr *bufmgr)
+ddx_bufmgr_ttm_destroy(ddx_bufmgr *bufmgr)
 {
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)bufmgr;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)bufmgr;
 
    intel_bo_free_list(&bufmgr_ttm->list);
    intel_bo_free_list(&bufmgr_ttm->reloc_list);
@@ -698,19 +698,19 @@ dri_bufmgr_ttm_destroy(dri_bufmgr *bufmgr)
 
 static void intel_dribo_destroy_callback(void *priv)
 {
-   dri_bo *dribo = priv;
+   ddx_bo *dribo = priv;
    
    if (dribo) {
-     dri_bo_unreference(dribo);
+     ddx_bo_unreference(dribo);
    }
 }
 
 static void
-dri_ttm_emit_reloc(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset,
-		    dri_bo *relocatee)
+dri_ttm_emit_reloc(ddx_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t offset,
+		    ddx_bo *relocatee)
 {
-   dri_bo_ttm *ttm_buf = (dri_bo_ttm *)batch_buf;
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)batch_buf->bufmgr;
+   ddx_bo_ttm *ttm_buf = (ddx_bo_ttm *)batch_buf;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)batch_buf->bufmgr;
    int newItem;
    struct intel_reloc_info reloc;
    int mask;
@@ -724,7 +724,7 @@ dri_ttm_emit_reloc(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t o
      return;
 
    if (ret == 1) {
-      dri_bo_reference(relocatee);
+      ddx_bo_reference(relocatee);
    }
 
    reloc.type = I915_RELOC_TYPE_0;
@@ -739,13 +739,13 @@ dri_ttm_emit_reloc(dri_bo *batch_buf, uint32_t flags, uint32_t delta, uint32_t o
 
 
 static void *
-dri_ttm_process_reloc(dri_bo *batch_buf, uint32_t *count)
+dri_ttm_process_reloc(ddx_bo *batch_buf, uint32_t *count)
 {
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)batch_buf->bufmgr;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)batch_buf->bufmgr;
    void *ptr;
    int itemLoc;
 
-   dri_bo_unmap(batch_buf);
+   ddx_bo_unmap(batch_buf);
 
    intel_add_validate_buffer(&bufmgr_ttm->list, batch_buf, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_EXE,
 			     DRM_BO_MASK_MEM | DRM_BO_FLAG_EXE, &itemLoc, NULL);
@@ -756,9 +756,9 @@ dri_ttm_process_reloc(dri_bo *batch_buf, uint32_t *count)
 }
 
 static void
-dri_ttm_post_submit(dri_bo *batch_buf, dri_fence **last_fence)
+dri_ttm_post_submit(ddx_bo *batch_buf, dri_fence **last_fence)
 {
-   dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)batch_buf->bufmgr;
+   ddx_bufmgr_ttm *bufmgr_ttm = (ddx_bufmgr_ttm *)batch_buf->bufmgr;
 
    intel_free_validate_list(bufmgr_ttm->fd, &bufmgr_ttm->list);
    intel_free_reloc_list(bufmgr_ttm->fd, &bufmgr_ttm->reloc_list);
@@ -775,11 +775,11 @@ dri_ttm_post_submit(dri_bo *batch_buf, dri_fence **last_fence)
  * \param fence_type_flush Driver-specific fence type used for fences with a
  *	  flush.
  */
-dri_bufmgr *
-intel_bufmgr_ttm_init(int fd, unsigned int fence_type,
+ddx_bufmgr *
+intelddx_bufmgr_ttm_init(int fd, unsigned int fence_type,
 		      unsigned int fence_type_flush, int batch_size)
 {
-   dri_bufmgr_ttm *bufmgr_ttm;
+   ddx_bufmgr_ttm *bufmgr_ttm;
 
    bufmgr_ttm = malloc(sizeof(*bufmgr_ttm));
    bufmgr_ttm->fd = fd;
@@ -801,7 +801,7 @@ intel_bufmgr_ttm_init(int fd, unsigned int fence_type,
    bufmgr_ttm->bufmgr.fence_reference = dri_ttm_fence_reference;
    bufmgr_ttm->bufmgr.fence_unreference = dri_ttm_fence_unreference;
    bufmgr_ttm->bufmgr.fence_wait = dri_ttm_fence_wait;
-   bufmgr_ttm->bufmgr.destroy = dri_bufmgr_ttm_destroy;
+   bufmgr_ttm->bufmgr.destroy = ddx_bufmgr_ttm_destroy;
    bufmgr_ttm->bufmgr.emit_reloc = dri_ttm_emit_reloc;
    bufmgr_ttm->bufmgr.process_relocs = dri_ttm_process_reloc;
    bufmgr_ttm->bufmgr.post_submit = dri_ttm_post_submit;
diff --git a/src/intel_bufmgr_ttm.h b/src/intel_bufmgr_ttm.h
index 0738839..d67a151 100644
--- a/src/intel_bufmgr_ttm.h
+++ b/src/intel_bufmgr_ttm.h
@@ -4,14 +4,14 @@
 
 #include "dri_bufmgr.h"
 
-extern dri_bo *intel_ttm_bo_create_from_handle(dri_bufmgr *bufmgr, const char *name,
+extern ddx_bo *intelddx_ttm_bo_create_from_handle(ddx_bufmgr *bufmgr, const char *name,
 					       unsigned int handle);
 
-dri_fence *intel_ttm_fence_create_from_arg(dri_bufmgr *bufmgr, const char *name,
+dri_fence *intelddx_ttm_fence_create_from_arg(ddx_bufmgr *bufmgr, const char *name,
 					   drm_fence_arg_t *arg);
 
 
-dri_bufmgr *intel_bufmgr_ttm_init(int fd, unsigned int fence_type,
+ddx_bufmgr *intelddx_bufmgr_ttm_init(int fd, unsigned int fence_type,
 				  unsigned int fence_type_flush, int batch_size);
 
 #endif


More information about the xorg-commit mailing list