diff options
author | Timothy Arceri <[email protected]> | 2017-03-05 12:12:30 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-07 08:52:38 +1100 |
commit | ba72554f3e576c1674d52ab16d8d2edff9398b71 (patch) | |
tree | 317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/winsys/svga/drm | |
parent | be188289e1bf0e259c91a751c405d54bb99bc5d4 (diff) |
gallium/util: replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12.
Replaced using:
find ./src -type f -exec sed -i -- \
's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \;
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/svga/drm')
-rw-r--r-- | src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c | 22 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_context.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_fence.c | 8 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_surface.c | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c index 293fe7e032e..85d2afc6f9c 100644 --- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c +++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c @@ -315,7 +315,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr, finished = ops->fence_finish(ops, fenced_buf->fence, 0); - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); assert(pipe_is_referenced(&fenced_buf->base.reference)); @@ -508,7 +508,7 @@ fenced_buffer_destroy(struct pb_buffer *buf) assert(!pipe_is_referenced(&fenced_buf->base.reference)); - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); fenced_buffer_destroy_locked(fenced_mgr, fenced_buf); @@ -525,7 +525,7 @@ fenced_buffer_map(struct pb_buffer *buf, struct pb_fence_ops *ops = fenced_mgr->ops; void *map = NULL; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); assert(!(flags & PB_USAGE_GPU_READ_WRITE)); @@ -576,7 +576,7 @@ fenced_buffer_unmap(struct pb_buffer *buf) struct fenced_buffer *fenced_buf = fenced_buffer(buf); struct fenced_manager *fenced_mgr = fenced_buf->mgr; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); assert(fenced_buf->mapcount); if(fenced_buf->mapcount) { @@ -600,7 +600,7 @@ fenced_buffer_validate(struct pb_buffer *buf, struct fenced_manager *fenced_mgr = fenced_buf->mgr; enum pipe_error ret; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); if(!vl) { /* invalidate */ @@ -649,7 +649,7 @@ fenced_buffer_fence(struct pb_buffer *buf, struct fenced_manager *fenced_mgr = fenced_buf->mgr; struct pb_fence_ops *ops = fenced_mgr->ops; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); assert(pipe_is_referenced(&fenced_buf->base.reference)); assert(fenced_buf->buffer); @@ -688,7 +688,7 @@ fenced_buffer_get_base_buffer(struct pb_buffer *buf, struct fenced_buffer *fenced_buf = fenced_buffer(buf); struct fenced_manager *fenced_mgr = fenced_buf->mgr; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); assert(fenced_buf->buffer); @@ -739,7 +739,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr, fenced_buf->base.vtbl = &fenced_buffer_vtbl; fenced_buf->mgr = fenced_mgr; - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); /* * Try to create GPU storage without stalling, @@ -775,7 +775,7 @@ fenced_bufmgr_flush(struct pb_manager *mgr) { struct fenced_manager *fenced_mgr = fenced_manager(mgr); - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) ; pipe_mutex_unlock(fenced_mgr->mutex); @@ -791,7 +791,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) { struct fenced_manager *fenced_mgr = fenced_manager(mgr); - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); /* Wait on outstanding fences */ while (fenced_mgr->num_fenced) { @@ -799,7 +799,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) #if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) sched_yield(); #endif - pipe_mutex_lock(fenced_mgr->mutex); + mtx_lock(&fenced_mgr->mutex); while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) ; } diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index 8d23bff5d74..a5dd66f36d9 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -528,7 +528,7 @@ vmw_swc_surface_relocation(struct svga_winsys_context *swc, * Make sure backup buffer ends up fenced. */ - pipe_mutex_lock(vsurf->mutex); + mtx_lock(&vsurf->mutex); assert(vsurf->buf != NULL); vmw_swc_mob_relocation(swc, mobid, NULL, (struct svga_winsys_buffer *) diff --git a/src/gallium/winsys/svga/drm/vmw_fence.c b/src/gallium/winsys/svga/drm/vmw_fence.c index b18d5bf5d5d..23713fc5275 100644 --- a/src/gallium/winsys/svga/drm/vmw_fence.c +++ b/src/gallium/winsys/svga/drm/vmw_fence.c @@ -101,7 +101,7 @@ vmw_fences_release(struct vmw_fence_ops *ops) { struct vmw_fence *fence, *n; - pipe_mutex_lock(ops->mutex); + mtx_lock(&ops->mutex); LIST_FOR_EACH_ENTRY_SAFE(fence, n, &ops->not_signaled, ops_list) LIST_DELINIT(&fence->ops_list); pipe_mutex_unlock(ops->mutex); @@ -130,7 +130,7 @@ vmw_fences_signal(struct pb_fence_ops *fence_ops, return; ops = vmw_fence_ops(fence_ops); - pipe_mutex_lock(ops->mutex); + mtx_lock(&ops->mutex); if (!has_emitted) { emitted = ops->last_emitted; @@ -193,7 +193,7 @@ vmw_fence_create(struct pb_fence_ops *fence_ops, uint32_t handle, fence->mask = mask; fence->seqno = seqno; p_atomic_set(&fence->signalled, 0); - pipe_mutex_lock(ops->mutex); + mtx_lock(&ops->mutex); if (vmw_fence_seq_is_signaled(seqno, ops->last_signaled, seqno)) { p_atomic_set(&fence->signalled, 1); @@ -229,7 +229,7 @@ vmw_fence_reference(struct vmw_winsys_screen *vws, vmw_ioctl_fence_unref(vws, vfence->handle); - pipe_mutex_lock(ops->mutex); + mtx_lock(&ops->mutex); LIST_DELINIT(&vfence->ops_list); pipe_mutex_unlock(ops->mutex); diff --git a/src/gallium/winsys/svga/drm/vmw_surface.c b/src/gallium/winsys/svga/drm/vmw_surface.c index 9fadbf95a02..460949dcbb6 100644 --- a/src/gallium/winsys/svga/drm/vmw_surface.c +++ b/src/gallium/winsys/svga/drm/vmw_surface.c @@ -48,7 +48,7 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, *retry = FALSE; assert((flags & (PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE)) != 0); - pipe_mutex_lock(vsrf->mutex); + mtx_lock(&vsrf->mutex); if (vsrf->mapcount) { /* @@ -165,7 +165,7 @@ vmw_svga_winsys_surface_unmap(struct svga_winsys_context *swc, boolean *rebind) { struct vmw_svga_winsys_surface *vsrf = vmw_svga_winsys_surface(srf); - pipe_mutex_lock(vsrf->mutex); + mtx_lock(&vsrf->mutex); if (--vsrf->mapcount == 0) { *rebind = vsrf->rebind; vsrf->rebind = FALSE; |