[PATCH 33/45] drm/nouveau/ttm: switch to invalidate notify callback

Dave Airlie airlied at gmail.com
Thu Sep 24 05:18:33 UTC 2020


From: Dave Airlie <airlied at redhat.com>

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 9e3fbe09a6d8..a032fdacf5f8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -992,8 +992,7 @@ nouveau_bo_vma_map_update(struct nouveau_bo *nvbo,
 }
 
 static void
-nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict,
-		     struct ttm_resource *new_reg)
+nouveau_bo_invalidate_ntfy(struct ttm_buffer_object *bo)
 {
 	struct nouveau_bo *nvbo = nouveau_bo(bo);
 
@@ -1001,10 +1000,6 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict,
 	if (bo->destroy != nouveau_bo_del_ttm)
 		return;
 
-	/* handle new_reg path in move */
-	if (new_reg)
-		return;
-
 	nouveau_bo_del_io_reserve_lru(bo);
 
 	nouveau_bo_vma_map_update(nvbo, 0, NULL);
@@ -1439,7 +1434,7 @@ struct ttm_bo_driver nouveau_bo_driver = {
 	.ttm_tt_destroy = &nouveau_ttm_tt_destroy,
 	.eviction_valuable = ttm_bo_eviction_valuable,
 	.evict_flags = nouveau_bo_evict_flags,
-	.move_notify = nouveau_bo_move_ntfy,
+	.invalidate_notify = nouveau_bo_invalidate_ntfy,
 	.move = nouveau_bo_move,
 	.verify_access = nouveau_bo_verify_access,
 	.fault_reserve_notify = &nouveau_ttm_fault_reserve_notify,
-- 
2.27.0



More information about the dri-devel mailing list