aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/cirrus/cirrus_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/cirrus/cirrus_drv.h')
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index 7ca059596887..bae55609e6c3 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -240,8 +240,25 @@ void cirrus_ttm_placement(struct cirrus_bo *bo, int domain);
240int cirrus_bo_create(struct drm_device *dev, int size, int align, 240int cirrus_bo_create(struct drm_device *dev, int size, int align,
241 uint32_t flags, struct cirrus_bo **pcirrusbo); 241 uint32_t flags, struct cirrus_bo **pcirrusbo);
242int cirrus_mmap(struct file *filp, struct vm_area_struct *vma); 242int cirrus_mmap(struct file *filp, struct vm_area_struct *vma);
243int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait); 243
244void cirrus_bo_unreserve(struct cirrus_bo *bo); 244static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
245{
246 int ret;
247
248 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
249 if (ret) {
250 if (ret != -ERESTARTSYS && ret != -EBUSY)
251 DRM_ERROR("reserve failed %p\n", bo);
252 return ret;
253 }
254 return 0;
255}
256
257static inline void cirrus_bo_unreserve(struct cirrus_bo *bo)
258{
259 ttm_bo_unreserve(&bo->bo);
260}
261
245int cirrus_bo_push_sysram(struct cirrus_bo *bo); 262int cirrus_bo_push_sysram(struct cirrus_bo *bo);
246int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr); 263int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr);
247#endif /* __CIRRUS_DRV_H__ */ 264#endif /* __CIRRUS_DRV_H__ */