.. | .. |
---|
27 | 27 | |
---|
28 | 28 | #include "qxl_drv.h" |
---|
29 | 29 | |
---|
30 | | -static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait) |
---|
| 30 | +static inline int qxl_bo_reserve(struct qxl_bo *bo) |
---|
31 | 31 | { |
---|
32 | 32 | int r; |
---|
33 | 33 | |
---|
34 | | - r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL); |
---|
| 34 | + r = ttm_bo_reserve(&bo->tbo, true, false, NULL); |
---|
35 | 35 | if (unlikely(r != 0)) { |
---|
36 | 36 | if (r != -ERESTARTSYS) { |
---|
37 | | - struct drm_device *ddev = bo->gem_base.dev; |
---|
| 37 | + struct drm_device *ddev = bo->tbo.base.dev; |
---|
| 38 | + |
---|
38 | 39 | dev_err(ddev->dev, "%p reserve failed\n", bo); |
---|
39 | 40 | } |
---|
40 | 41 | return r; |
---|
.. | .. |
---|
47 | 48 | ttm_bo_unreserve(&bo->tbo); |
---|
48 | 49 | } |
---|
49 | 50 | |
---|
50 | | -static inline u64 qxl_bo_gpu_offset(struct qxl_bo *bo) |
---|
51 | | -{ |
---|
52 | | - return bo->tbo.offset; |
---|
53 | | -} |
---|
54 | | - |
---|
55 | 51 | static inline unsigned long qxl_bo_size(struct qxl_bo *bo) |
---|
56 | 52 | { |
---|
57 | 53 | return bo->tbo.num_pages << PAGE_SHIFT; |
---|
.. | .. |
---|
59 | 55 | |
---|
60 | 56 | static inline u64 qxl_bo_mmap_offset(struct qxl_bo *bo) |
---|
61 | 57 | { |
---|
62 | | - return drm_vma_node_offset_addr(&bo->tbo.vma_node); |
---|
| 58 | + return drm_vma_node_offset_addr(&bo->tbo.base.vma_node); |
---|
63 | 59 | } |
---|
64 | 60 | |
---|
65 | 61 | static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type, |
---|
.. | .. |
---|
70 | 66 | r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL); |
---|
71 | 67 | if (unlikely(r != 0)) { |
---|
72 | 68 | if (r != -ERESTARTSYS) { |
---|
73 | | - struct drm_device *ddev = bo->gem_base.dev; |
---|
| 69 | + struct drm_device *ddev = bo->tbo.base.dev; |
---|
| 70 | + |
---|
74 | 71 | dev_err(ddev->dev, "%p reserve failed for wait\n", |
---|
75 | 72 | bo); |
---|
76 | 73 | } |
---|
.. | .. |
---|
87 | 84 | extern int qxl_bo_create(struct qxl_device *qdev, |
---|
88 | 85 | unsigned long size, |
---|
89 | 86 | bool kernel, bool pinned, u32 domain, |
---|
| 87 | + u32 priority, |
---|
90 | 88 | struct qxl_surface *surf, |
---|
91 | 89 | struct qxl_bo **bo_ptr); |
---|
92 | 90 | extern int qxl_bo_kmap(struct qxl_bo *bo, void **ptr); |
---|
.. | .. |
---|
95 | 93 | void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *map); |
---|
96 | 94 | extern struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo); |
---|
97 | 95 | extern void qxl_bo_unref(struct qxl_bo **bo); |
---|
98 | | -extern int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr); |
---|
| 96 | +extern int qxl_bo_pin(struct qxl_bo *bo); |
---|
99 | 97 | extern int qxl_bo_unpin(struct qxl_bo *bo); |
---|
100 | 98 | extern void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned); |
---|
101 | 99 | extern bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo); |
---|