diff options
author | Rob Clark <robdclark@chromium.org> | 2022-02-02 10:56:26 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-03-25 02:03:30 +0000 |
commit | 802f4da5eecc4d23adc29f212c5e7fcf491e1349 (patch) | |
tree | b33ac4d49e8e6c7bbe52ef60e8b4418a02561489 /include | |
parent | 2200d674e4b6b6fdafb30455e350a503d01088c6 (diff) |
freedreno/drm: Add virtio backend
Add a new backend to enable using native driver in a VM guest, via a new
virtgpu context type which (indirectly) makes host kernel interface
available in guest and handles the details of mapping buffers to guest,
etc.
Note that fence-fd's are currently a bit awkward, in that they get
signaled by the guest kernel driver (drm/virtio) once virglrenderer in
the host has processed the execbuf, not when host kernel has signaled
the submit fence. For passing buffers to the host (virtio-wl) the egl
context in virglrenderer is used to create a fence on the host side.
But use of out-fence-fd's in guest could have slightly unexpected
results. For this reason we limit all submitqueues to default priority
(so they cannot be preepmted by host egl context). AFAICT virgl and
venus have a similar problem, which will eventually be solveable once we
have RESOURCE_CREATE_SYNC.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14900>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm-uapi/virtgpu_drm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm-uapi/virtgpu_drm.h b/include/drm-uapi/virtgpu_drm.h index a13e20cc66b..edead0e3b8d 100644 --- a/include/drm-uapi/virtgpu_drm.h +++ b/include/drm-uapi/virtgpu_drm.h @@ -163,6 +163,7 @@ struct drm_virtgpu_resource_create_blob { #define VIRTGPU_BLOB_FLAG_USE_MAPPABLE 0x0001 #define VIRTGPU_BLOB_FLAG_USE_SHAREABLE 0x0002 #define VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE 0x0004 +#define VIRTGPU_BLOB_FLAG_USE_INTERNAL 0x0008 /* not-mappable, not-shareable */ /* zero is invalid blob_mem */ __u32 blob_mem; __u32 blob_flags; |