diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-23 06:04:11 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-16 11:44:02 +0300 |
commit | 11a8f2805d4fd8a9c340b3f1b77990fd69b2dc0c (patch) | |
tree | 9c4bee2f20c9de5deb8710ea4e3b62f1a79a7ebf /drivers/gpu/drm/virtio/virtgpu_drv.c | |
parent | 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 (diff) | |
download | linux-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.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_drv.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index c27d3a30df0a..1f15ef8f2356 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -118,7 +118,7 @@ static const struct file_operations virtio_gpu_driver_fops = { static struct drm_driver driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, .set_busid = drm_virtio_set_busid, .load = virtio_gpu_driver_load, .unload = virtio_gpu_driver_unload, @@ -133,6 +133,17 @@ static struct drm_driver driver = { .debugfs_init = virtio_gpu_debugfs_init, .debugfs_cleanup = virtio_gpu_debugfs_takedown, #endif + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = drm_gem_prime_export, + .gem_prime_import = drm_gem_prime_import, + .gem_prime_pin = virtgpu_gem_prime_pin, + .gem_prime_unpin = virtgpu_gem_prime_unpin, + .gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table, + .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table, + .gem_prime_vmap = virtgpu_gem_prime_vmap, + .gem_prime_vunmap = virtgpu_gem_prime_vunmap, + .gem_prime_mmap = virtgpu_gem_prime_mmap, .gem_free_object = virtio_gpu_gem_free_object, .gem_open_object = virtio_gpu_gem_object_open, |