summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:32:06 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:53:05 +1100
commit628e84a58fdb26c63a705861b92f65f242613321 (patch)
treebd6084a4dee53a1f180c62f41e790ab490ddf3ee /src/gallium/state_trackers/va
parentba72554f3e576c1674d52ab16d8d2edff9398b71 (diff)
gallium/util: replace pipe_mutex_unlock() with mtx_unlock()
pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va')
-rw-r--r--src/gallium/state_trackers/va/buffer.c30
-rw-r--r--src/gallium/state_trackers/va/config.c8
-rw-r--r--src/gallium/state_trackers/va/context.c8
-rw-r--r--src/gallium/state_trackers/va/image.c40
-rw-r--r--src/gallium/state_trackers/va/picture.c14
-rw-r--r--src/gallium/state_trackers/va/subpicture.c30
-rw-r--r--src/gallium/state_trackers/va/surface.c28
7 files changed, 79 insertions, 79 deletions
diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c
index b9bf6f0add1..fb5b20e44bb 100644
--- a/src/gallium/state_trackers/va/buffer.c
+++ b/src/gallium/state_trackers/va/buffer.c
@@ -66,7 +66,7 @@ vlVaCreateBuffer(VADriverContextP ctx, VAContextID context, VABufferType type,
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
*buf_id = handle_table_add(drv->htab, buf);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -84,7 +84,7 @@ vlVaBufferSetNumElements(VADriverContextP ctx, VABufferID buf_id,
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
@@ -120,7 +120,7 @@ vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuff)
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf || buf->export_refcount > 0) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
@@ -128,7 +128,7 @@ vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuff)
*pbuff = pipe_buffer_map(drv->pipe, buf->derived_surface.resource,
PIPE_TRANSFER_WRITE,
&buf->derived_surface.transfer);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf->derived_surface.transfer || !*pbuff)
return VA_STATUS_ERROR_INVALID_BUFFER;
@@ -140,7 +140,7 @@ vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuff)
*pbuff = buf->data;
}
} else {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
*pbuff = buf->data;
}
@@ -163,20 +163,20 @@ vlVaUnmapBuffer(VADriverContextP ctx, VABufferID buf_id)
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf || buf->export_refcount > 0) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
if (buf->derived_surface.resource) {
if (!buf->derived_surface.transfer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
pipe_buffer_unmap(drv->pipe, buf->derived_surface.transfer);
buf->derived_surface.transfer = NULL;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -194,7 +194,7 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id)
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
@@ -204,7 +204,7 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id)
FREE(buf->data);
FREE(buf);
handle_table_remove(VL_VA_DRIVER(ctx)->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -222,7 +222,7 @@ vlVaBufferInfo(VADriverContextP ctx, VABufferID buf_id, VABufferType *type,
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
@@ -256,7 +256,7 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id,
screen = VL_VA_PSCREEN(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
@@ -304,11 +304,11 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id,
if (!screen->resource_get_handle(screen, drv->pipe,
buf->derived_surface.resource,
&whandle, PIPE_HANDLE_USAGE_READ_WRITE)) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
buf_info->handle = (intptr_t)whandle.handle;
break;
@@ -341,7 +341,7 @@ vlVaReleaseBufferHandle(VADriverContextP ctx, VABufferID buf_id)
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
index 3d4e24bd814..15beb6cd00f 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -202,7 +202,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
mtx_lock(&drv->mutex);
*config_id = handle_table_add(drv->htab, config);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -267,7 +267,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
mtx_lock(&drv->mutex);
*config_id = handle_table_add(drv->htab, config);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -294,7 +294,7 @@ vlVaDestroyConfig(VADriverContextP ctx, VAConfigID config_id)
FREE(config);
handle_table_remove(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -316,7 +316,7 @@ vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!config)
return VA_STATUS_ERROR_INVALID_CONFIG;
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index a3452473484..4224ed7f048 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -216,7 +216,7 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width,
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
is_vpp = config->profile == PIPE_VIDEO_PROFILE_UNKNOWN && !picture_width &&
!picture_height && !flag && !render_targets && !num_render_targets;
@@ -289,7 +289,7 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width,
mtx_lock(&drv->mutex);
*context_id = handle_table_add(drv->htab, context);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -307,7 +307,7 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id)
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
@@ -332,7 +332,7 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id)
}
FREE(context);
handle_table_remove(drv->htab, context_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c
index 2c7afe2a443..2ce22cefe7c 100644
--- a/src/gallium/state_trackers/va/image.c
+++ b/src/gallium/state_trackers/va/image.c
@@ -116,7 +116,7 @@ vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int heig
return VA_STATUS_ERROR_ALLOCATION_FAILED;
mtx_lock(&drv->mutex);
img->image_id = handle_table_add(drv->htab, img);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
img->format = *format;
img->width = width;
@@ -268,7 +268,7 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image)
pipe_resource_reference(&img_buf->derived_surface.resource, surfaces[0]->texture);
img->buf = handle_table_add(VL_VA_DRIVER(ctx)->htab, img_buf);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
*image = *img;
@@ -289,12 +289,12 @@ vlVaDestroyImage(VADriverContextP ctx, VAImageID image)
mtx_lock(&drv->mutex);
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
handle_table_remove(VL_VA_DRIVER(ctx)->htab, image);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
status = vlVaDestroyBuffer(ctx, vaimage->buf);
FREE(vaimage);
return status;
@@ -331,25 +331,25 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
mtx_lock(&drv->mutex);
surf = handle_table_get(drv->htab, surface);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
img_buf = handle_table_get(drv->htab, vaimage->buf);
if (!img_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
format = VaFourccToPipeFormat(vaimage->format.fourcc);
if (format == PIPE_FORMAT_NONE) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
@@ -361,14 +361,14 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
surf->buffer->buffer_format == PIPE_FORMAT_NV12))
convert = true;
else {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
}
views = surf->buffer->get_sampler_view_planes(surf->buffer);
if (!views) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
@@ -398,7 +398,7 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
map = drv->pipe->transfer_map(drv->pipe, views[i]->texture, 0,
PIPE_TRANSFER_READ, &box, &transfer);
if (!map) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
@@ -415,7 +415,7 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
pipe_transfer_unmap(drv->pipe, transfer);
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -442,32 +442,32 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
surf = handle_table_get(drv->htab, surface);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
img_buf = handle_table_get(drv->htab, vaimage->buf);
if (!img_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
if (img_buf->derived_surface.resource) {
/* Attempting to transfer derived image to surface */
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
format = VaFourccToPipeFormat(vaimage->format.fourcc);
if (format == PIPE_FORMAT_NONE) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
@@ -481,7 +481,7 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
tmp_buf = drv->pipe->create_video_buffer(drv->pipe, &templat);
if (!tmp_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
@@ -492,7 +492,7 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
views = surf->buffer->get_sampler_view_planes(surf->buffer);
if (!views) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
@@ -549,7 +549,7 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
}
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
index 6a1adb27378..62a68786c44 100644
--- a/src/gallium/state_trackers/va/picture.c
+++ b/src/gallium/state_trackers/va/picture.c
@@ -53,12 +53,12 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
surf = handle_table_get(drv->htab, render_target);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!surf || !surf->buffer)
return VA_STATUS_ERROR_INVALID_SURFACE;
@@ -497,14 +497,14 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
for (i = 0; i < num_buffers; ++i) {
vlVaBuffer *buf = handle_table_get(drv->htab, buffers[i]);
if (!buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
@@ -548,7 +548,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
break;
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return vaStatus;
}
@@ -571,7 +571,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!context)
return VA_STATUS_ERROR_INVALID_CONTEXT;
@@ -619,6 +619,6 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
surf->force_flushed = true;
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
diff --git a/src/gallium/state_trackers/va/subpicture.c b/src/gallium/state_trackers/va/subpicture.c
index 0d907586fd3..15d52b941c3 100644
--- a/src/gallium/state_trackers/va/subpicture.c
+++ b/src/gallium/state_trackers/va/subpicture.c
@@ -76,19 +76,19 @@ vlVaCreateSubpicture(VADriverContextP ctx, VAImageID image,
mtx_lock(&drv->mutex);
img = handle_table_get(drv->htab, image);
if (!img) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
sub = CALLOC(1, sizeof(*sub));
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
sub->image = img;
*subpicture = handle_table_add(VL_VA_DRIVER(ctx)->htab, sub);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -107,13 +107,13 @@ vlVaDestroySubpicture(VADriverContextP ctx, VASubpictureID subpicture)
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
FREE(sub);
handle_table_remove(drv->htab, subpicture);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -133,12 +133,12 @@ vlVaSubpictureImage(VADriverContextP ctx, VASubpictureID subpicture, VAImageID i
img = handle_table_get(drv->htab, image);
if (!img) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
sub = handle_table_get(drv->htab, subpicture);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!sub)
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
@@ -190,14 +190,14 @@ vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
for (i = 0; i < num_surfaces; i++) {
surf = handle_table_get(drv->htab, target_surfaces[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
}
@@ -219,7 +219,7 @@ vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
if (!drv->pipe->screen->is_format_supported(
drv->pipe->screen, tex_temp.format, tex_temp.target,
tex_temp.nr_samples, tex_temp.bind)) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
@@ -230,7 +230,7 @@ vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
sub->sampler = drv->pipe->create_sampler_view(drv->pipe, tex, &sampler_templ);
pipe_resource_reference(&tex, NULL);
if (!sub->sampler) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
@@ -238,7 +238,7 @@ vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
surf = handle_table_get(drv->htab, target_surfaces[i]);
util_dynarray_append(&surf->subpics, vlVaSubpicture *, sub);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -260,14 +260,14 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
for (i = 0; i < num_surfaces; i++) {
surf = handle_table_get(drv->htab, target_surfaces[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
@@ -283,7 +283,7 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
while (surf->subpics.size && util_dynarray_top(&surf->subpics, vlVaSubpicture *) == NULL)
(void)util_dynarray_pop(&surf->subpics, vlVaSubpicture *);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 363ae66d0c5..1d8d981d1c2 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -74,7 +74,7 @@ vlVaDestroySurfaces(VADriverContextP ctx, VASurfaceID *surface_list, int num_sur
for (i = 0; i < num_surfaces; ++i) {
vlVaSurface *surf = handle_table_get(drv->htab, surface_list[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
if (surf->buffer)
@@ -83,7 +83,7 @@ vlVaDestroySurfaces(VADriverContextP ctx, VASurfaceID *surface_list, int num_sur
FREE(surf);
handle_table_remove(drv->htab, surface_list[i]);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -106,19 +106,19 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target)
surf = handle_table_get(drv->htab, render_target);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
if (!surf->feedback) {
// No outstanding operation: nothing to do.
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
context = handle_table_get(drv->htab, surf->ctx);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
@@ -137,7 +137,7 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target)
context->decoder->get_feedback(context->decoder, surf->feedback, &(surf->coded_buf->coded_size));
surf->feedback = NULL;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -291,7 +291,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
mtx_lock(&drv->mutex);
surf = handle_table_get(drv->htab, surface_id);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
@@ -300,7 +300,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
tex = vscreen->texture_from_drawable(vscreen, draw);
if (!tex) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
@@ -311,7 +311,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
surf_draw = drv->pipe->create_surface(drv->pipe, tex, &surf_templ);
if (!surf_draw) {
pipe_resource_reference(&tex, NULL);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
@@ -327,7 +327,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
status = vlVaPutSubpictures(surf, drv, surf_draw, dirty_area, &src_rect, &dst_rect);
if (status) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return status;
}
@@ -342,7 +342,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
pipe_resource_reference(&tex, NULL);
pipe_surface_reference(&surf_draw, NULL);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
@@ -401,7 +401,7 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id,
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!config)
return VA_STATUS_ERROR_INVALID_CONFIG;
@@ -723,12 +723,12 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
assert(0);
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
no_res:
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (i)
vlVaDestroySurfaces(ctx, surfaces, i);