From b0e40e0805221dc8e11762717149e2c099e0eb99 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 11 Sep 2019 13:09:08 +0200 Subject: drm/vram: Have VRAM MM call GEM VRAM functions directly VRAM MM and GEM VRAM buffer objects are only used with each other; connected via 3 function pointers. Simplify this code by making the memory manager call the rsp. functions of the BOs directly; and remove the functions from the BO's public interface. v2: * typos in commit message Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-3-tzimmermann@suse.de --- include/drm/drm_gem_vram_helper.h | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'include/drm/drm_gem_vram_helper.h') diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h index 1513349a27b1..fd978e0c9542 100644 --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -109,22 +109,6 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file, bool interruptible, struct drm_mode_create_dumb *args); -/* - * Helpers for struct ttm_bo_driver - */ - -void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo, - struct ttm_placement *pl); - -void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo, - bool evict, - struct ttm_mem_reg *new_mem); - -int drm_gem_vram_bo_driver_verify_access(struct ttm_buffer_object *bo, - struct file *filp); - -extern const struct drm_vram_mm_funcs drm_gem_vram_mm_funcs; - /* * Helpers for struct drm_driver */ @@ -170,8 +154,6 @@ struct drm_vram_mm { size_t vram_size; struct ttm_bo_device bdev; - - const struct drm_vram_mm_funcs *funcs; }; /** @@ -190,8 +172,7 @@ static inline struct drm_vram_mm *drm_vram_mm_of_bdev( int drm_vram_mm_debugfs_init(struct drm_minor *minor); int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, - uint64_t vram_base, size_t vram_size, - const struct drm_vram_mm_funcs *funcs); + uint64_t vram_base, size_t vram_size); void drm_vram_mm_cleanup(struct drm_vram_mm *vmm); int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, @@ -202,8 +183,7 @@ int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, */ struct drm_vram_mm *drm_vram_helper_alloc_mm( - struct drm_device *dev, uint64_t vram_base, size_t vram_size, - const struct drm_vram_mm_funcs *funcs); + struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); /* -- cgit