virglrenderer: drop get_blob_done

vkr no longer needs it to support transfer_3d.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Yiwei Zhang 3 years ago
parent 2668dae374
commit 2b66582c32
  1. 1
      src/proxy/proxy_context.c
  2. 22
      src/venus/vkr_context.c
  3. 6
      src/virgl_context.h
  4. 3
      src/virglrenderer.c
  5. 1
      src/vrend_decode.c

@ -481,7 +481,6 @@ proxy_context_init_base(struct proxy_context *ctx)
ctx->base.detach_resource = proxy_context_detach_resource;
ctx->base.transfer_3d = proxy_context_transfer_3d;
ctx->base.get_blob = proxy_context_get_blob;
ctx->base.get_blob_done = NULL;
ctx->base.submit_cmd = proxy_context_submit_cmd;
ctx->base.get_fencing_fd = proxy_context_get_fencing_fd;

@ -354,6 +354,8 @@ vkr_context_get_blob_locked(struct virgl_context *base,
ret = vkr_device_memory_export_fd(mem, handle_type, &fd);
if (ret)
return ret;
mem->exported = true;
}
blob->type = fd_type;
@ -392,28 +394,11 @@ vkr_context_get_blob(struct virgl_context *base,
mtx_lock(&ctx->mutex);
ret = vkr_context_get_blob_locked(base, blob_id, blob_size, flags, blob);
/* XXX unlock in vkr_context_get_blob_done on success */
if (ret)
mtx_unlock(&ctx->mutex);
mtx_unlock(&ctx->mutex);
return ret;
}
static void
vkr_context_get_blob_done(struct virgl_context *base,
uint32_t res_id,
struct virgl_context_blob *blob)
{
struct vkr_context *ctx = (struct vkr_context *)base;
struct vkr_device_memory *mem = blob->renderer_data;
if (mem)
mem->exported = true;
/* XXX locked in vkr_context_get_blob */
mtx_unlock(&ctx->mutex);
}
static int
vkr_context_transfer_3d(struct virgl_context *base,
struct virgl_resource *res,
@ -563,7 +548,6 @@ vkr_context_init_base(struct vkr_context *ctx)
ctx->base.detach_resource = vkr_context_detach_resource;
ctx->base.transfer_3d = vkr_context_transfer_3d;
ctx->base.get_blob = vkr_context_get_blob;
ctx->base.get_blob_done = vkr_context_get_blob_done;
ctx->base.submit_cmd = vkr_context_submit_cmd;
ctx->base.get_fencing_fd = vkr_context_get_fencing_fd;

@ -88,8 +88,7 @@ struct virgl_context {
/* These are used to create a virgl_resource from a context object.
*
* get_blob returns a virgl_context_blob from which a virgl_resource can be
* created. get_blob_done is optional and allows the context to associate
* the newly created resource with the context object.
* created.
*
* Note that get_blob is a one-time thing. The context object might be
* destroyed or reject subsequent get_blob calls.
@ -99,9 +98,6 @@ struct virgl_context {
uint64_t blob_size,
uint32_t blob_flags,
struct virgl_context_blob *blob);
void (*get_blob_done)(struct virgl_context *ctx,
uint32_t res_id,
struct virgl_context_blob *blob);
int (*submit_cmd)(struct virgl_context *ctx,
const void *buffer,

@ -938,9 +938,6 @@ int virgl_renderer_resource_create_blob(const struct virgl_renderer_resource_cre
res->map_info = blob.map_info;
res->map_size = args->size;
if (ctx->get_blob_done)
ctx->get_blob_done(ctx, args->res_handle, &blob);
return 0;
}

@ -1786,7 +1786,6 @@ static void vrend_decode_ctx_init_base(struct vrend_decode_ctx *dctx,
ctx->detach_resource = vrend_decode_ctx_detach_resource;
ctx->transfer_3d = vrend_decode_ctx_transfer_3d;
ctx->get_blob = vrend_decode_ctx_get_blob;
ctx->get_blob_done = NULL;
ctx->submit_cmd = vrend_decode_ctx_submit_cmd;
ctx->get_fencing_fd = vrend_decode_ctx_get_fencing_fd;

Loading…
Cancel
Save