summaryrefslogtreecommitdiff
path: root/include/drm/drm_gem_vram_helper.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-09-11 13:09:08 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-09-12 19:54:42 +0200
commitb0e40e0805221dc8e11762717149e2c099e0eb99 (patch)
tree48284f4a74a72b2d58c51c58f54c3fb7d86755e7 /include/drm/drm_gem_vram_helper.h
parent6b5ce4a1fb84898d454c0f3c34abc801f86f4145 (diff)
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 <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-3-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_gem_vram_helper.h')
-rw-r--r--include/drm/drm_gem_vram_helper.h24
1 files changed, 2 insertions, 22 deletions
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
@@ -110,22 +110,6 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
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);
/*