diff options
author | Timothy Arceri <[email protected]> | 2017-03-05 12:32:06 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-07 08:53:05 +1100 |
commit | 628e84a58fdb26c63a705861b92f65f242613321 (patch) | |
tree | bd6084a4dee53a1f180c62f41e790ab490ddf3ee /src/gallium/state_trackers/vdpau | |
parent | ba72554f3e576c1674d52ab16d8d2edff9398b71 (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/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/bitmap.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/decode.c | 18 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/htab.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 26 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 36 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 22 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/query.c | 26 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 30 |
8 files changed, 88 insertions, 88 deletions
diff --git a/src/gallium/state_trackers/vdpau/bitmap.c b/src/gallium/state_trackers/vdpau/bitmap.c index 14f6c36c6cc..643be75e618 100644 --- a/src/gallium/state_trackers/vdpau/bitmap.c +++ b/src/gallium/state_trackers/vdpau/bitmap.c @@ -102,7 +102,7 @@ vlVdpBitmapSurfaceCreate(VdpDevice device, goto err_unlock; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); *surface = vlAddDataHTAB(vlsurface); if (*surface == 0) { @@ -116,7 +116,7 @@ vlVdpBitmapSurfaceCreate(VdpDevice device, err_sampler: pipe_sampler_view_reference(&vlsurface->sampler_view, NULL); err_unlock: - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); DeviceReference(&vlsurface->device, NULL); FREE(vlsurface); return ret; @@ -136,7 +136,7 @@ vlVdpBitmapSurfaceDestroy(VdpBitmapSurface surface) mtx_lock(&vlsurface->device->mutex); pipe_sampler_view_reference(&vlsurface->sampler_view, NULL); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); vlRemoveDataHTAB(surface); DeviceReference(&vlsurface->device, NULL); @@ -203,7 +203,7 @@ vlVdpBitmapSurfacePutBitsNative(VdpBitmapSurface surface, PIPE_TRANSFER_WRITE, &dst_box, *source_data, *source_pitches, 0); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 0f8b8ff606e..66d52257717 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -81,7 +81,7 @@ vlVdpDecoderCreate(VdpDevice device, PIPE_VIDEO_CAP_SUPPORTED ); if (!supported) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_INVALID_DECODER_PROFILE; } @@ -100,13 +100,13 @@ vlVdpDecoderCreate(VdpDevice device, PIPE_VIDEO_CAP_MAX_HEIGHT ); if (width > maxwidth || height > maxheight) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_INVALID_SIZE; } vldecoder = CALLOC(1,sizeof(vlVdpDecoder)); if (!vldecoder) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_RESOURCES; } @@ -137,7 +137,7 @@ vlVdpDecoderCreate(VdpDevice device, } (void) mtx_init(&vldecoder->mutex, mtx_plain); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; @@ -145,7 +145,7 @@ error_handle: vldecoder->decoder->destroy(vldecoder->decoder); error_decoder: - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); DeviceReference(&vldecoder->device, NULL); FREE(vldecoder); return ret; @@ -165,7 +165,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder) mtx_lock(&vldecoder->mutex); vldecoder->decoder->destroy(vldecoder->decoder); - pipe_mutex_unlock(vldecoder->mutex); + mtx_unlock(&vldecoder->mutex); mtx_destroy(&vldecoder->mutex); vlRemoveDataHTAB(decoder); @@ -633,11 +633,11 @@ vlVdpDecoderRender(VdpDecoder decoder, /* still no luck? get me out of here... */ if (!vlsurf->video_buffer) { - pipe_mutex_unlock(vlsurf->device->mutex); + mtx_unlock(&vlsurf->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } vlVdpVideoSurfaceClear(vlsurf); - pipe_mutex_unlock(vlsurf->device->mutex); + mtx_unlock(&vlsurf->device->mutex); } for (i = 0; i < bitstream_buffer_count; ++i) { @@ -678,6 +678,6 @@ vlVdpDecoderRender(VdpDecoder decoder, dec->begin_frame(dec, vlsurf->video_buffer, &desc.base); dec->decode_bitstream(dec, vlsurf->video_buffer, &desc.base, bitstream_buffer_count, buffers, sizes); dec->end_frame(dec, vlsurf->video_buffer, &desc.base); - pipe_mutex_unlock(vldecoder->mutex); + mtx_unlock(&vldecoder->mutex); return ret; } diff --git a/src/gallium/state_trackers/vdpau/htab.c b/src/gallium/state_trackers/vdpau/htab.c index f938a19547e..f596b2d571f 100644 --- a/src/gallium/state_trackers/vdpau/htab.c +++ b/src/gallium/state_trackers/vdpau/htab.c @@ -42,7 +42,7 @@ boolean vlCreateHTAB(void) if (!htab) htab = handle_table_create(); ret = htab != NULL; - pipe_mutex_unlock(htab_lock); + mtx_unlock(&htab_lock); return ret; } @@ -53,7 +53,7 @@ void vlDestroyHTAB(void) handle_table_destroy(htab); htab = NULL; } - pipe_mutex_unlock(htab_lock); + mtx_unlock(&htab_lock); } vlHandle vlAddDataHTAB(void *data) @@ -64,7 +64,7 @@ vlHandle vlAddDataHTAB(void *data) mtx_lock(&htab_lock); if (htab) handle = handle_table_add(htab, data); - pipe_mutex_unlock(htab_lock); + mtx_unlock(&htab_lock); return handle; } @@ -76,7 +76,7 @@ void* vlGetDataHTAB(vlHandle handle) mtx_lock(&htab_lock); if (htab) data = handle_table_get(htab, handle); - pipe_mutex_unlock(htab_lock); + mtx_unlock(&htab_lock); return data; } @@ -85,5 +85,5 @@ void vlRemoveDataHTAB(vlHandle handle) mtx_lock(&htab_lock); if (htab) handle_table_remove(htab, handle); - pipe_mutex_unlock(htab_lock); + mtx_unlock(&htab_lock); } diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index a1c0377ec38..76b52255ef2 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -162,7 +162,7 @@ vlVdpVideoMixerCreate(VdpDevice device, } vmixer->luma_key.luma_min = 1.0f; vmixer->luma_key.luma_max = 0.0f; - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; @@ -173,7 +173,7 @@ no_handle: err_csc_matrix: vl_compositor_cleanup_state(&vmixer->cstate); no_compositor_state: - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); DeviceReference(&vmixer->device, NULL); FREE(vmixer); return ret; @@ -216,7 +216,7 @@ vlVdpVideoMixerDestroy(VdpVideoMixer mixer) vl_bicubic_filter_cleanup(vmixer->bicubic.filter); FREE(vmixer->bicubic.filter); } - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); DeviceReference(&vmixer->device, NULL); FREE(vmixer); @@ -312,7 +312,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, break; default: - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE; } @@ -387,7 +387,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, for (i = 0; i < layer_count; ++i) { vlVdpOutputSurface *src = vlGetDataHTAB(layers->source_surface); if (!src) { - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_INVALID_HANDLE; } @@ -454,7 +454,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, pipe_sampler_view_reference(&sampler_view, NULL); pipe_surface_reference(&surface, NULL); } - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_OK; } @@ -694,7 +694,7 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) { - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_ERROR; } break; @@ -705,11 +705,11 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, break; default: - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE; } } - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_OK; } @@ -889,11 +889,11 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, goto fail; } } - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_OK; fail: - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return ret; } @@ -987,11 +987,11 @@ vlVdpVideoMixerGetAttributeValues(VdpVideoMixer mixer, *(uint8_t*)attribute_values[i] = vmixer->skip_chroma_deint; break; default: - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE; } } - pipe_mutex_unlock(vmixer->device->mutex); + mtx_unlock(&vmixer->device->mutex); return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 5836395bacc..8ef826836c1 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -122,7 +122,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, goto err_resource; vl_compositor_reset_dirty_area(&vlsurface->dirty_area); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; @@ -131,7 +131,7 @@ err_resource: pipe_surface_reference(&vlsurface->surface, NULL); pipe_resource_reference(&res, NULL); err_unlock: - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); DeviceReference(&vlsurface->device, NULL); FREE(vlsurface); return VDP_STATUS_ERROR; @@ -158,7 +158,7 @@ vlVdpOutputSurfaceDestroy(VdpOutputSurface surface) pipe_sampler_view_reference(&vlsurface->sampler_view, NULL); pipe->screen->fence_reference(pipe->screen, &vlsurface->fence, NULL); vl_compositor_cleanup_state(&vlsurface->cstate); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); vlRemoveDataHTAB(surface); DeviceReference(&vlsurface->device, NULL); @@ -222,7 +222,7 @@ vlVdpOutputSurfaceGetBitsNative(VdpOutputSurface surface, box = RectToPipeBox(source_rect, res); map = pipe->transfer_map(pipe, res, 0, PIPE_TRANSFER_READ, &box, &transfer); if (!map) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } @@ -230,7 +230,7 @@ vlVdpOutputSurfaceGetBitsNative(VdpOutputSurface surface, box.width, box.height, map, transfer->stride, 0, 0); pipe_transfer_unmap(pipe, transfer); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; } @@ -266,14 +266,14 @@ vlVdpOutputSurfacePutBitsNative(VdpOutputSurface surface, /* Check for a no-op. (application bug?) */ if (!dst_box.width || !dst_box.height) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; } pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0, PIPE_TRANSFER_WRITE, &dst_box, *source_data, *source_pitches, 0); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; } @@ -410,14 +410,14 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, pipe_sampler_view_reference(&sv_idx, NULL); pipe_sampler_view_reference(&sv_tbl, NULL); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; error_resource: pipe_sampler_view_reference(&sv_idx, NULL); pipe_sampler_view_reference(&sv_tbl, NULL); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } @@ -476,14 +476,14 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, vbuffer = pipe->create_video_buffer(pipe, &vtmpl); if (!vbuffer) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } sampler_views = vbuffer->get_sampler_view_planes(vbuffer); if (!sampler_views) { vbuffer->destroy(vbuffer); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } @@ -516,12 +516,12 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false); vbuffer->destroy(vbuffer); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; err_csc_matrix: vbuffer->destroy(vbuffer); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_ERROR; } @@ -701,7 +701,7 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface, vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false); context->delete_blend_state(context, blend); - pipe_mutex_unlock(dst_vlsurface->device->mutex); + mtx_unlock(&dst_vlsurface->device->mutex); return VDP_STATUS_OK; } @@ -767,7 +767,7 @@ vlVdpOutputSurfaceRenderBitmapSurface(VdpOutputSurface destination_surface, vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false); context->delete_blend_state(context, blend); - pipe_mutex_unlock(dst_vlsurface->device->mutex); + mtx_unlock(&dst_vlsurface->device->mutex); return VDP_STATUS_OK; } @@ -782,7 +782,7 @@ struct pipe_resource *vlVdpOutputSurfaceGallium(VdpOutputSurface surface) mtx_lock(&vlsurface->device->mutex); vlsurface->device->context->flush(vlsurface->device->context, NULL, 0); - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return vlsurface->surface->texture; } @@ -811,11 +811,11 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpOutputSurface surface, if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context, vlsurface->surface->texture, &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); result->handle = whandle.handle; result->width = vlsurface->surface->width; diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index ee32bac1361..7869f4c5031 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -67,11 +67,11 @@ vlVdpPresentationQueueCreate(VdpDevice device, mtx_lock(&dev->mutex); if (!vl_compositor_init_state(&pq->cstate, dev->context)) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); ret = VDP_STATUS_ERROR; goto no_compositor; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); *presentation_queue = vlAddDataHTAB(pq); if (*presentation_queue == 0) { @@ -102,7 +102,7 @@ vlVdpPresentationQueueDestroy(VdpPresentationQueue presentation_queue) mtx_lock(&pq->device->mutex); vl_compositor_cleanup_state(&pq->cstate); - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); vlRemoveDataHTAB(presentation_queue); DeviceReference(&pq->device, NULL); @@ -135,7 +135,7 @@ vlVdpPresentationQueueSetBackgroundColor(VdpPresentationQueue presentation_queue mtx_lock(&pq->device->mutex); vl_compositor_set_clear_color(&pq->cstate, &color); - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); return VDP_STATUS_OK; } @@ -159,7 +159,7 @@ vlVdpPresentationQueueGetBackgroundColor(VdpPresentationQueue presentation_queue mtx_lock(&pq->device->mutex); vl_compositor_get_clear_color(&pq->cstate, &color); - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); background_color->red = color.f[0]; background_color->green = color.f[1]; @@ -188,7 +188,7 @@ vlVdpPresentationQueueGetTime(VdpPresentationQueue presentation_queue, mtx_lock(&pq->device->mutex); *current_time = pq->device->vscreen->get_timestamp(pq->device->vscreen, (void *)pq->drawable); - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); return VDP_STATUS_OK; } @@ -235,7 +235,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vscreen->set_back_texture_from_output(vscreen, surf->surface->texture, clip_width, clip_height); tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable); if (!tex) { - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); return VDP_STATUS_INVALID_HANDLE; } @@ -293,7 +293,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, pipe_resource_reference(&tex, NULL); pipe_surface_reference(&surf_draw, NULL); } - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); return VDP_STATUS_OK; } @@ -327,7 +327,7 @@ vlVdpPresentationQueueBlockUntilSurfaceIdle(VdpPresentationQueue presentation_qu screen->fence_finish(screen, NULL, surf->fence, PIPE_TIMEOUT_INFINITE); screen->fence_reference(screen, &surf->fence, NULL); } - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); return vlVdpPresentationQueueGetTime(presentation_queue, first_presentation_time); } @@ -369,14 +369,14 @@ vlVdpPresentationQueueQuerySurfaceStatus(VdpPresentationQueue presentation_queue if (screen->fence_finish(screen, NULL, surf->fence, 0)) { screen->fence_reference(screen, &surf->fence, NULL); *status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE; - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); // We actually need to query the timestamp of the last VSYNC event from the hardware vlVdpPresentationQueueGetTime(presentation_queue, first_presentation_time); *first_presentation_time += 1; } else { *status = VDP_PRESENTATION_QUEUE_STATUS_QUEUED; - pipe_mutex_unlock(pq->device->mutex); + mtx_unlock(&pq->device->mutex); } } diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c index 87011cb7e5e..6b8b5a6b5d3 100644 --- a/src/gallium/state_trackers/vdpau/query.c +++ b/src/gallium/state_trackers/vdpau/query.c @@ -87,7 +87,7 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chrom /* XXX: Current limits */ *is_supported = true; max_2d_texture_level = pscreen->get_param(pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); if (!max_2d_texture_level) return VDP_STATUS_RESOURCES; @@ -135,7 +135,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp PIPE_FORMAT_NV12, PIPE_VIDEO_PROFILE_UNKNOWN, PIPE_VIDEO_ENTRYPOINT_BITSTREAM)) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } break; @@ -162,7 +162,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp PIPE_VIDEO_PROFILE_UNKNOWN, PIPE_VIDEO_ENTRYPOINT_BITSTREAM ); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -213,7 +213,7 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile, *max_level = 0; *max_macroblocks = 0; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -255,7 +255,7 @@ vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); if (!max_2d_texture_level) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_ERROR; } @@ -264,7 +264,7 @@ vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba *max_width = 0; *max_height = 0; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -302,7 +302,7 @@ vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFor pscreen, format, PIPE_TEXTURE_2D, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET ); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -363,7 +363,7 @@ vlVdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device, pscreen, colortbl_format, PIPE_TEXTURE_1D, 1, PIPE_BIND_SAMPLER_VIEW ); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -413,7 +413,7 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat PIPE_VIDEO_PROFILE_UNKNOWN, PIPE_VIDEO_ENTRYPOINT_BITSTREAM ); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -455,7 +455,7 @@ vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); if (!max_2d_texture_level) { - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_ERROR; } @@ -464,7 +464,7 @@ vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba *max_width = 0; *max_height = 0; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } @@ -556,10 +556,10 @@ vlVdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter case VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE: default: - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER; } - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 39d58490606..884ae308319 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -104,7 +104,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, /* do not mandate early allocation of a video buffer */ vlVdpVideoSurfaceClear(p_surf); - pipe_mutex_unlock(dev->mutex); + mtx_unlock(&dev->mutex); *surface = vlAddDataHTAB(p_surf); if (*surface == 0) { @@ -141,7 +141,7 @@ vlVdpVideoSurfaceDestroy(VdpVideoSurface surface) mtx_lock(&p_surf->device->mutex); if (p_surf->video_buffer) p_surf->video_buffer->destroy(p_surf->video_buffer); - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); vlRemoveDataHTAB(surface); DeviceReference(&p_surf->device, NULL); @@ -241,7 +241,7 @@ vlVdpVideoSurfaceGetBitsYCbCr(VdpVideoSurface surface, mtx_lock(&vlsurface->device->mutex); sampler_views = vlsurface->video_buffer->get_sampler_view_planes(vlsurface->video_buffer); if (!sampler_views) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } @@ -263,7 +263,7 @@ vlVdpVideoSurfaceGetBitsYCbCr(VdpVideoSurface surface, map = pipe->transfer_map(pipe, sv->texture, 0, PIPE_TRANSFER_READ, &box, &transfer); if (!map) { - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_RESOURCES; } @@ -288,7 +288,7 @@ vlVdpVideoSurfaceGetBitsYCbCr(VdpVideoSurface surface, pipe_transfer_unmap(pipe, transfer); } } - pipe_mutex_unlock(vlsurface->device->mutex); + mtx_unlock(&vlsurface->device->mutex); return VDP_STATUS_OK; } @@ -337,7 +337,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_PREFERED_FORMAT); if (nformat == PIPE_FORMAT_NONE) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } } @@ -356,7 +356,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, /* stil no luck? ok forget it we don't support it */ if (!p_surf->video_buffer) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } vlVdpVideoSurfaceClear(p_surf); @@ -373,7 +373,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, sampler_views = p_surf->video_buffer->get_sampler_view_planes(p_surf->video_buffer); if (!sampler_views) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_RESOURCES; } @@ -399,7 +399,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, map = pipe->transfer_map(pipe, tex, 0, usage, &dst_box, &transfer); if (!map) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_RESOURCES; } @@ -422,7 +422,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, usage |= PIPE_TRANSFER_UNSYNCHRONIZED; } } - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_OK; } @@ -472,7 +472,7 @@ struct pipe_video_buffer *vlVdpVideoSurfaceGallium(VdpVideoSurface surface) /* try to create a video buffer if we don't already have one */ p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat); } - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return p_surf->video_buffer; } @@ -511,13 +511,13 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface, /* Check if surface match interop requirements */ if (p_surf->video_buffer == NULL || !p_surf->video_buffer->interlaced || p_surf->video_buffer->buffer_format != PIPE_FORMAT_NV12) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } surf = p_surf->video_buffer->get_surfaces(p_surf->video_buffer)[plane]; if (!surf) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_RESOURCES; } @@ -529,11 +529,11 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface, if (!pscreen->resource_get_handle(pscreen, p_surf->device->context, surf->texture, &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) { - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); return VDP_STATUS_NO_IMPLEMENTATION; } - pipe_mutex_unlock(p_surf->device->mutex); + mtx_unlock(&p_surf->device->mutex); result->handle = whandle.handle; result->width = surf->width; |