diff mbox series

[7/8] drm/vram: drop verify_access

Message ID 20190913122908.784-8-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm: rework mmap() workflow | expand

Commit Message

Gerd Hoffmann Sept. 13, 2019, 12:29 p.m. UTC
Not needed any more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c | 22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Thomas Zimmermann Sept. 13, 2019, 1:11 p.m. UTC | #1
Hi

Am 13.09.19 um 14:29 schrieb Gerd Hoffmann:
> Not needed any more.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>  drivers/gpu/drm/drm_gem_vram_helper.c | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index e100b97ea6e3..42ee80414273 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -469,13 +469,6 @@ static void drm_gem_vram_bo_driver_evict_flags(struct drm_gem_vram_object *gbo,
>  	*pl = gbo->placement;
>  }
>  
> -static int drm_gem_vram_bo_driver_verify_access(struct drm_gem_vram_object *gbo,
> -						struct file *filp)
> -{
> -	return drm_vma_node_verify_access(&gbo->bo.base.vma_node,
> -					  filp->private_data);
> -}
> -
>  static void drm_gem_vram_bo_driver_move_notify(struct drm_gem_vram_object *gbo,
>  					       bool evict,
>  					       struct ttm_mem_reg *new_mem)
> @@ -767,20 +760,6 @@ static void bo_driver_evict_flags(struct ttm_buffer_object *bo,
>  	drm_gem_vram_bo_driver_evict_flags(gbo, placement);
>  }
>  
> -static int bo_driver_verify_access(struct ttm_buffer_object *bo,
> -				   struct file *filp)
> -{
> -	struct drm_gem_vram_object *gbo;
> -
> -	/* TTM may pass BOs that are not GEM VRAM BOs. */
> -	if (!drm_is_gem_vram(bo))
> -		return -EINVAL;
> -
> -	gbo = drm_gem_vram_of_bo(bo);
> -
> -	return drm_gem_vram_bo_driver_verify_access(gbo, filp);
> -}
> -
>  static void bo_driver_move_notify(struct ttm_buffer_object *bo,
>  				  bool evict,
>  				  struct ttm_mem_reg *new_mem)
> @@ -837,7 +816,6 @@ static struct ttm_bo_driver bo_driver = {
>  	.init_mem_type = bo_driver_init_mem_type,
>  	.eviction_valuable = ttm_bo_eviction_valuable,
>  	.evict_flags = bo_driver_evict_flags,
> -	.verify_access = bo_driver_verify_access,
>  	.move_notify = bo_driver_move_notify,
>  	.io_mem_reserve = bo_driver_io_mem_reserve,
>  	.io_mem_free = bo_driver_io_mem_free,
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index e100b97ea6e3..42ee80414273 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -469,13 +469,6 @@  static void drm_gem_vram_bo_driver_evict_flags(struct drm_gem_vram_object *gbo,
 	*pl = gbo->placement;
 }
 
-static int drm_gem_vram_bo_driver_verify_access(struct drm_gem_vram_object *gbo,
-						struct file *filp)
-{
-	return drm_vma_node_verify_access(&gbo->bo.base.vma_node,
-					  filp->private_data);
-}
-
 static void drm_gem_vram_bo_driver_move_notify(struct drm_gem_vram_object *gbo,
 					       bool evict,
 					       struct ttm_mem_reg *new_mem)
@@ -767,20 +760,6 @@  static void bo_driver_evict_flags(struct ttm_buffer_object *bo,
 	drm_gem_vram_bo_driver_evict_flags(gbo, placement);
 }
 
-static int bo_driver_verify_access(struct ttm_buffer_object *bo,
-				   struct file *filp)
-{
-	struct drm_gem_vram_object *gbo;
-
-	/* TTM may pass BOs that are not GEM VRAM BOs. */
-	if (!drm_is_gem_vram(bo))
-		return -EINVAL;
-
-	gbo = drm_gem_vram_of_bo(bo);
-
-	return drm_gem_vram_bo_driver_verify_access(gbo, filp);
-}
-
 static void bo_driver_move_notify(struct ttm_buffer_object *bo,
 				  bool evict,
 				  struct ttm_mem_reg *new_mem)
@@ -837,7 +816,6 @@  static struct ttm_bo_driver bo_driver = {
 	.init_mem_type = bo_driver_init_mem_type,
 	.eviction_valuable = ttm_bo_eviction_valuable,
 	.evict_flags = bo_driver_evict_flags,
-	.verify_access = bo_driver_verify_access,
 	.move_notify = bo_driver_move_notify,
 	.io_mem_reserve = bo_driver_io_mem_reserve,
 	.io_mem_free = bo_driver_io_mem_free,