drm/amdgpu: switch to gem vma offset manager
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Sep 2019 07:05:06 +0000 (09:05 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 11 Sep 2019 06:03:24 +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>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-6-kraxel@redhat.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 34ee5d725faff456ff835353812391b5f6407690..513dd84569451a9e5b14110acc6343585fd8a864 100644 (file)
@@ -1728,7 +1728,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
        r = ttm_bo_device_init(&adev->mman.bdev,
                               &amdgpu_bo_driver,
                               adev->ddev->anon_inode->i_mapping,
-                              NULL,
+                              adev->ddev->vma_offset_manager,
                               adev->need_dma32);
        if (r) {
                DRM_ERROR("failed initializing buffer object driver(%d).\n", r);