]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/ast/ast_ttm.c
drm/ast: invalidate page tables when pinning a BO
[karo-tx-linux.git] / drivers / gpu / drm / ast / ast_ttm.c
index a5a1a034033dcb5d4cb1a074ef8227dcaf78d5e5..6e8887fe6c1b44fb83d09df82d10d50483924de5 100644 (file)
@@ -303,24 +303,6 @@ void ast_ttm_placement(struct ast_bo *bo, int domain)
        bo->placement.num_busy_placement = c;
 }
 
-int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
-{
-       int ret;
-
-       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
-       if (ret) {
-               if (ret != -ERESTARTSYS && ret != -EBUSY)
-                       DRM_ERROR("reserve failed %p\n", bo);
-               return ret;
-       }
-       return 0;
-}
-
-void ast_bo_unreserve(struct ast_bo *bo)
-{
-       ttm_bo_unreserve(&bo->bo);
-}
-
 int ast_bo_create(struct drm_device *dev, int size, int align,
                  uint32_t flags, struct ast_bo **pastbo)
 {
@@ -341,6 +323,7 @@ int ast_bo_create(struct drm_device *dev, int size, int align,
 
        astbo->gem.driver_private = NULL;
        astbo->bo.bdev = &ast->ttm.bdev;
+       astbo->bo.bdev->dev_mapping = dev->dev_mapping;
 
        ast_ttm_placement(astbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);