Re: [PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-07-06 Thread Dmitry Osipenko
On 7/7/23 05:53, Dmitry Osipenko wrote: > On 7/7/23 05:49, Dmitry Osipenko wrote: >> On 6/28/23 18:58, Gurchetan Singh wrote: >>> @@ -168,9 +168,13 @@ static int virtio_gpu_init_submit(struct >>> virtio_gpu_submit *submit, >>> >>> memset(submit, 0, sizeof(*submit)); >>> >>> - out_fence =

Re: [PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-07-06 Thread Dmitry Osipenko
On 7/7/23 05:49, Dmitry Osipenko wrote: > On 6/28/23 18:58, Gurchetan Singh wrote: >> @@ -168,9 +168,13 @@ static int virtio_gpu_init_submit(struct >> virtio_gpu_submit *submit, >> >> memset(submit, 0, sizeof(*submit)); >> >> -out_fence = virtio_gpu_fence_alloc(vgdev, fence_ctx, ring_

Re: [PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-07-06 Thread Dmitry Osipenko
On 6/28/23 18:58, Gurchetan Singh wrote: > @@ -168,9 +168,13 @@ static int virtio_gpu_init_submit(struct > virtio_gpu_submit *submit, > > memset(submit, 0, sizeof(*submit)); > > - out_fence = virtio_gpu_fence_alloc(vgdev, fence_ctx, ring_idx); > - if (!out_fence) > -

Re: [PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-07-05 Thread Dmitry Osipenko
On 7/5/23 18:54, Gurchetan Singh wrote: > On Wed, Jun 28, 2023 at 8:58 AM Gurchetan Singh > wrote: >> >> We don't want to create a fence for every command submission. It's >> only necessary when userspace provides a waitable token for submission. >> This could be: >> >> 1) bo_handles, to be used

Re: [PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-07-05 Thread Gurchetan Singh
On Wed, Jun 28, 2023 at 8:58 AM Gurchetan Singh wrote: > > We don't want to create a fence for every command submission. It's > only necessary when userspace provides a waitable token for submission. > This could be: > > 1) bo_handles, to be used with VIRTGPU_WAIT > 2) out_fence_fd, to be used wi

[PATCH v2] drm/virtio: conditionally allocate virtio_gpu_fence

2023-06-28 Thread Gurchetan Singh
We don't want to create a fence for every command submission. It's only necessary when userspace provides a waitable token for submission. This could be: 1) bo_handles, to be used with VIRTGPU_WAIT 2) out_fence_fd, to be used with dma_fence apis 3) a ring_idx provided with VIRTGPU_CONTEXT_PARAM_P