Lines Matching refs:bo
30 static inline int qxl_bo_reserve(struct qxl_bo *bo)
34 r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
37 struct drm_device *ddev = bo->tbo.base.dev;
39 dev_err(ddev->dev, "%p reserve failed\n", bo);
46 static inline void qxl_bo_unreserve(struct qxl_bo *bo)
48 ttm_bo_unreserve(&bo->tbo);
51 static inline unsigned long qxl_bo_size(struct qxl_bo *bo)
53 return bo->tbo.num_pages << PAGE_SHIFT;
56 static inline u64 qxl_bo_mmap_offset(struct qxl_bo *bo)
58 return drm_vma_node_offset_addr(&bo->tbo.base.vma_node);
61 static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
66 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
69 struct drm_device *ddev = bo->tbo.base.dev;
72 bo);
77 *mem_type = bo->tbo.mem.mem_type;
79 r = ttm_bo_wait(&bo->tbo, true, no_wait);
80 ttm_bo_unreserve(&bo->tbo);
90 extern int qxl_bo_kmap(struct qxl_bo *bo, void **ptr);
91 extern void qxl_bo_kunmap(struct qxl_bo *bo);
92 void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, int page_offset);
93 void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *map);
94 extern struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo);
95 extern void qxl_bo_unref(struct qxl_bo **bo);
96 extern int qxl_bo_pin(struct qxl_bo *bo);
97 extern int qxl_bo_unpin(struct qxl_bo *bo);
99 extern bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo);