linux/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
/**
 * vmw_kms_helper_resource_finish - Unreserve and fence a resource after
 * kms command submission.
 *
 * @res: Pointer to the resource. Typically a surface.
 * @out_fence: Optional pointer to a fence pointer. If non-NULL, a
 * ref-counted fence pointer is returned here.
 */
Unreserve and fence a resource after
kms command submission.

@res: Pointer to the resource. Typically a surface.
@out_fence: Optional pointer to a fence pointer. If non-NULL, a
ref-counted fence pointer is returned here.
Unreserve and fence a resource after kms command submission . @res : Pointer to the resource . Typically a surface . @out_fence : Optional pointer to a fence pointer . If non - NULL a ref - counted fence pointer is returned here .
void vmw_kms_helper_resource_finish(struct vmw_validation_ctx *ctx,
				    struct vmw_fence_obj **out_fence)
{
	struct vmw_resource *res = ctx->res;
	if (ctx->buf || out_fence)
		vmw_kms_helper_buffer_finish(res->dev_priv, NULL, ctx->buf,
					     out_fence, NULL);
	vmw_bo_unreference(&ctx->buf);
	vmw_resource_unreserve(res, false, NULL, 0);
	mutex_unlock(&res->dev_priv->cmdbuf_mutex);
}
void vmw_kms_helper_resource_finish ( struct vmw_validation_ctx * ctx , struct vmw_fence_obj * * out_fence ) { struct vmw_resource * res = ctx -> res ; if ( ctx -> buf || out_fence ) vmw_kms_helper_buffer_finish ( res -> dev_priv , NULL , ctx -> buf , out_fence , NULL ) ; vmw_bo_unreference ( & ctx -> buf ) ; vmw_resource_unreserve ( res , false , NULL , 0 ) ; mutex_unlock ( & res -> dev_priv -> cmdbuf_mutex ) ; }
vmw_kms_helper_resource_finish - Unreserve and fence a resource after
 kms command submission.
vmw_kms_helper_resource_finish - Unreserve and fence a resource after kms command submission .