diff options
author | Thomas Hellström <thomas@shipmail.org> | 2008-10-29 10:59:33 +0000 |
---|---|---|
committer | Thomas Hellström <thomas@shipmail.org> | 2008-10-29 10:59:33 +0000 |
commit | 764e3dd98e107774eed66033bcf47eb0161819cc (patch) | |
tree | 5638e547f5d79d4acf5e789a5301d4e008f985a6 | |
parent | 2300622f57cab56c7da9ffc3d5765ff8b43b5fe9 (diff) |
libwsdri changes to libwsbm
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/ochr_ioctl.c | 44 | ||||
-rw-r--r-- | src/ochr_ioctl.h | 10 | ||||
-rw-r--r-- | src/ochr_ws_driver.c | 6 | ||||
-rw-r--r-- | src/ochr_ws_driver.h | 6 | ||||
-rw-r--r-- | src/via_3d.c | 4 | ||||
-rw-r--r-- | src/via_3d.h | 8 | ||||
-rw-r--r-- | src/via_accel.c | 90 | ||||
-rw-r--r-- | src/via_cursor.c | 10 | ||||
-rw-r--r-- | src/via_dmabuffer.h | 2 | ||||
-rw-r--r-- | src/via_dri.c | 4 | ||||
-rw-r--r-- | src/via_driver.c | 54 | ||||
-rw-r--r-- | src/via_driver.h | 16 | ||||
-rw-r--r-- | src/via_memcpy.c | 26 | ||||
-rw-r--r-- | src/via_priv.h | 2 | ||||
-rw-r--r-- | src/via_swov.c | 34 | ||||
-rw-r--r-- | src/via_video.c | 4 |
18 files changed, 165 insertions, 165 deletions
diff --git a/configure.ac b/configure.ac index ce12d26..1cdf455 100644 --- a/configure.ac +++ b/configure.ac @@ -72,9 +72,9 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto libdrm $REQUIRED_MODULES]) sdkdir=$(pkg-config --variable=sdkdir xorg-server) -PKG_CHECK_MODULES(libwsdri, libwsdri >= 0.0.1) -AC_SUBST(libwsdri_CFLAGS) -AC_SUBST(libwsdri_LIBS) +PKG_CHECK_MODULES(libwsbm, libwsbm >= 0.0.1) +AC_SUBST(libwsbm_CFLAGS) +AC_SUBST(libwsbm_LIBS) AC_SYS_LARGEFILE # Checks for libraries. diff --git a/src/Makefile.am b/src/Makefile.am index 9a51890..c4f1a57 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,9 +27,9 @@ BUILT_SOURCES = svnversion.h EXTRA_DIST = svnversion.h CONFIG_CLEAN_FILES= svnversion.h -AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @libwsdri_CFLAGS@ -Wall +AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @libwsbm_CFLAGS@ -Wall openchrome_drv_la_LTLIBRARIES = openchrome_drv.la -openchrome_drv_la_LDFLAGS = -module -avoid-version @libwsdri_LIBS@ +openchrome_drv_la_LDFLAGS = -module -avoid-version @libwsbm_LIBS@ openchrome_drv_ladir = @moduledir@/drivers openchrome_drv_la_SOURCES = \ diff --git a/src/ochr_ioctl.c b/src/ochr_ioctl.c index 87f2694..b83df36 100644 --- a/src/ochr_ioctl.c +++ b/src/ochr_ioctl.c @@ -170,7 +170,7 @@ ochr_reset_cmdlists(struct _ViaCommandBuffer *cBuf) if (ret) return ret; - ret = driBOUnrefUserList(cBuf->validate_list); + ret = wsbmBOUnrefUserList(cBuf->validate_list); if (ret) return ret; @@ -218,7 +218,7 @@ ochr_apply_yuv_reloc(uint32_t *cmdbuf, int ochr_yuv_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *buffer, + struct _WsbmBufferObject *buffer, uint32_t delta, int planes, uint32_t plane_0, uint32_t plane_1, uint32_t plane_2, @@ -233,7 +233,7 @@ ochr_yuv_relocation(struct _ViaCommandBuffer *cBuf, uint32_t tmp; uint32_t *cmdbuf = (uint32_t *) cBuf->buf + (cBuf->pos - planes * 2); - ret = driBOAddListItem(cBuf->validate_list, buffer, + ret = wsbmBOAddListItem(cBuf->validate_list, buffer, flags, mask, &itemLoc, &node); if (ret) return ret; @@ -241,8 +241,8 @@ ochr_yuv_relocation(struct _ViaCommandBuffer *cBuf, val_req = ochrValReq(node); if (!(val_req->presumed_flags & VIA_USE_PRESUMED)) { - val_req->presumed_gpu_offset = (uint64_t) driBOOffset(buffer) - - driBOPoolOffset(buffer); + val_req->presumed_gpu_offset = (uint64_t) wsbmBOOffset(buffer) - + wsbmBOPoolOffset(buffer); val_req->presumed_flags |= VIA_USE_PRESUMED; } @@ -251,7 +251,7 @@ ochr_yuv_relocation(struct _ViaCommandBuffer *cBuf, reloc.base.type = VIA_RELOC_YUV; reloc.base.offset = 1; reloc.addr.index = 0; - reloc.addr.delta = delta + driBOPoolOffset(buffer); + reloc.addr.delta = delta + wsbmBOPoolOffset(buffer); reloc.planes = planes; reloc.plane_offs[0] = plane_0; reloc.plane_offs[1] = plane_1; @@ -306,7 +306,7 @@ ochr_apply_2d_reloc(uint32_t * cmdbuf, int ochr_2d_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *buffer, + struct _WsbmBufferObject *buffer, uint32_t delta, uint32_t bpp, uint32_t pos, uint64_t flags, uint64_t mask) { @@ -319,7 +319,7 @@ ochr_2d_relocation(struct _ViaCommandBuffer *cBuf, uint32_t tmp; uint32_t *cmdbuf = (uint32_t *) cBuf->buf + (cBuf->pos - 4); - ret = driBOAddListItem(cBuf->validate_list, buffer, + ret = wsbmBOAddListItem(cBuf->validate_list, buffer, flags, mask, &itemLoc, &node); if (ret) return ret; @@ -327,7 +327,7 @@ ochr_2d_relocation(struct _ViaCommandBuffer *cBuf, val_req = ochrValReq(node); if (!(val_req->presumed_flags & VIA_USE_PRESUMED)) { - val_req->presumed_gpu_offset = (uint64_t) driBOOffset(buffer); + val_req->presumed_gpu_offset = (uint64_t) wsbmBOOffset(buffer); val_req->presumed_flags |= VIA_USE_PRESUMED; } @@ -433,9 +433,9 @@ ochr_tex_relocation(struct _ViaCommandBuffer *cBuf, size_t size; uint32_t *cmdBuf = (uint32_t *) cBuf->buf + cBuf->pos; - driReadLockKernelBO(); + wsbmReadLockKernelBO(); for (i = 0; i <= (hi_mip - low_mip); ++i) { - ret = driBOAddListItem(cBuf->validate_list, addr[i].buf, + ret = wsbmBOAddListItem(cBuf->validate_list, addr[i].buf, flags, mask, &itemLoc, &node); if (ret) return ret; @@ -445,8 +445,8 @@ ochr_tex_relocation(struct _ViaCommandBuffer *cBuf, if (!(val_req->presumed_flags & VIA_USE_PRESUMED)) { val_req->presumed_flags = VIA_USE_PRESUMED; val_req->presumed_gpu_offset = - (uint64_t) driBOOffset(addr[i].buf); - if (driBOPlacement(addr[i].buf) & + (uint64_t) wsbmBOOffset(addr[i].buf); + if (wsbmBOPlacement(addr[i].buf) & (WSBM_PL_FLAG_TT | VIA_PL_FLAG_AGP)) val_req->presumed_flags |= VIA_PRESUMED_AGP; } @@ -462,7 +462,7 @@ ochr_tex_relocation(struct _ViaCommandBuffer *cBuf, fake_addr[count].delta = addr[i].delta; count++; } - driReadUnlockKernelBO(); + wsbmReadUnlockKernelBO(); reloc.type = VIA_RELOC_TEX; reloc.offset = 0; @@ -515,7 +515,7 @@ ochr_apply_dest_reloc(uint32_t ** cmdbuf, int ochr_dest_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *dstBuffer, + struct _WsbmBufferObject *dstBuffer, uint32_t delta, uint64_t flags, uint64_t mask) { struct via_zbuf_reloc reloc; @@ -527,7 +527,7 @@ ochr_dest_relocation(struct _ViaCommandBuffer *cBuf, uint32_t tmp; uint32_t *cmdbuf = (uint32_t *) cBuf->buf + cBuf->pos; - ret = driBOAddListItem(cBuf->validate_list, dstBuffer, + ret = wsbmBOAddListItem(cBuf->validate_list, dstBuffer, flags, mask, &itemLoc, &node); if (ret) return ret; @@ -535,9 +535,9 @@ ochr_dest_relocation(struct _ViaCommandBuffer *cBuf, val_req = ochrValReq(node); if (!(val_req->presumed_flags & VIA_USE_PRESUMED)) { - driReadLockKernelBO(); - val_req->presumed_gpu_offset = (uint64_t) driBOOffset(dstBuffer); - driReadUnlockKernelBO(); + wsbmReadLockKernelBO(); + val_req->presumed_gpu_offset = (uint64_t) wsbmBOOffset(dstBuffer); + wsbmReadUnlockKernelBO(); val_req->presumed_flags |= VIA_USE_PRESUMED; } @@ -582,7 +582,7 @@ ochr_execbuf(int fd, struct _ViaCommandBuffer *cBuf) * prior to the command submission. */ - valList = driGetDRMValidateList(cBuf->validate_list); + valList = wsbmGetKernelValidateList(cBuf->validate_list); iterator = validateListIterator(valList); while (iterator) { node = validateListNode(iterator); @@ -599,7 +599,7 @@ ochr_execbuf(int fd, struct _ViaCommandBuffer *cBuf) *prevNext = (uint64_t) (unsigned long)val_arg; prevNext = &req->next; - req->buffer_handle = wsDriKbufHandle((struct _DriKernelBuf *) + req->buffer_handle = wsbmKbufHandle((struct _WsbmKernelBuf *) node->buf); req->group = 0; req->set_flags = node->set_flags; @@ -667,7 +667,7 @@ ochr_execbuf(int fd, struct _ViaCommandBuffer *cBuf) } rep = &val_arg->d.rep; - wsDriUpdateKbuf((struct _DriKernelBuf *)node->buf, + wsbmUpdateKbuf((struct _WsbmKernelBuf *)node->buf, rep->gpu_offset, rep->placement, rep->fence_type_mask); iterator = validateListNext(valList, iterator); diff --git a/src/ochr_ioctl.h b/src/ochr_ioctl.h index 666bf63..4630485 100644 --- a/src/ochr_ioctl.h +++ b/src/ochr_ioctl.h @@ -2,13 +2,13 @@ #define _OCHR_IOCTL_H_ #include <stdint.h> -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #include "via_dmabuffer.h" struct via_reloc_bufinfo; struct via_reloc_texlist { - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; uint32_t delta; }; @@ -24,7 +24,7 @@ extern int ochr_reset_cmdlists(struct _ViaCommandBuffer *cBuf); extern int ochr_2d_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *buffer, + struct _WsbmBufferObject *buffer, uint32_t delta, uint32_t bpp, uint32_t pos, uint64_t flags, uint64_t mask); extern int @@ -35,11 +35,11 @@ ochr_tex_relocation(struct _ViaCommandBuffer *cBuf, uint32_t reg_tex_fm, uint64_t flags, uint64_t mask); extern int ochr_dest_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *dstBuffer, + struct _WsbmBufferObject *dstBuffer, uint32_t delta, uint64_t flags, uint64_t mask); extern int ochr_yuv_relocation(struct _ViaCommandBuffer *cBuf, - struct _DriBufferObject *buffer, + struct _WsbmBufferObject *buffer, uint32_t delta, int planes, uint32_t plane_0, uint32_t plane_1, uint32_t plane_2, diff --git a/src/ochr_ws_driver.c b/src/ochr_ws_driver.c index 9418c4c..0d08f8c 100644 --- a/src/ochr_ws_driver.c +++ b/src/ochr_ws_driver.c @@ -14,7 +14,7 @@ */ static struct _ValidateNode * -vn_alloc(struct _WSDriVNodeFuncs *func, int type_id) +vn_alloc(struct _WsbmVNodeFuncs *func, int type_id) { if (type_id == 0) { struct _ViaDrmValidateNode *vNode = malloc(sizeof(*vNode)); @@ -63,13 +63,13 @@ vn_clear(struct _ValidateNode *node) } } -static struct _WSDriVNodeFuncs viaVNode = { +static struct _WsbmVNodeFuncs viaVNode = { .alloc = vn_alloc, .free = vn_free, .clear = vn_clear, }; -struct _WSDriVNodeFuncs * +struct _WsbmVNodeFuncs * ochrVNodeFuncs(void) { return &viaVNode; diff --git a/src/ochr_ws_driver.h b/src/ochr_ws_driver.h index 6249872..214859c 100644 --- a/src/ochr_ws_driver.h +++ b/src/ochr_ws_driver.h @@ -1,8 +1,8 @@ #ifndef _OCHR_WS_DRIVER_H_ #define _OCHR_WS_DRIVER_H_ -#include "ws_dri_util.h" -#include "ws_dri_driver.h" +#include "wsbm_util.h" +#include "wsbm_driver.h" #include "via_drm.h" struct _ViaDrmValidateNode @@ -11,7 +11,7 @@ struct _ViaDrmValidateNode struct via_validate_arg val_arg; }; -extern struct _WSDriVNodeFuncs *ochrVNodeFuncs(void); +extern struct _WsbmVNodeFuncs *ochrVNodeFuncs(void); static inline struct via_validate_req * ochrValReq(struct _ValidateNode *node) diff --git a/src/via_3d.c b/src/via_3d.c index 4052a7c..ed6980c 100644 --- a/src/via_3d.c +++ b/src/via_3d.c @@ -127,7 +127,7 @@ via3DTexSupported(int format) } static void -viaSet3DDestination(Via3DState * v3d, struct _DriBufferObject *destBuf, +viaSet3DDestination(Via3DState * v3d, struct _WsbmBufferObject *destBuf, CARD32 destDelta, CARD32 pitch, int format) { v3d->drawingDirty = TRUE; /* Affects planemask format. */ @@ -173,7 +173,7 @@ viaOrder(CARD32 val, CARD32 * shift) } static Bool -viaSet3DTexture(Via3DState * v3d, struct _DriBufferObject *buf, +viaSet3DTexture(Via3DState * v3d, struct _WsbmBufferObject *buf, CARD32 delta, int tex, CARD32 pitch, Bool npot, CARD32 width, CARD32 height, int format, ViaTextureModes sMode, ViaTextureModes tMode, diff --git a/src/via_3d.h b/src/via_3d.h index 12ab1a9..bc12f6c 100644 --- a/src/via_3d.h +++ b/src/via_3d.h @@ -28,7 +28,7 @@ #include "via_dmabuffer.h" #include "ochr_ioctl.h" -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #define VIA_NUM_TEXUNITS 2 @@ -79,7 +79,7 @@ typedef struct _Via3DState CARD32 planeMask; CARD32 solidColor; CARD32 solidAlpha; - struct _DriBufferObject *destBuf; + struct _WsbmBufferObject *destBuf; CARD32 destDelta; CARD32 destPitch; CARD32 destFormat; @@ -95,7 +95,7 @@ typedef struct _Via3DState Bool useDestAlpha; ViaTextureUnit tex[VIA_NUM_TEXUNITS]; void (*setDestination) (struct _Via3DState * v3d, - struct _DriBufferObject *destBuf, + struct _WsbmBufferObject *destBuf, CARD32 delta, CARD32 pitch, int format); void (*setDrawing) (struct _Via3DState * v3d, int rop, @@ -103,7 +103,7 @@ typedef struct _Via3DState void (*setFlags) (struct _Via3DState * v3d, int numTextures, Bool writeAlpha, Bool writeColor, Bool blend); Bool(*setTexture) (struct _Via3DState * v3d, - struct _DriBufferObject *buf, + struct _WsbmBufferObject *buf, CARD32 delta, int tex, CARD32 pitch, Bool nPot, CARD32 width, CARD32 height, int format, diff --git a/src/via_accel.c b/src/via_accel.c index ca77d30..bc470af 100644 --- a/src/via_accel.c +++ b/src/via_accel.c @@ -33,7 +33,7 @@ #include "config.h" #endif -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #include <X11/Xarch.h> #include "xaalocal.h" #include "xaarop.h" @@ -169,7 +169,7 @@ viaSetupCBuffer(ScrnInfoPtr pScrn, ViaCommandBuffer * buf, unsigned size) if (!buf->reloc_info) goto out_err0; - buf->validate_list = driBOCreateList(30); + buf->validate_list = wsbmBOCreateList(30); if (!buf->validate_list) goto out_err1; @@ -188,8 +188,8 @@ void viaTearDownCBuffer(ViaCommandBuffer * buf) { if (buf->validate_list) { - driBOUnrefUserList(buf->validate_list); - driBOFreeList(buf->validate_list); + wsbmBOUnrefUserList(buf->validate_list); + wsbmBOFreeList(buf->validate_list); buf->validate_list = NULL; } if (buf->reloc_info) { @@ -272,7 +272,7 @@ viaAccelSync(ScrnInfoPtr pScrn) static unsigned long viaExaSuperPixmapOffset(PixmapPtr p, - struct _DriBufferObject **driBuf) + struct _WsbmBufferObject **driBuf) { ScreenPtr pScreen = p->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -290,7 +290,7 @@ viaExaSuperPixmapOffset(PixmapPtr p, *driBuf = buf->buf; return (unsigned long)ptr - (unsigned long) buf->virtual + - driBOPoolOffset(buf->buf); + wsbmBOPoolOffset(buf->buf); } @@ -299,7 +299,7 @@ viaEmitPixmap(ViaCommandBuffer *cb, PixmapPtr pDstPix, PixmapPtr pSrcPix) { - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; unsigned long delta; int ret; @@ -334,7 +334,7 @@ viaEmitPixmap(ViaCommandBuffer *cb, */ static void viaAccelSolidHelper(ViaCommandBuffer * cb, int x, int y, int w, int h, - struct _DriBufferObject *buf, + struct _WsbmBufferObject *buf, unsigned delta, unsigned bpp, CARD32 mode, unsigned pitch, CARD32 fg, CARD32 cmd) @@ -474,7 +474,7 @@ viaAccelCopyPixmapHelper(ViaCommandBuffer * cb, int xs, int ys, int xd, int yd, static void viaAccelCopyHelper(ViaCommandBuffer * cb, int xs, int ys, int xd, int yd, int w, int h, - struct _DriBufferObject *buf, + struct _WsbmBufferObject *buf, unsigned long delta, unsigned int bpp, CARD32 mode, unsigned srcPitch, unsigned dstPitch, @@ -572,14 +572,14 @@ viaOrder(CARD32 val, CARD32 * shift) */ struct _ViaOffscreenBuffer * -viaInBuffer(struct _WSDriListHead *head, void *ptr) +viaInBuffer(struct _WsbmListHead *head, void *ptr) { struct _ViaOffscreenBuffer *entry; - struct _WSDriListHead *list; + struct _WsbmListHead *list; unsigned long offset; - WSDRILISTFOREACH(list, head) { - entry = WSDRILISTENTRY(list, struct _ViaOffscreenBuffer, head); + WSBMLISTFOREACH(list, head) { + entry = WSBMLISTENTRY(list, struct _ViaOffscreenBuffer, head); offset = (unsigned long)ptr - (unsigned long)entry->virtual; if (offset < entry->size) return entry; @@ -631,7 +631,7 @@ viaExaSolid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) ViaTwodContext *tdc = &pVia->td; CARD32 dstPitch, dstOffset; int w = x2 - x1, h = y2 - y1; - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; RING_VARS; dstPitch = exaGetPixmapPitch(pPixmap); @@ -659,14 +659,14 @@ static void viaFreeScratchBuffers(VIAPtr pVia) { struct _ViaOffscreenBuffer *entry; - struct _WSDriListHead *list; - struct _WSDriListHead *prev; + struct _WsbmListHead *list; + struct _WsbmListHead *prev; - WSDRILISTFOREACHPREVSAFE(list, prev, &pVia->offscreen) { - entry = WSDRILISTENTRY(list, struct _ViaOffscreenBuffer, head); + WSBMLISTFOREACHPREVSAFE(list, prev, &pVia->offscreen) { + entry = WSBMLISTENTRY(list, struct _ViaOffscreenBuffer, head); if (entry->scratch) { - WSDRILISTDEL(list); - driBOUnReference(entry->buf); + WSBMLISTDEL(list); + wsbmBOUnReference(entry->buf); free(entry); } } @@ -1062,7 +1062,7 @@ viaExaUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst) if (!entry) return FALSE; - ret = driGenBuffers(pVia->mainPool, 1, + ret = wsbmGenBuffers(pVia->mainPool, 1, &entry->buf, 0, VIA_PL_FLAG_AGP | WSBM_PL_FLAG_VRAM); @@ -1075,11 +1075,11 @@ viaExaUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst) dstPitch = (wBytes + 31) & ~31; size = dstPitch * h; - ret = driBOData(entry->buf, size, NULL, NULL, 0); + ret = wsbmBOData(entry->buf, size, NULL, NULL, 0); if (ret) goto out_err1; - dst = driBOMap(entry->buf, 1, WSBM_SYNCCPU_WRITE); + dst = wsbmBOMap(entry->buf, 1, WSBM_SYNCCPU_WRITE); if (dst == NULL) goto out_err1; @@ -1096,17 +1096,17 @@ viaExaUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst) src += srcPitch; } - (void) driBOUnmap(entry->buf); + (void) wsbmBOUnmap(entry->buf); entry->size = size; entry->virtual = pDst->devPrivate.ptr; entry->scratch = TRUE; - WSDRILISTADDTAIL(&entry->head, &pVia->offscreen); + WSBMLISTADDTAIL(&entry->head, &pVia->offscreen); return TRUE; out_err1: - driBOUnReference(entry->buf); + wsbmBOUnReference(entry->buf); out_err0: free(entry); return FALSE; @@ -1207,7 +1207,7 @@ viaExaPrepareComposite(int op, PicturePtr pSrcPicture, int curTex = 0; ViaTexBlendingModes srcMode; CARD32 col; - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; unsigned long delta; delta = viaExaSuperPixmapOffset(pDst, &buf); @@ -1352,7 +1352,7 @@ viaExaPrepareAccess(PixmapPtr pPix, int index) if (buf) { flags = (index == EXA_PREPARE_DEST) ? WSBM_SYNCCPU_WRITE : WSBM_SYNCCPU_READ; - virtual = driBOMap(buf->buf, 1, flags); + virtual = wsbmBOMap(buf->buf, 1, flags); } return TRUE; } @@ -1371,7 +1371,7 @@ viaExaFinishAccess(PixmapPtr pPix, int index) buf = viaInBuffer(&pVia->offscreen, ptr); if (buf) { - (void) driBOUnmap(buf->buf); + (void) wsbmBOUnmap(buf->buf); } } @@ -1478,7 +1478,7 @@ viaInitAccel(ScreenPtr pScreen) * Pixmap cache. */ - ret = driGenBuffers(pVia->mainPool, 1, + ret = wsbmGenBuffers(pVia->mainPool, 1, &pVia->exaMem.buf, 0, WSBM_PL_FLAG_VRAM); if (ret) { @@ -1487,28 +1487,28 @@ viaInitAccel(ScreenPtr pScreen) return FALSE; } - ret = driBOData(pVia->exaMem.buf, exaMemSize, NULL, NULL, 0); + ret = wsbmBOData(pVia->exaMem.buf, exaMemSize, NULL, NULL, 0); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[Accel] Failed allocating offscreen pixmap space.\n"); goto out_err0; } - pVia->exaMem.virtual = driBOMap(pVia->exaMem.buf, 1, + pVia->exaMem.virtual = wsbmBOMap(pVia->exaMem.buf, 1, WSBM_SYNCCPU_READ | WSBM_SYNCCPU_WRITE); if (pVia->exaMem.virtual == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[Accel] Failed mapping offscreen pixmap space.\n"); goto out_err0; } - driBOUnmap(pVia->exaMem.buf); - pVia->exaMem.size = driBOSize(pVia->exaMem.buf); + wsbmBOUnmap(pVia->exaMem.buf); + pVia->exaMem.size = wsbmBOSize(pVia->exaMem.buf); pVia->exaMem.scratch = FALSE; pVia->front.scratch = FALSE; - WSDRIINITLISTHEAD(&pVia->offscreen); - WSDRILISTADDTAIL(&pVia->front.head, &pVia->offscreen); - WSDRILISTADDTAIL(&pVia->exaMem.head, &pVia->offscreen); + WSBMINITLISTHEAD(&pVia->offscreen); + WSBMLISTADDTAIL(&pVia->front.head, &pVia->offscreen); + WSBMLISTADDTAIL(&pVia->exaMem.head, &pVia->offscreen); /* * nPOT textures. DRM versions below 2.11.0 don't allow them. @@ -1547,7 +1547,7 @@ viaInitAccel(ScreenPtr pScreen) out_err0: pVia->NoAccel = TRUE; - driDeleteBuffers(1, &pVia->exaMem.buf); + wsbmDeleteBuffers(1, &pVia->exaMem.buf); return FALSE; } @@ -1574,9 +1574,9 @@ viaExitAccel(ScreenPtr pScreen) pVia->exaDriverPtr = NULL; viaTearDownCBuffer(&pVia->cb); viaFreeScratchBuffers(pVia); - WSDRILISTDELINIT(&pVia->front.head); - WSDRILISTDELINIT(&pVia->exaMem.head); - driDeleteBuffers(1, &pVia->exaMem.buf); + WSBMLISTDELINIT(&pVia->front.head); + WSBMLISTDELINIT(&pVia->exaMem.head); + wsbmDeleteBuffers(1, &pVia->exaMem.buf); return; } @@ -1617,7 +1617,7 @@ viaAccelBlitRect(ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, { VIAPtr pVia = VIAPTR(pScrn); ViaTwodContext *tdc = &pVia->td; - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; unsigned long delta; RING_VARS; @@ -1626,7 +1626,7 @@ viaAccelBlitRect(ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, return; buf = pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]; - delta = driBOPoolOffset(buf); + delta = wsbmBOPoolOffset(buf); if (!pVia->NoAccel) { @@ -1656,7 +1656,7 @@ viaAccelFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, ViaTwodContext *tdc = &pVia->td; CARD32 cmd = VIA_GEC_BLT | VIA_GEC_FIXCOLOR_PAT | VIAACCELPATTERNROP(GXcopy); - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; unsigned long delta; RING_VARS; @@ -1665,7 +1665,7 @@ viaAccelFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, return; buf = pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]; - delta = driBOPoolOffset(buf); + delta = wsbmBOPoolOffset(buf); if (!pVia->NoAccel) { viaAccelSetMode(pScrn->bitsPerPixel, tdc); diff --git a/src/via_cursor.c b/src/via_cursor.c index 6784223..ae060ff 100644 --- a/src/via_cursor.c +++ b/src/via_cursor.c @@ -33,7 +33,7 @@ #include "config.h" #endif -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #include "via.h" #include "via_driver.h" #include "via_id.h" @@ -66,19 +66,19 @@ VIAHWCursorInit(ScreenPtr pScreen) xf86CursorInfoPtr infoPtr; int ret; - ret = driBOData(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], + ret = wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], VIA_CURSOR_SIZE, NULL, NULL, 0); if (ret) return FALSE; - pVia->cursorMap = driBOMap(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], 1, + pVia->cursorMap = wsbmBOMap(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], 1, WSBM_SYNCCPU_READ | WSBM_SYNCCPU_WRITE); if (pVia->cursorMap == NULL) return FALSE; - driBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); - pVia->cursorOffset = driBOOffset(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); + wsbmBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); + pVia->cursorOffset = wsbmBOOffset(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); memset(pVia->cursorMap, 0x00, VIA_CURSOR_SIZE); if (pVia->Chipset == VIA_CX700) { diff --git a/src/via_dmabuffer.h b/src/via_dmabuffer.h index a669373..4a5fcc3 100644 --- a/src/via_dmabuffer.h +++ b/src/via_dmabuffer.h @@ -41,7 +41,7 @@ typedef struct _ViaCommandBuffer Bool has3dState; void (*flushFunc) (struct _ViaCommandBuffer * cb); struct via_reloc_bufinfo *reloc_info; - struct _DriBufferList *validate_list; + struct _WsbmBufferList *validate_list; PixmapPtr srcPixmap; PixmapPtr dstPixmap; diff --git a/src/via_dri.c b/src/via_dri.c index 67e2ce2..9ca0cfd 100644 --- a/src/via_dri.c +++ b/src/via_dri.c @@ -524,10 +524,10 @@ viaDRIUpdateFront(ScreenPtr pScreen) DRIGetSAREAPrivate(pScrn->pScreen); volatile struct drm_via_scanout *front = &saPriv->scanouts[0]; VIAPtr pVia = VIAPTR(pScrn); - struct _DriKernelBuf *buf = wsDriKBuf(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + struct _WsbmKernelBuf *buf = wsbmKBuf(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); ++front->stamp; - front->handle = wsDriKbufHandle(buf); + front->handle = wsbmKbufHandle(buf); front->width = pScrn->virtualX; front->height = pScrn->virtualY; front->stride = pVia->Bpl; diff --git a/src/via_driver.c b/src/via_driver.c index 82ef52d..edea295 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -44,8 +44,8 @@ #include "via_video.h" #include "via.h" #include "ochr_ws_driver.h" -#include <ws_dri_bufpool.h> -#include <ws_dri_bufmgr.h> +#include <wsbm_pool.h> +#include <wsbm_manager.h> #ifdef XF86DRI #include "dri.h" @@ -916,7 +916,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags) pVIAEnt->HasSecondary = FALSE; pVIAEnt->RestorePrimary = FALSE; pVIAEnt->IsSecondaryRestored = FALSE; - ret = wsDriInit(wsDriNullThreadFuncs(), ochrVNodeFuncs()); + ret = wsbmInit(wsbmNullThreadFuncs(), ochrVNodeFuncs()); if (ret) { xfree(pEnt); VIAFreeRec(pScrn); @@ -925,7 +925,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags) } } else { pVia->sharedData = xnfcalloc(sizeof(ViaSharedRec), 1); - ret = wsDriInit(wsDriNullThreadFuncs(), ochrVNodeFuncs()); + ret = wsbmInit(wsbmNullThreadFuncs(), ochrVNodeFuncs()); if (ret) { xfree(pEnt); VIAFreeRec(pScrn); @@ -1795,7 +1795,7 @@ VIAEnterVT(int scrnIndex, int flags) } #endif - retVal = driBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], + retVal = wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], pVia->Bpl * pScrn->virtualY , NULL, NULL, WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT | @@ -1805,7 +1805,7 @@ VIAEnterVT(int scrnIndex, int flags) "Failed reallocating the display buffer."); return FALSE; } - pVia->displayMap = driBOMap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 1, + pVia->displayMap = wsbmBOMap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 1, WSBM_SYNCCPU_READ | WSBM_SYNCCPU_WRITE); if (!pVia->displayMap) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -1813,13 +1813,13 @@ VIAEnterVT(int scrnIndex, int flags) strerror(-ret)); return FALSE; } - driBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + wsbmBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); pVia->front.virtual = pVia->displayMap; - pVia->front.size = driBOSize(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + pVia->front.size = wsbmBOSize(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); viaNewRootPixmap(pScrn); - retVal = driBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], + retVal = wsbmBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT, WSBM_PL_FLAG_SYSTEM); if (retVal) { @@ -1828,10 +1828,10 @@ VIAEnterVT(int scrnIndex, int flags) return FALSE; } - pVia->displayOffset = driBOOffset(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + pVia->displayOffset = wsbmBOOffset(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); - retVal = driBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], + retVal = wsbmBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT, WSBM_PL_FLAG_SYSTEM); @@ -1841,7 +1841,7 @@ VIAEnterVT(int scrnIndex, int flags) return FALSE; } - pVia->cursorOffset = driBOOffset(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); + pVia->cursorOffset = wsbmBOOffset(pVia->scanout.bufs[VIA_SCANOUT_CURSOR]); /* A Patch for APM suspend/resume, when HWCursor has garbage. */ if (pVia->hwcursor) @@ -1919,15 +1919,15 @@ VIALeaveVT(int scrnIndex, int flags) * First move out all buffers so any DRI references won't keep them * in VRAM. */ - (void) driBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], + (void) wsbmBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 0, WSBM_PL_FLAG_NO_EVICT); - (void) driBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], + (void) wsbmBOSetStatus(pVia->scanout.bufs[VIA_SCANOUT_CURSOR], 0, WSBM_PL_FLAG_NO_EVICT); - (void) driBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], + (void) wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 0, NULL, NULL, 0); #ifdef XF86DRI @@ -2504,7 +2504,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pVia->directRenderingEnabled = VIADRIScreenInit(pScreen); pVia->vtNotified = FALSE; if (pVia->directRenderingEnabled && !pVia->IsSecondary) { - pVia->mainPool = driDRMPoolInit(pVia->drmFD, DRM_VIA_TTM_OFFSET); + pVia->mainPool = wsbmTTMPoolInit(pVia->drmFD, DRM_VIA_PLACEMENT_OFFSET); } #else /* @@ -2518,7 +2518,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) "This driver currently requires DRM to operate.\n"); goto out_err1; } - ret = driGenBuffers(pVia->mainPool, VIA_SCANOUT_NUM, + ret = wsbmGenBuffers(pVia->mainPool, VIA_SCANOUT_NUM, pVia->scanout.bufs, 0, WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT); @@ -2541,7 +2541,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } displaySize = pVia->Bpl*pScrn->virtualY; - ret = driBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], + ret = wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], displaySize, NULL, NULL, WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT | @@ -2553,9 +2553,9 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) goto out_err3; } - pVia->front.buf = driBOReference(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + pVia->front.buf = wsbmBOReference(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); pVia->displayMap = NULL; - pVia->displayMap = driBOMap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 1, + pVia->displayMap = wsbmBOMap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY], 1, WSBM_SYNCCPU_READ | WSBM_SYNCCPU_WRITE); if (!pVia->displayMap) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -2564,11 +2564,11 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) goto out_err3; } - driBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + wsbmBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); pVia->front.virtual = pVia->displayMap; - pVia->front.size = driBOSize(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + pVia->front.size = wsbmBOSize(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); - pVia->displayOffset = driBOOffset(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); + pVia->displayOffset = wsbmBOOffset(pVia->scanout.bufs[VIA_SCANOUT_DISPLAY]); pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); @@ -2734,9 +2734,9 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xfree(pVia->ShadowPtr); pVia->ShadowPtr = NULL; out_err3: - driBOUnReference(pVia->front.buf); + wsbmBOUnReference(pVia->front.buf); pVia->front.buf = NULL; - driDeleteBuffers(VIA_SCANOUT_NUM, pVia->scanout.bufs); + wsbmDeleteBuffers(VIA_SCANOUT_NUM, pVia->scanout.bufs); out_err2: if (!pVia->IsSecondary) { pVia->mainPool->takeDown(pVia->mainPool); @@ -2944,9 +2944,9 @@ VIACloseScreen(int scrnIndex, ScreenPtr pScreen) xfree(pVia->ShadowPtr); pVia->ShadowPtr = NULL; - driBOUnReference(pVia->front.buf); + wsbmBOUnReference(pVia->front.buf); pVia->front.buf = NULL; - driDeleteBuffers(VIA_SCANOUT_NUM, pVia->scanout.bufs); + wsbmDeleteBuffers(VIA_SCANOUT_NUM, pVia->scanout.bufs); if (pVia->mainPool && !pVia->IsSecondary) { pVia->mainPool->takeDown(pVia->mainPool); diff --git a/src/via_driver.h b/src/via_driver.h index 4016f4f..c812a0f 100644 --- a/src/via_driver.h +++ b/src/via_driver.h @@ -34,7 +34,7 @@ #define DEBUG(x) #endif -#include <ws_dri_util.h> +#include <wsbm_util.h> #include "vgaHW.h" #include "xf86.h" #include "xf86Resources.h" @@ -210,7 +210,7 @@ typedef struct ScrnInfoPtr pSecondaryScrn; ScrnInfoPtr pPrimaryScrn; - struct _DriBufferPool *mainPool; + struct _WsbmBufferPool *mainPool; #ifdef XF86DRI Bool hasDrm; @@ -227,12 +227,12 @@ enum _ViaScanoutTypes { }; struct _ViaScanouts { - struct _DriBufferObject *bufs[VIA_SCANOUT_NUM]; + struct _WsbmBufferObject *bufs[VIA_SCANOUT_NUM]; }; struct _ViaOffscreenBuffer { - struct _WSDriListHead head; - struct _DriBufferObject *buf; + struct _WsbmListHead head; + struct _WsbmBufferObject *buf; char *virtual; unsigned long size; Bool scratch; @@ -304,7 +304,7 @@ typedef struct _VIA { struct _ViaOffscreenBuffer front; struct _ViaOffscreenBuffer exaMem; - struct _WSDriListHead offscreen; + struct _WsbmListHead offscreen; ExaDriverPtr exaDriverPtr; Bool useEXA; @@ -408,7 +408,7 @@ typedef struct _VIA { ViaSharedPtr sharedData; Bool useDmaBlit; - struct _DriBufferPool *mainPool; + struct _WsbmBufferPool *mainPool; struct _ViaScanouts scanout; void *displayMap; @@ -457,7 +457,7 @@ void viaAccelTextureBlit(ScrnInfoPtr, unsigned long, unsigned, unsigned, unsigned long, unsigned, unsigned, unsigned, unsigned, int); struct _ViaOffscreenBuffer * -viaInBuffer(struct _WSDriListHead *head, void *ptr); +viaInBuffer(struct _WsbmListHead *head, void *ptr); diff --git a/src/via_memcpy.c b/src/via_memcpy.c index 3728aa9..4fb9f9d 100644 --- a/src/via_memcpy.c +++ b/src/via_memcpy.c @@ -25,7 +25,7 @@ #include "config.h" #endif -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #include "via.h" #include "via_driver.h" #include "via_memcpy.h" @@ -534,7 +534,7 @@ viaVidCopyInit(char *copyType, ScreenPtr pScreen) char *tmpBuf, *endBuf; int count, j, bestSoFar; unsigned best, tmp, testSize, alignSize, tmp2; - struct _DriBufferObject *tmpFbBuffer; + struct _WsbmBufferObject *tmpFbBuffer; McFuncData *curData; FILE *cpuInfoFile; double cpuFreq; @@ -580,36 +580,36 @@ viaVidCopyInit(char *copyType, ScreenPtr pScreen) * player buffer (buf2) and a pool of uninitialized "video" data (buf3). */ - ret = driGenBuffers(pVia->mainPool, 1, + ret = wsbmGenBuffers(pVia->mainPool, 1, &tmpFbBuffer, 0, WSBM_PL_FLAG_VRAM | WSBM_PL_FLAG_NO_EVICT); if (ret) return libc_YUV42X; - ret = driBOData(tmpFbBuffer, alignSize + 31, NULL, NULL, 0); + ret = wsbmBOData(tmpFbBuffer, alignSize + 31, NULL, NULL, 0); if (ret) { - driDeleteBuffers(1, &tmpFbBuffer); + wsbmDeleteBuffers(1, &tmpFbBuffer); return libc_YUV42X; } - buf1 = driBOMap(tmpFbBuffer, 1, WSBM_SYNCCPU_WRITE); + buf1 = wsbmBOMap(tmpFbBuffer, 1, WSBM_SYNCCPU_WRITE); if (!buf1) { - driDeleteBuffers(1, &tmpFbBuffer); + wsbmDeleteBuffers(1, &tmpFbBuffer); return libc_YUV42X; } if (NULL == (buf2 = (unsigned char *)xalloc(testSize))) { - driBOUnmap(tmpFbBuffer); - driDeleteBuffers(1, &tmpFbBuffer); + wsbmBOUnmap(tmpFbBuffer); + wsbmDeleteBuffers(1, &tmpFbBuffer); return libc_YUV42X; } if (NULL == (buf3 = (unsigned char *)xalloc(testSize))) { xfree(buf2); - driBOUnmap(tmpFbBuffer); - driDeleteBuffers(1, &tmpFbBuffer); + wsbmBOUnmap(tmpFbBuffer); + wsbmDeleteBuffers(1, &tmpFbBuffer); return libc_YUV42X; } @@ -665,8 +665,8 @@ viaVidCopyInit(char *copyType, ScreenPtr pScreen) } xfree(buf3); xfree(buf2); - driBOUnmap(tmpFbBuffer); - driDeleteBuffers(1, &tmpFbBuffer); + wsbmBOUnmap(tmpFbBuffer); + wsbmDeleteBuffers(1, &tmpFbBuffer); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Using %s YUV42X copy for %s.\n", diff --git a/src/via_priv.h b/src/via_priv.h index 353a248..c6156e7 100644 --- a/src/via_priv.h +++ b/src/via_priv.h @@ -52,7 +52,7 @@ */ struct _HQVBuffer { - struct _DriBufferObject *buf; + struct _WsbmBufferObject *buf; unsigned char *virtual; unsigned long pinnedOffset; unsigned long deltaY; diff --git a/src/via_swov.c b/src/via_swov.c index 6fbb92f..d4cece8 100644 --- a/src/via_swov.c +++ b/src/via_swov.c @@ -27,7 +27,7 @@ #include "config.h" #endif -#include <ws_dri_bufmgr.h> +#include <wsbm_manager.h> #include "xf86.h" #include "xf86_OSproc.h" @@ -951,19 +951,19 @@ AddHQVSurface(ScrnInfoPtr pScrn, unsigned int numbuf, CARD32 fourcc) fbsize = pitch * height * (isplanar ? 2 : 1); - retCode = driBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], fbsize * numbuf, + retCode = wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], fbsize * numbuf, NULL, NULL, 0); if (retCode) return BadAlloc; - hqvMap = driBOMap(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 1, WSBM_SYNCCPU_WRITE); + hqvMap = wsbmBOMap(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 1, WSBM_SYNCCPU_WRITE); if (hqvMap == NULL) return BadAlloc; ViaYUVFillBlack(pVia, hqvMap, fbsize); - driBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY]); + wsbmBOUnmap(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY]); - addr = driBOOffset(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY]); + addr = wsbmBOOffset(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY]); for (i = 0; i < numbuf; i++) { pVia->swov.overlayRecordV1.dwHQVAddr[i] = addr; @@ -1021,7 +1021,7 @@ CreateSurface(ScrnInfoPtr pScrn, CARD32 FourCC, CARD16 Width, struct _HQVBuffer *hqvBuf = &pVia->swov.SWDevice.hqvBuf[i]; if (!hqvBuf->buf) { - retCode = driGenBuffers(pVia->mainPool, 1, + retCode = wsbmGenBuffers(pVia->mainPool, 1, &hqvBuf->buf, 0, WSBM_PL_FLAG_VRAM | hqvFlag); @@ -1031,16 +1031,16 @@ CreateSurface(ScrnInfoPtr pScrn, CARD32 FourCC, CARD16 Width, } } - retCode = driBOData(hqvBuf->buf, fbsize, NULL, NULL, 0); + retCode = wsbmBOData(hqvBuf->buf, fbsize, NULL, NULL, 0); if (retCode) goto out_err; - hqvBuf->virtual = driBOMap(hqvBuf->buf, 1, WSBM_SYNCCPU_WRITE); + hqvBuf->virtual = wsbmBOMap(hqvBuf->buf, 1, WSBM_SYNCCPU_WRITE); if (hqvBuf->virtual == NULL) goto out_err; - hqvBuf->pinnedOffset = driBOOffset(hqvBuf->buf); + hqvBuf->pinnedOffset = wsbmBOOffset(hqvBuf->buf); hqvBuf->deltaY = 0; if (isplanar) { hqvBuf->deltaU = hqvBuf->deltaY + pitch*Height; @@ -1048,7 +1048,7 @@ CreateSurface(ScrnInfoPtr pScrn, CARD32 FourCC, CARD16 Width, } memset(hqvBuf->virtual, 0xff, pitch*Height); - driBOUnmap(hqvBuf->buf); + wsbmBOUnmap(hqvBuf->buf); } } @@ -1066,7 +1066,7 @@ CreateSurface(ScrnInfoPtr pScrn, CARD32 FourCC, CARD16 Width, struct _HQVBuffer *hqvBuf = &pVia->swov.SWDevice.hqvBuf[i]; if (hqvBuf->buf) - (void) driBOData(hqvBuf->buf, 0, NULL, NULL, 0); + (void) wsbmBOData(hqvBuf->buf, 0, NULL, NULL, 0); } return BadAlloc; } @@ -1151,7 +1151,7 @@ ViaSwovSurfaceDestroy(ScrnInfoPtr pScrn, viaPortPrivPtr pPriv) pVia->swov.SrcFourCC = 0; if ((pVia->swov.gdwVideoFlagSW & SW_USE_HQV)) - (void) driBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 0, + (void) wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 0, NULL, NULL, 0); pVia->swov.gdwVideoFlagSW = 0; break; @@ -1159,7 +1159,7 @@ ViaSwovSurfaceDestroy(ScrnInfoPtr pScrn, viaPortPrivPtr pPriv) case FOURCC_YV12: case FOURCC_XVMC: pVia->swov.SrcFourCC = 0; - (void) driBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 0, + (void) wsbmBOData(pVia->scanout.bufs[VIA_SCANOUT_OVERLAY], 0, NULL, NULL, 0); pVia->swov.gdwVideoFlagSW = 0; break; @@ -1169,7 +1169,7 @@ ViaSwovSurfaceDestroy(ScrnInfoPtr pScrn, viaPortPrivPtr pPriv) struct _HQVBuffer *hqvBuf = &pVia->swov.SWDevice.hqvBuf[i]; if (hqvBuf->buf) { - driDeleteBuffers(1, &hqvBuf->buf); + wsbmDeleteBuffers(1, &hqvBuf->buf); hqvBuf->buf = 0; } } @@ -1870,8 +1870,8 @@ Upd_Video(ScrnInfoPtr pScrn, unsigned long videoFlag, * initialization done. */ - ret = driBOSetStatus(hqvBuf->buf, WSBM_PL_FLAG_NO_EVICT, 0); - hqvBuf->pinnedOffset = driBOOffset(hqvBuf->buf); + ret = wsbmBOSetStatus(hqvBuf->buf, WSBM_PL_FLAG_NO_EVICT, 0); + hqvBuf->pinnedOffset = wsbmBOOffset(hqvBuf->buf); viaSetHqvSrc(pScrn, pVia->swov.SrcFourCC, hqvBuf); FlushVidRegBuffer(pVia); @@ -1923,7 +1923,7 @@ Upd_Video(ScrnInfoPtr pScrn, unsigned long videoFlag, DBG_DD(ErrorF(" Wait flips6")); } - ret = driBOSetStatus(hqvBuf->buf, 0, WSBM_PL_FLAG_NO_EVICT); + ret = wsbmBOSetStatus(hqvBuf->buf, 0, WSBM_PL_FLAG_NO_EVICT); if (videoFlag & VIDEO_1_INUSE) { VIDOutD(V1_CONTROL, vidCtl); diff --git a/src/via_video.c b/src/via_video.c index 869b055..e83d33b 100644 --- a/src/via_video.c +++ b/src/via_video.c @@ -1352,7 +1352,7 @@ viaPutImage(ScrnInfoPtr pScrn, } hqvBuf = &pVia->swov.SWDevice.hqvBuf[pVia->dwFrameNum & 1]; - virtual = driBOMap(hqvBuf->buf, 1, WSBM_SYNCCPU_WRITE); + virtual = wsbmBOMap(hqvBuf->buf, 1, WSBM_SYNCCPU_WRITE); if (virtual == NULL) { viaXvError(pScrn, pPriv, xve_mem); @@ -1406,7 +1406,7 @@ viaPutImage(ScrnInfoPtr pScrn, } } - driBOUnmap(hqvBuf->buf); + wsbmBOUnmap(hqvBuf->buf); /* If there is bandwidth issue, block the H/W overlay */ if (!pVia->OverlaySupported && |