OSDN Git Service

virtio: Support prime objects vmap/vunmap
authorEzequiel Garcia <ezequiel@collabora.com>
Tue, 25 Sep 2018 16:16:06 +0000 (18:16 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 26 Sep 2018 06:05:07 +0000 (08:05 +0200)
commita03fb71716ee60d1d763f1f27773cbbaec1359ed
treed1636dd2de9dff42aaad4e5fd7e8a11ec7e65d95
parenta20c4173c4219d85ba7775fde584cd34305a0b3d
virtio: Support prime objects vmap/vunmap

Implement vmap/vunmap so we can export dmabufs to
other drivers, such as video4linux.

Tested with a virtio-gpu / vivid (virtual capture driver)
pipeline, where the vivid driver imports the dmabufs exported
by virtio-gpu.

Note that dma_buf_vmap() does its own vmap counting, so
it's not needed to take care of it in the driver.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180925161606.17980-4-ezequiel@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_prime.c