From 628e84a58fdb26c63a705861b92f65f242613321 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Sun, 5 Mar 2017 12:32:06 +1100 Subject: gallium/util: replace pipe_mutex_unlock() with mtx_unlock() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/state_trackers/va/surface.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/gallium/state_trackers/va/surface.c') 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); -- cgit v1.2.3