mesa/include/drm-uapi
Gurchetan Singh bab8e77bb2 drm-uapi: virtgpu_drm.h: context init feature
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>
2021-09-30 16:45:12 +00:00
..
README include/drm-uapi: bump headers 2021-06-24 16:14:38 +00:00
amdgpu_drm.h include/drm-uapi: bump headers 2021-06-24 16:14:38 +00:00
drm.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
drm_fourcc.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
drm_mode.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
etnaviv_drm.h include/drm-uapi: bump headers 2021-06-24 16:14:38 +00:00
i915_drm.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
lima_drm.h lima: sync lima_drm.h with kernel 2020-01-30 03:39:21 +00:00
msm_drm.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
panfrost_drm.h include/drm-uapi: bump headers 2021-06-24 16:14:38 +00:00
sync_file.h drm-uapi: Add sync_file.h 2020-06-16 16:02:33 +00:00
tegra_drm.h drm-uapi: Update headers from drm-next 2019-02-26 13:08:51 +00:00
v3d_drm.h include/drm-uapi: Bump headers 2021-08-12 19:29:59 +00:00
vc4_drm.h drm-uapi: Update vc4 header with syncobj submit support 2018-05-17 16:04:21 +01:00
virtgpu_drm.h drm-uapi: virtgpu_drm.h: context init feature 2021-09-30 16:45:12 +00:00

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