diff mbox series

[31/45] drm/radeon: switch to invalidate notify callback

Message ID 20200924051845.397177-32-airlied@gmail.com (mailing list archive)
State New, archived
Headers show
Series TTM move refactoring | expand

Commit Message

Dave Airlie Sept. 24, 2020, 5:18 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/radeon/radeon_object.c | 7 +------
 drivers/gpu/drm/radeon/radeon_object.h | 4 +---
 drivers/gpu/drm/radeon/radeon_ttm.c    | 2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 36a16d7a24b2..44e2e7475dfe 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -769,18 +769,13 @@  void radeon_bo_memory_usage(struct radeon_bo *rbo,
 	radeon_update_memory_usage(rbo, new_mem_type, 1);
 }
 
-void radeon_bo_move_notify(struct ttm_buffer_object *bo,
-			   bool evict,
-			   struct ttm_resource *new_mem)
+void radeon_bo_invalidate_notify(struct ttm_buffer_object *bo)
 {
 	struct radeon_bo *rbo;
 
 	if (!radeon_ttm_bo_is_radeon_bo(bo))
 		return;
 
-	/* the new_mem path is handled via the move callback now */
-	if (new_mem)
-		return;
 	rbo = container_of(bo, struct radeon_bo, tbo);
 	radeon_bo_invalidate(rbo);
 }
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index 6f886e2ffaf3..a4ecff031f8f 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -164,9 +164,7 @@  void radeon_bo_memory_usage(struct radeon_bo *rbo,
 			    uint32_t old_mem_type,
 			    uint32_t new_mem_type);
 void radeon_bo_invalidate(struct radeon_bo *rbo);
-extern void radeon_bo_move_notify(struct ttm_buffer_object *bo,
-				  bool evict,
-				  struct ttm_resource *new_mem);
+void radeon_bo_invalidate_notify(struct ttm_buffer_object *bo);
 extern int radeon_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
 extern int radeon_bo_get_surface_reg(struct radeon_bo *bo);
 extern void radeon_bo_fence(struct radeon_bo *bo, struct radeon_fence *fence,
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 490c7355c9cc..b38bc688f665 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -839,7 +839,7 @@  static struct ttm_bo_driver radeon_bo_driver = {
 	.evict_flags = &radeon_evict_flags,
 	.move = &radeon_bo_move,
 	.verify_access = &radeon_verify_access,
-	.move_notify = &radeon_bo_move_notify,
+	.invalidate_notify = &radeon_bo_invalidate_notify,
 	.fault_reserve_notify = &radeon_bo_fault_reserve_notify,
 	.io_mem_reserve = &radeon_ttm_io_mem_reserve,
 };