.. | .. |
---|
6 | 6 | #ifndef __ETNAVIV_GEM_H__ |
---|
7 | 7 | #define __ETNAVIV_GEM_H__ |
---|
8 | 8 | |
---|
9 | | -#include <linux/reservation.h> |
---|
| 9 | +#include <linux/dma-resv.h> |
---|
10 | 10 | #include "etnaviv_cmdbuf.h" |
---|
11 | 11 | #include "etnaviv_drv.h" |
---|
12 | 12 | |
---|
.. | .. |
---|
25 | 25 | struct list_head scan_node; |
---|
26 | 26 | struct list_head mmu_node; |
---|
27 | 27 | struct etnaviv_gem_object *object; |
---|
28 | | - struct etnaviv_iommu *mmu; |
---|
| 28 | + struct etnaviv_iommu_context *context; |
---|
29 | 29 | struct drm_mm_node vram_node; |
---|
30 | 30 | unsigned int use; |
---|
31 | 31 | u32 iova; |
---|
.. | .. |
---|
46 | 46 | struct page **pages; |
---|
47 | 47 | struct sg_table *sgt; |
---|
48 | 48 | void *vaddr; |
---|
49 | | - |
---|
50 | | - /* normally (resv == &_resv) except for imported bo's */ |
---|
51 | | - struct reservation_object *resv; |
---|
52 | | - struct reservation_object _resv; |
---|
53 | 49 | |
---|
54 | 50 | struct list_head vram_list; |
---|
55 | 51 | |
---|
.. | .. |
---|
81 | 77 | |
---|
82 | 78 | struct etnaviv_gem_submit_bo { |
---|
83 | 79 | u32 flags; |
---|
| 80 | + u64 va; |
---|
84 | 81 | struct etnaviv_gem_object *obj; |
---|
85 | 82 | struct etnaviv_vram_mapping *mapping; |
---|
86 | 83 | struct dma_fence *excl; |
---|
.. | .. |
---|
95 | 92 | struct etnaviv_gem_submit { |
---|
96 | 93 | struct drm_sched_job sched_job; |
---|
97 | 94 | struct kref refcount; |
---|
| 95 | + struct etnaviv_file_private *ctx; |
---|
98 | 96 | struct etnaviv_gpu *gpu; |
---|
| 97 | + struct etnaviv_iommu_context *mmu_context, *prev_mmu_context; |
---|
99 | 98 | struct dma_fence *out_fence, *in_fence; |
---|
100 | 99 | int out_fence_id; |
---|
101 | 100 | struct list_head node; /* GPU active submit list */ |
---|
.. | .. |
---|
106 | 105 | unsigned int nr_pmrs; |
---|
107 | 106 | struct etnaviv_perfmon_request *pmrs; |
---|
108 | 107 | unsigned int nr_bos; |
---|
109 | | - struct etnaviv_gem_submit_bo bos[0]; |
---|
| 108 | + struct etnaviv_gem_submit_bo bos[]; |
---|
110 | 109 | /* No new members here, the previous one is variable-length! */ |
---|
111 | 110 | }; |
---|
112 | 111 | |
---|
113 | 112 | void etnaviv_submit_put(struct etnaviv_gem_submit * submit); |
---|
114 | 113 | |
---|
115 | 114 | int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj, |
---|
116 | | - struct timespec *timeout); |
---|
| 115 | + struct drm_etnaviv_timespec *timeout); |
---|
117 | 116 | int etnaviv_gem_new_private(struct drm_device *dev, size_t size, u32 flags, |
---|
118 | | - struct reservation_object *robj, const struct etnaviv_gem_ops *ops, |
---|
119 | | - struct etnaviv_gem_object **res); |
---|
| 117 | + const struct etnaviv_gem_ops *ops, struct etnaviv_gem_object **res); |
---|
120 | 118 | void etnaviv_gem_obj_add(struct drm_device *dev, struct drm_gem_object *obj); |
---|
121 | 119 | struct page **etnaviv_gem_get_pages(struct etnaviv_gem_object *obj); |
---|
122 | 120 | void etnaviv_gem_put_pages(struct etnaviv_gem_object *obj); |
---|
123 | 121 | |
---|
124 | 122 | struct etnaviv_vram_mapping *etnaviv_gem_mapping_get( |
---|
125 | | - struct drm_gem_object *obj, struct etnaviv_gpu *gpu); |
---|
126 | | -void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping); |
---|
| 123 | + struct drm_gem_object *obj, struct etnaviv_iommu_context *mmu_context, |
---|
| 124 | + u64 va); |
---|
127 | 125 | void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping); |
---|
128 | 126 | |
---|
129 | 127 | #endif /* __ETNAVIV_GEM_H__ */ |
---|