drm/ttm: get rid of agp specific populate/unpopulate paths.
authorDave Airlie <airlied@redhat.com>
Mon, 7 Sep 2020 20:46:28 +0000 (06:46 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 8 Sep 2020 22:30:42 +0000 (08:30 +1000)
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-12-airlied@gmail.com
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/ttm/ttm_agp_backend.c
include/drm/ttm/ttm_tt.h

index 2825ffa..8f5b532 100644 (file)
@@ -1267,7 +1267,7 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev,
 
 #if IS_ENABLED(CONFIG_AGP)
        if (drm->agp.bridge) {
-               return ttm_agp_tt_populate(bdev, ttm, ctx);
+               return ttm_pool_populate(ttm, ctx);
        }
 #endif
 
@@ -1296,7 +1296,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_bo_device *bdev,
 
 #if IS_ENABLED(CONFIG_AGP)
        if (drm->agp.bridge) {
-               ttm_agp_tt_unpopulate(bdev, ttm);
+               ttm_pool_unpopulate(ttm);
                return;
        }
 #endif
index 3045eec..b2e58af 100644 (file)
@@ -625,7 +625,7 @@ static int radeon_ttm_tt_populate(struct ttm_bo_device *bdev,
 
 #if IS_ENABLED(CONFIG_AGP)
        if (rdev->flags & RADEON_IS_AGP) {
-               return ttm_agp_tt_populate(bdev, ttm, ctx);
+               return ttm_pool_populate(ttm, ctx);
        }
 #endif
 
@@ -655,7 +655,7 @@ static void radeon_ttm_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *
 
 #if IS_ENABLED(CONFIG_AGP)
        if (rdev->flags & RADEON_IS_AGP) {
-               ttm_agp_tt_unpopulate(bdev, ttm);
+               ttm_pool_unpopulate(ttm);
                return;
        }
 #endif
index 8072fb7..3d0a5e9 100644 (file)
@@ -133,20 +133,3 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
        return &agp_be->ttm;
 }
 EXPORT_SYMBOL(ttm_agp_tt_create);
-
-int ttm_agp_tt_populate(struct ttm_bo_device *bdev,
-                       struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
-{
-       if (ttm->state != tt_unpopulated)
-               return 0;
-
-       return ttm_pool_populate(ttm, ctx);
-}
-EXPORT_SYMBOL(ttm_agp_tt_populate);
-
-void ttm_agp_tt_unpopulate(struct ttm_bo_device *bdev,
-                          struct ttm_tt *ttm)
-{
-       ttm_pool_unpopulate(ttm);
-}
-EXPORT_SYMBOL(ttm_agp_tt_unpopulate);
index 5a34f16..591d492 100644 (file)
@@ -264,8 +264,6 @@ void ttm_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
 struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
                                 struct agp_bridge_data *bridge,
                                 uint32_t page_flags);
-int ttm_agp_tt_populate(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_operation_ctx *ctx);
-void ttm_agp_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
 int ttm_agp_bind(struct ttm_bo_device *bdev,
                 struct ttm_tt *ttm, struct ttm_resource *bo_mem);
 void ttm_agp_unbind(struct ttm_bo_device *bdev,