summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/subpicture.c
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/subpicture.c
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/subpicture.c')
-rw-r--r--src/gallium/state_trackers/va/subpicture.c30
1 files changed, 15 insertions, 15 deletions
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;
}