virtio-gpu api: multiple context types with explicit initialization
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 21 Sep 2021 23:20:13 +0000 (16:20 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 29 Sep 2021 07:22:29 +0000 (09:22 +0200)
commit34268c9dde4cbae0b701b66c44497da068f418ee
tree06cc0cbb5b5bc814490981ac9c30324f7d90d162
parent93ee1a2c0f08345ab17c51198f725d4c95984f4c
virtio-gpu api: multiple context types with explicit initialization

This feature allows for each virtio-gpu 3D context to be created
with a "context_init" variable.  This variable can specify:

 - the type of protocol used by the context via the capset id.
   This is useful for differentiating virgl, gfxstream, and venus
   protocols by host userspace.

 - other things in the future, such as the version of the context.

In addition, each different context needs one or more timelines, so
for example a virgl context's waiting can be independent on a
gfxstream context's waiting.

VIRTIO_GPU_FLAG_INFO_RING_IDX is introduced to specific to tell the
host which per-context command ring (or "hardware queue", distinct
from the virtio-queue) the fence should be associated with.

The new capability sets (gfxstream, venus etc.) are only defined in
the virtio-gpu spec and not defined in the header.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Lingfeng Yang <lfy@google.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210921232024.817-2-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
include/uapi/linux/virtio_gpu.h