Re: [PATCH v4 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-30 Thread Chia-I Wu
On Fri, Jun 28, 2019 at 3:05 AM Gerd Hoffmann wrote: > > On Wed, Jun 26, 2019 at 04:55:20PM -0700, Chia-I Wu wrote: > > On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote: > > > > > > Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). > > > This also makes the ioctl run

Re: [PATCH v4 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-28 Thread Gerd Hoffmann
On Wed, Jun 26, 2019 at 04:55:20PM -0700, Chia-I Wu wrote: > On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote: > > > > Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). > > This also makes the ioctl run lockless. > The userspace has a BO cache to avoid freeing BOs immediately

Re: [PATCH v4 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-26 Thread Chia-I Wu
On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote: > > Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). > This also makes the ioctl run lockless. The userspace has a BO cache to avoid freeing BOs immediately but to reuse them on next allocations. The BO cache checks if a BO

[PATCH v4 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-20 Thread Gerd Hoffmann
Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). This also makes the ioctl run lockless. v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24