diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2021-09-22 01:20:21 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-09-29 09:22:31 +0200 |
commit | 85c83ea915ed3980c816c7bc44b2aca5c81ee1e2 (patch) | |
tree | 9d00f7d1b66b32a1e69fab11ddd5ec1238fea0bc /drivers/gpu/drm/virtio/virtgpu_drv.h | |
parent | drm/virtio: implement context init: stop using drv->context when creating fence (diff) | |
download | linux-85c83ea915ed3980c816c7bc44b2aca5c81ee1e2.tar.xz linux-85c83ea915ed3980c816c7bc44b2aca5c81ee1e2.zip |
drm/virtio: implement context init: allocate an array of fence contexts
We don't want fences from different 3D contexts (virgl, gfxstream,
venus) to be on the same timeline. With explicit context creation,
we can specify the number of ring each context wants.
Execbuffer can specify which ring to use.
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Lingfeng Yang <lfy@google.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210921232024.817-10-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_drv.h')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_drv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index a5142d60c2fa..cca9ab505deb 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -56,6 +56,7 @@ #define STATE_ERR 2 #define MAX_CAPSET_ID 63 +#define MAX_RINGS 64 struct virtio_gpu_object_params { unsigned long size; @@ -263,6 +264,8 @@ struct virtio_gpu_fpriv { uint32_t ctx_id; uint32_t context_init; bool context_created; + uint32_t num_rings; + uint64_t base_fence_ctx; struct mutex context_lock; }; |