drm/vram: switch to gem vma offset manager
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Sep 2019 07:05:04 +0000 (09:05 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 11 Sep 2019 06:03:23 +0000 (08:03 +0200)
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct.  This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-4-kraxel@redhat.com
drivers/gpu/drm/drm_vram_mm_helper.c

index 095049aff1c99f65c45b6dbb2bd31a13d2c0833b..f99baafda67838ac15cdbb5fefaaf77ff07a1a34 100644 (file)
@@ -228,7 +228,7 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
 
        ret = ttm_bo_device_init(&vmm->bdev, &bo_driver,
                                 dev->anon_inode->i_mapping,
-                                NULL,
+                                dev->vma_offset_manager,
                                 true);
        if (ret)
                return ret;