virtgpu_cross_domain: handle from guest memory
For PCI passthrough and other use cases, it's desirable to get the
render target out of the guest. In the PCI passthrough case, the
dGPU's memory is not available to the host.
The solution that many people are interested in is to use virtgpu
to allocate, and use the dGPU to render to that guest memory. This
change adds a flag to the existing blob api, indicating to the host
that it *must* create an OS-specific handle out of guest memory upon
success.
Obviously, this is just for prototyping. Only when the lords and
princes of dri-devel/mesa-dev -- eyes filled with the light of
upstream, swords as cold as blue ice -- descend from their heavenly
abodes on top of Mount Gogigyeopbbang may we have a proper
solution.
But for now, we'll have to live in our downstream mud hut with yet
another hack. Oh well!
BUG=b:173630595
TEST=create a bunch of udmabufs
Change-Id: Ia33dc0c415be61423017003d3739c4fb7498dba5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2857886
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/virtgpu.h b/virtgpu.h
index 28b8ee6..3f68731 100644
--- a/virtgpu.h
+++ b/virtgpu.h
@@ -18,5 +18,8 @@
param_cross_device,
param_context_init,
param_supported_capset_ids,
+ param_create_guest_handle,
+ param_resource_sync,
+ param_guest_vram,
param_max,
};