summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:12:30 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:52:38 +1100
commitba72554f3e576c1674d52ab16d8d2edff9398b71 (patch)
tree317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/winsys/virgl
parentbe188289e1bf0e259c91a751c405d54bb99bc5d4 (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/virgl')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c20
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c6
2 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 4f3fa4d810c..3986305706e 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -54,14 +54,14 @@ static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws,
struct drm_gem_close args;
if (res->flinked) {
- pipe_mutex_lock(qdws->bo_handles_mutex);
+ mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_remove(qdws->bo_names,
(void *)(uintptr_t)res->flink);
pipe_mutex_unlock(qdws->bo_handles_mutex);
}
if (res->bo_handle) {
- pipe_mutex_lock(qdws->bo_handles_mutex);
+ mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_remove(qdws->bo_handles,
(void *)(uintptr_t)res->bo_handle);
pipe_mutex_unlock(qdws->bo_handles_mutex);
@@ -98,7 +98,7 @@ virgl_cache_flush(struct virgl_drm_winsys *qdws)
struct list_head *curr, *next;
struct virgl_hw_res *res;
- pipe_mutex_lock(qdws->mutex);
+ mtx_lock(&qdws->mutex);
curr = qdws->delayed.next;
next = curr->next;
@@ -158,7 +158,7 @@ static void virgl_drm_resource_reference(struct virgl_drm_winsys *qdws,
if (!can_cache_resource(old)) {
virgl_hw_res_destroy(qdws, old);
} else {
- pipe_mutex_lock(qdws->mutex);
+ mtx_lock(&qdws->mutex);
virgl_cache_list_check_free(qdws);
old->start = os_time_get();
@@ -310,7 +310,7 @@ virgl_drm_winsys_resource_cache_create(struct virgl_winsys *qws,
bind != VIRGL_BIND_VERTEX_BUFFER && bind != VIRGL_BIND_CUSTOM)
goto alloc;
- pipe_mutex_lock(qdws->mutex);
+ mtx_lock(&qdws->mutex);
res = NULL;
curr = qdws->delayed.next;
@@ -386,7 +386,7 @@ virgl_drm_winsys_resource_create_handle(struct virgl_winsys *qws,
return NULL;
}
- pipe_mutex_lock(qdws->bo_handles_mutex);
+ mtx_lock(&qdws->bo_handles_mutex);
if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
res = util_hash_table_get(qdws->bo_names, (void*)(uintptr_t)handle);
@@ -479,7 +479,7 @@ static boolean virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws,
res->flinked = TRUE;
res->flink = flink.name;
- pipe_mutex_lock(qdws->bo_handles_mutex);
+ mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_set(qdws->bo_names, (void *)(uintptr_t)res->flink, res);
pipe_mutex_unlock(qdws->bo_handles_mutex);
}
@@ -489,7 +489,7 @@ static boolean virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws,
} else if (whandle->type == DRM_API_HANDLE_TYPE_FD) {
if (drmPrimeHandleToFD(qdws->fd, res->bo_handle, DRM_CLOEXEC, (int*)&whandle->handle))
return FALSE;
- pipe_mutex_lock(qdws->bo_handles_mutex);
+ mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_set(qdws->bo_handles, (void *)(uintptr_t)res->bo_handle, res);
pipe_mutex_unlock(qdws->bo_handles_mutex);
}
@@ -814,7 +814,7 @@ virgl_drm_screen_destroy(struct pipe_screen *pscreen)
struct virgl_screen *screen = virgl_screen(pscreen);
boolean destroy;
- pipe_mutex_lock(virgl_screen_mutex);
+ mtx_lock(&virgl_screen_mutex);
destroy = --screen->refcnt == 0;
if (destroy) {
int fd = virgl_drm_winsys(screen->vws)->fd;
@@ -855,7 +855,7 @@ virgl_drm_screen_create(int fd)
{
struct pipe_screen *pscreen = NULL;
- pipe_mutex_lock(virgl_screen_mutex);
+ mtx_lock(&virgl_screen_mutex);
if (!fd_tab) {
fd_tab = util_hash_table_create(hash_fd, compare_fd);
if (!fd_tab)
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index dde53e70794..70bd6aff9bf 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -144,7 +144,7 @@ virgl_cache_flush(struct virgl_vtest_winsys *vtws)
struct list_head *curr, *next;
struct virgl_hw_res *res;
- pipe_mutex_lock(vtws->mutex);
+ mtx_lock(&vtws->mutex);
curr = vtws->delayed.next;
next = curr->next;
@@ -189,7 +189,7 @@ static void virgl_vtest_resource_reference(struct virgl_vtest_winsys *vtws,
if (!can_cache_resource(old)) {
virgl_hw_res_destroy(vtws, old);
} else {
- pipe_mutex_lock(vtws->mutex);
+ mtx_lock(&vtws->mutex);
virgl_cache_list_check_free(vtws);
old->start = os_time_get();
@@ -333,7 +333,7 @@ virgl_vtest_winsys_resource_cache_create(struct virgl_winsys *vws,
bind != VIRGL_BIND_VERTEX_BUFFER && bind != VIRGL_BIND_CUSTOM)
goto alloc;
- pipe_mutex_lock(vtws->mutex);
+ mtx_lock(&vtws->mutex);
res = NULL;
curr = vtws->delayed.next;