mirror of https://gitlab.freedesktop.org/mesa/mesa
bab8e77bb2
This change allows creating contexts of depending on set of context parameters. The meaning of each of the parameters is listed below: 1) VIRTGPU_CONTEXT_PARAM_CAPSET_ID This determines the type of a context based on the capability set ID. For example, the current capsets: VIRTIO_GPU_CAPSET_VIRGL VIRTIO_GPU_CAPSET_VIRGL2 define a Gallium, TGSI based "virgl" context. We only need 1 capset ID per context type, though virgl has two due a bug that has since been fixed. The use case is the "gfxstream" rendering library and "venus" renderer. gfxstream doesn't do Gallium/TGSI translation and mostly relies on auto-generated API streaming. Certain users prefer gfxstream over virgl for GLES on GLES emulation. {gfxstream vk}/{venus} are also required for Vulkan emulation. The goal is for guest userspace to choose the optimal context type depending on the situation/hardware. 2) VIRTGPU_CONTEXT_PARAM_NUM_RINGS This tells the number of independent command rings that the context will use. This value may be zero and is inferred to be zero if VIRTGPU_CONTEXT_PARAM_NUM_RINGS is not passed in. This is backwards compatibility for virgl, which has one big giant command ring for all commands. The maxiumum number of rings is 32. In practice, multi-queue or multi-ring submission is used for powerful dGPUs and virtio-gpu may not be the best option in that case (see PCI passthrough or rendernode forwarding). 3) VIRTGPU_CONTEXT_PARAM_POLL_RING_IDX_MASK This is a mask of ring indices for which the DRM fd is pollable. For example, if VIRTGPU_CONTEXT_PARAM_NUM_RINGS is 2, then the mask may be: [ring idx] | [1 << ring_idx] | final mask ------------------------------------------- 0 1 1 1 2 3 The "Sommelier" guest Wayland proxy uses this to poll for events from the host compositor. Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com> Tested-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7712> |
||
---|---|---|
.. | ||
README | ||
amdgpu_drm.h | ||
drm.h | ||
drm_fourcc.h | ||
drm_mode.h | ||
etnaviv_drm.h | ||
i915_drm.h | ||
lima_drm.h | ||
msm_drm.h | ||
panfrost_drm.h | ||
sync_file.h | ||
tegra_drm.h | ||
v3d_drm.h | ||
vc4_drm.h | ||
virtgpu_drm.h |
README
This directory contains a copy of the installed kernel headers required by several drivers to communicate with the kernel. Whenever one of those driver needs new definitions for new kernel APIs, these files should be updated. These files in master should only be updated once the changes have landed in the drm-next tree. You can copy files installed after running this from the kernel repository, at version the drivers require : $ make headers_install INSTALL_HDR_PATH=/path/to/install The last update was done at the following kernel commit : commit 2a7005c8a3982ba27fab237d85c27da446484e9c (HEAD) Merge: 0666cba1f5b2b 47c65b3853f88 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 11 13:34:42 2021 +1000 Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next