summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/virtio/virtgpu_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-01-23 06:04:11 +0300
committerGerd Hoffmann <kraxel@redhat.com>2015-10-16 11:44:02 +0300
commit11a8f2805d4fd8a9c340b3f1b77990fd69b2dc0c (patch)
tree9c4bee2f20c9de5deb8710ea4e3b62f1a79a7ebf /drivers/gpu/drm/virtio/virtgpu_drv.h
parent62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 (diff)
downloadlinux-11a8f2805d4fd8a9c340b3f1b77990fd69b2dc0c.tar.xz
virtio-gpu: add basic prime support
This is enough to enable DRI3. Signed-off-by: Dave Airlie <airlied@redhat.com> 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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 27191088a701..79f0abe69b64 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -359,6 +359,18 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev,
void virtio_gpu_object_free_sg_table(struct virtio_gpu_object *bo);
int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
+/* virtgpu_prime.c */
+int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
+void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
+struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
+struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
+ struct drm_device *dev, struct dma_buf_attachment *attach,
+ struct sg_table *sgt);
+void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
+void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
+int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
+ struct vm_area_struct *vma);
+
static inline struct virtio_gpu_object*
virtio_gpu_object_ref(struct virtio_gpu_object *bo)
{