diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-27 15:44:39 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-28 09:09:01 +0100 |
commit | c837da88c3359fc2c5a8cccde7a78d44e6e61290 (patch) | |
tree | 9515ae8fa41efcf0c4ef7c24f2872a0210367b58 /drivers/gpu/drm/virtio | |
parent | 372c9329e5aa896683999301d9cb10ef14da92af (diff) | |
download | linux-c837da88c3359fc2c5a8cccde7a78d44e6e61290.tar.bz2 |
drm/virtio: implement prime mmap
Sync gem vm_node.start with ttm vm_node.start,
then we can just call drm_gem_prime_mmap().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190227144441.6755-2-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_prime.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index c59ec34c80a5..b4c9199349e7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_prime.c +++ b/drivers/gpu/drm/virtio/virtgpu_prime.c @@ -56,7 +56,10 @@ 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 *area) + struct vm_area_struct *vma) { - return -ENODEV; + struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); + + bo->gem_base.vma_node.vm_node.start = bo->tbo.vma_node.vm_node.start; + return drm_gem_prime_mmap(obj, vma); } |