diff mbox series

[3/8] drm/vram: switch to gem vma offset manager

Message ID 20190905070509.22407-4-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/ttm: remove embedded vma_manager from ttm_bo_device | expand

Commit Message

Gerd Hoffmann Sept. 5, 2019, 7:05 a.m. UTC
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>
---
 drivers/gpu/drm/drm_vram_mm_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Zimmermann Sept. 9, 2019, 7:11 a.m. UTC | #1
Am 05.09.19 um 09:05 schrieb Gerd Hoffmann:
> 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>
> ---
>  drivers/gpu/drm/drm_vram_mm_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c
> index 56fd1519eb35..3b2552bec4e6 100644
> --- a/drivers/gpu/drm/drm_vram_mm_helper.c
> +++ b/drivers/gpu/drm/drm_vram_mm_helper.c
> @@ -172,7 +172,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;
> 

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c
index 56fd1519eb35..3b2552bec4e6 100644
--- a/drivers/gpu/drm/drm_vram_mm_helper.c
+++ b/drivers/gpu/drm/drm_vram_mm_helper.c
@@ -172,7 +172,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;