rutabaga_gfx: gfxstream: Save iovecs in gfxstream

The virtio gpu resource used as a ring buffer for sending
CROSS_DOMAIN_CMD_GET_IMAGE_REQUIREMENTS responses back to the
guest is created with VIRTGPU_BLOB_MEM_GUEST. Because of this, it
is initially created with via a resource_create_blob() without a
ctx_id. The rutabaga backend routes resource_create_blob() requests
without a ctx_id to the default component which is Gfxstream on
Cuttlefish. The Gfxstream component needs to attach the backing
iovecs to the RutabagaResource in order for CrossDomainContext to
eventually take ownership of them.

BUG=b:189133053
TEST=launch Cuttlefish w/ cross domain

Change-Id: I1779fcae2c612dae55ca66fe61a5d2f966cedc1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3131442
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
This commit is contained in:
Jason Macnak 2021-08-30 15:13:33 -07:00 committed by Commit Bot
parent dcfb7de431
commit 1cb7028070

View file

@ -422,7 +422,7 @@ impl RutabagaComponent for Gfxstream {
_ctx_id: u32,
resource_id: u32,
resource_create_blob: ResourceCreateBlob,
_iovec_opt: Option<Vec<RutabagaIovec>>,
iovec_opt: Option<Vec<RutabagaIovec>>,
) -> RutabagaResult<RutabagaResource> {
unsafe {
stream_renderer_resource_create_v2(resource_id, resource_create_blob.blob_id);
@ -437,7 +437,7 @@ impl RutabagaComponent for Gfxstream {
info_2d: None,
info_3d: None,
vulkan_info: None,
backing_iovecs: None,
backing_iovecs: iovec_opt,
})
}