]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: implement context init: track {ring_idx, emit_fence_info} in virtio_gpu_fence
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 21 Sep 2021 23:20:18 +0000 (16:20 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 29 Sep 2021 07:22:30 +0000 (09:22 +0200)
commit7dc2a18579e062d140ff17045d61ef41ab71488e
tree8392c8e8880f144523cc175f86561168650311e9
parentb3cfb245a9f6ad7cc28451e750d6312a92767b38
drm/virtio: implement context init: track {ring_idx, emit_fence_info} in virtio_gpu_fence

Each fence should be associated with a [fence ID, fence_context,
seqno].  The seqno number is just the fence id.

To get the fence context, we add the ring_idx to the 3D context's
base_fence_ctx.  The ring_idx is between 0 and 31, inclusive.

Each 3D context will have it's own base_fence_ctx. The ring_idx will
be emitted to host userspace, when emit_fence_info is true.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Lingfeng Yang <lfy@google.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210921232024.817-7-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.h