[PATCH v3 7/8] gem/vram: use drm_gem_ttm_bo_driver_verify_access()

From: Gerd Hoffmann
Date: Thu Aug 08 2019 - 05:37:14 EST


Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
---
include/drm/drm_gem_vram_helper.h | 3 ---
drivers/gpu/drm/drm_gem_vram_helper.c | 22 +---------------------
2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
index 701d2c46a4f4..7723ad59a0c5 100644
--- a/include/drm/drm_gem_vram_helper.h
+++ b/include/drm/drm_gem_vram_helper.h
@@ -98,9 +98,6 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo,
struct ttm_placement *pl);

-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;

/*
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index b78865055990..02d9cf0272bc 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -415,26 +415,6 @@ void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo,
}
EXPORT_SYMBOL(drm_gem_vram_bo_driver_evict_flags);

-/**
- * drm_gem_vram_bo_driver_verify_access() - \
- Implements &struct ttm_bo_driver.verify_access
- * @bo: TTM buffer object. Refers to &struct drm_gem_vram_object.bo
- * @filp: File pointer.
- *
- * Returns:
- * 0 on success, or
- * a negative errno code otherwise.
- */
-int drm_gem_vram_bo_driver_verify_access(struct ttm_buffer_object *bo,
- struct file *filp)
-{
- struct drm_gem_vram_object *gbo = drm_gem_vram_of_bo(bo);
-
- return drm_vma_node_verify_access(&gbo->bo.base.vma_node,
- filp->private_data);
-}
-EXPORT_SYMBOL(drm_gem_vram_bo_driver_verify_access);
-
/*
* drm_gem_vram_mm_funcs - Functions for &struct drm_vram_mm
*
@@ -444,7 +424,7 @@ EXPORT_SYMBOL(drm_gem_vram_bo_driver_verify_access);
*/
const struct drm_vram_mm_funcs drm_gem_vram_mm_funcs = {
.evict_flags = drm_gem_vram_bo_driver_evict_flags,
- .verify_access = drm_gem_vram_bo_driver_verify_access
+ .verify_access = drm_gem_ttm_bo_driver_verify_access
};
EXPORT_SYMBOL(drm_gem_vram_mm_funcs);

--
2.18.1