diff options
Diffstat (limited to 'drivers/gpu/drm/ast/ast_drv.h')
-rw-r--r-- | drivers/gpu/drm/ast/ast_drv.h | 20 |
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, | |||
348 | int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr); | 348 | int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr); |
349 | int ast_bo_unpin(struct ast_bo *bo); | 349 | int ast_bo_unpin(struct ast_bo *bo); |
350 | 350 | ||
351 | int ast_bo_reserve(struct ast_bo *bo, bool no_wait); | 351 | static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait) |
352 | void 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 | |||
364 | static inline void ast_bo_unreserve(struct ast_bo *bo) | ||
365 | { | ||
366 | ttm_bo_unreserve(&bo->bo); | ||
367 | } | ||
368 | |||
353 | void ast_ttm_placement(struct ast_bo *bo, int domain); | 369 | void ast_ttm_placement(struct ast_bo *bo, int domain); |
354 | int ast_bo_push_sysram(struct ast_bo *bo); | 370 | int ast_bo_push_sysram(struct ast_bo *bo); |
355 | int ast_mmap(struct file *filp, struct vm_area_struct *vma); | 371 | int ast_mmap(struct file *filp, struct vm_area_struct *vma); |