Commit 7547675b authored by Gurchetan Singh's avatar Gurchetan Singh Committed by Gerd Hoffmann

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: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Acked-by: default avatarLingfeng Yang <lfy@google.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210921232024.817-7-gurchetansingh@chromium.orgSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4fb530e5
...@@ -139,7 +139,9 @@ struct virtio_gpu_fence_driver { ...@@ -139,7 +139,9 @@ struct virtio_gpu_fence_driver {
struct virtio_gpu_fence { struct virtio_gpu_fence {
struct dma_fence f; struct dma_fence f;
uint32_t ring_idx;
uint64_t fence_id; uint64_t fence_id;
bool emit_fence_info;
struct virtio_gpu_fence_driver *drv; struct virtio_gpu_fence_driver *drv;
struct list_head node; struct list_head node;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment