]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/vram: Unexport internal functions of VRAM MM
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 11 Sep 2019 11:09:09 +0000 (13:09 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 12 Sep 2019 17:54:42 +0000 (19:54 +0200)
The init, cleanup and mmap functions of VRAM MM are only used internally.
Remove them from the public interface.

v2:
* update for debugfs support

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-4-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_vram_helper.c
include/drm/drm_gem_vram_helper.h

index b5d342423bb208f42ddaf514784e601f6ffc6bb0..31b037bc2d3f602e193c19d5d661c1ea8073a94a 100644 (file)
@@ -889,19 +889,8 @@ int drm_vram_mm_debugfs_init(struct drm_minor *minor)
 }
 EXPORT_SYMBOL(drm_vram_mm_debugfs_init);
 
-/**
- * drm_vram_mm_init() - Initialize an instance of VRAM MM.
- * @vmm:       the VRAM MM instance to initialize
- * @dev:       the DRM device
- * @vram_base: the base address of the video memory
- * @vram_size: the size of the video memory in bytes
- *
- * Returns:
- * 0 on success, or
- * a negative error code otherwise.
- */
-int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
-                    uint64_t vram_base, size_t vram_size)
+static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
+                           uint64_t vram_base, size_t vram_size)
 {
        int ret;
 
@@ -921,34 +910,17 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
 
        return 0;
 }
-EXPORT_SYMBOL(drm_vram_mm_init);
 
-/**
- * drm_vram_mm_cleanup() - Cleans up an initialized instance of VRAM MM.
- * @vmm:       the VRAM MM instance to clean up
- */
-void drm_vram_mm_cleanup(struct drm_vram_mm *vmm)
+static void drm_vram_mm_cleanup(struct drm_vram_mm *vmm)
 {
        ttm_bo_device_release(&vmm->bdev);
 }
-EXPORT_SYMBOL(drm_vram_mm_cleanup);
 
-/**
- * drm_vram_mm_mmap() - Helper for implementing &struct file_operations.mmap()
- * @filp:      the mapping's file structure
- * @vma:       the mapping's memory area
- * @vmm:       the VRAM MM instance
- *
- * Returns:
- * 0 on success, or
- * a negative error code otherwise.
- */
-int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma,
-                    struct drm_vram_mm *vmm)
+static int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma,
+                           struct drm_vram_mm *vmm)
 {
        return ttm_bo_mmap(filp, vma, &vmm->bdev);
 }
-EXPORT_SYMBOL(drm_vram_mm_mmap);
 
 /*
  * Helpers for integration with struct drm_device
index fd978e0c9542a7a046e6b3f69b51bbd9ac4f0cae..9aaef4f8c32707e06f2ea4a4d84e7b5986098a66 100644 (file)
@@ -171,12 +171,6 @@ 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);
-void drm_vram_mm_cleanup(struct drm_vram_mm *vmm);
-
-int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma,
-                    struct drm_vram_mm *vmm);
 
 /*
  * Helpers for integration with struct drm_device