mbox series

[0/3] virtio: add vmap support for prime objects

Message ID 20180925161606.17980-1-ezequiel@collabora.com (mailing list archive)
Headers show
Series virtio: add vmap support for prime objects | expand

Message

Ezequiel Garcia Sept. 25, 2018, 4:16 p.m. UTC
Having the support for vmapping dmabuf's is required to share
dmabufs to drivers that want CPU access. This is the case of
a vivid to virtio-gpu pipeline, where the virtio-gpu driver
exports dmabufs to the video4linux vivid driver.

The first patch adds virtio_gpu_object_kunmap() and calls
it from the TTM object destroy path. This function will be
used to unmap prime objects.

The second patch reworks virtio_gpu_object_kmap(), so it's
balanced with virtio_gpu_object_kunmap.

Finally, the third patch uses virtio_gpu_object_k{map,unmap}
to support prime v{map,unmap}.

Please review!

Ezequiel Garcia (3):
  virtio: Add virtio_gpu_object_kunmap()
  virtio: Rework virtio_gpu_object_kmap()
  virtio: Support prime objects vmap/vunmap

 drivers/gpu/drm/virtio/virtgpu_drv.h    |  3 ++-
 drivers/gpu/drm/virtio/virtgpu_fb.c     | 10 ++--------
 drivers/gpu/drm/virtio/virtgpu_object.c | 19 +++++++++++--------
 drivers/gpu/drm/virtio/virtgpu_prime.c  | 11 ++++++++---
 4 files changed, 23 insertions(+), 20 deletions(-)

Comments

Gerd Hoffmann Sept. 26, 2018, 6:07 a.m. UTC | #1
Hi,

> Having the support for vmapping dmabuf's is required to share
> dmabufs to drivers that want CPU access. This is the case of
> a vivid to virtio-gpu pipeline, where the virtio-gpu driver
> exports dmabufs to the video4linux vivid driver.
> 
> The first patch adds virtio_gpu_object_kunmap() and calls
> it from the TTM object destroy path. This function will be
> used to unmap prime objects.
> 
> The second patch reworks virtio_gpu_object_kmap(), so it's
> balanced with virtio_gpu_object_kunmap.
> 
> Finally, the third patch uses virtio_gpu_object_k{map,unmap}
> to support prime v{map,unmap}.
> 
> Please review!

Pushed to drm-misc-next.

thanks,
  Gerd