aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ast/ast_drv.h')
-rw-r--r--drivers/gpu/drm/ast/ast_drv.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
index 02e52d543e4b..622d4ae7eb9e 100644
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@ -348,8 +348,24 @@ int ast_gem_create(struct drm_device *dev,
348int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr); 348int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr);
349int ast_bo_unpin(struct ast_bo *bo); 349int ast_bo_unpin(struct ast_bo *bo);
350 350
351int ast_bo_reserve(struct ast_bo *bo, bool no_wait); 351static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
352void ast_bo_unreserve(struct ast_bo *bo); 352{
353 int ret;
354
355 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
356 if (ret) {
357 if (ret != -ERESTARTSYS && ret != -EBUSY)
358 DRM_ERROR("reserve failed %p\n", bo);
359 return ret;
360 }
361 return 0;
362}
363
364static inline void ast_bo_unreserve(struct ast_bo *bo)
365{
366 ttm_bo_unreserve(&bo->bo);
367}
368
353void ast_ttm_placement(struct ast_bo *bo, int domain); 369void ast_ttm_placement(struct ast_bo *bo, int domain);
354int ast_bo_push_sysram(struct ast_bo *bo); 370int ast_bo_push_sysram(struct ast_bo *bo);
355int ast_mmap(struct file *filp, struct vm_area_struct *vma); 371int ast_mmap(struct file *filp, struct vm_area_struct *vma);