| .. | .. |
|---|
| 8 | 8 | |
|---|
| 9 | 9 | #include <linux/types.h> |
|---|
| 10 | 10 | |
|---|
| 11 | | -struct etnaviv_gpu; |
|---|
| 11 | +struct device; |
|---|
| 12 | +struct etnaviv_iommu_context; |
|---|
| 13 | +struct etnaviv_vram_mapping; |
|---|
| 12 | 14 | struct etnaviv_cmdbuf_suballoc; |
|---|
| 13 | 15 | struct etnaviv_perfmon_request; |
|---|
| 14 | 16 | |
|---|
| 15 | 17 | struct etnaviv_cmdbuf { |
|---|
| 16 | 18 | /* suballocator this cmdbuf is allocated from */ |
|---|
| 17 | 19 | struct etnaviv_cmdbuf_suballoc *suballoc; |
|---|
| 18 | | - /* user context key, must be unique between all active users */ |
|---|
| 19 | | - struct etnaviv_file_private *ctx; |
|---|
| 20 | 20 | /* cmdbuf properties */ |
|---|
| 21 | 21 | int suballoc_offset; |
|---|
| 22 | 22 | void *vaddr; |
|---|
| .. | .. |
|---|
| 25 | 25 | }; |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | struct etnaviv_cmdbuf_suballoc * |
|---|
| 28 | | -etnaviv_cmdbuf_suballoc_new(struct etnaviv_gpu * gpu); |
|---|
| 28 | +etnaviv_cmdbuf_suballoc_new(struct device *dev); |
|---|
| 29 | 29 | void etnaviv_cmdbuf_suballoc_destroy(struct etnaviv_cmdbuf_suballoc *suballoc); |
|---|
| 30 | +int etnaviv_cmdbuf_suballoc_map(struct etnaviv_cmdbuf_suballoc *suballoc, |
|---|
| 31 | + struct etnaviv_iommu_context *context, |
|---|
| 32 | + struct etnaviv_vram_mapping *mapping, |
|---|
| 33 | + u32 memory_base); |
|---|
| 34 | +void etnaviv_cmdbuf_suballoc_unmap(struct etnaviv_iommu_context *context, |
|---|
| 35 | + struct etnaviv_vram_mapping *mapping); |
|---|
| 30 | 36 | |
|---|
| 31 | 37 | |
|---|
| 32 | 38 | int etnaviv_cmdbuf_init(struct etnaviv_cmdbuf_suballoc *suballoc, |
|---|
| 33 | 39 | struct etnaviv_cmdbuf *cmdbuf, u32 size); |
|---|
| 34 | 40 | void etnaviv_cmdbuf_free(struct etnaviv_cmdbuf *cmdbuf); |
|---|
| 35 | 41 | |
|---|
| 36 | | -u32 etnaviv_cmdbuf_get_va(struct etnaviv_cmdbuf *buf); |
|---|
| 42 | +u32 etnaviv_cmdbuf_get_va(struct etnaviv_cmdbuf *buf, |
|---|
| 43 | + struct etnaviv_vram_mapping *mapping); |
|---|
| 37 | 44 | dma_addr_t etnaviv_cmdbuf_get_pa(struct etnaviv_cmdbuf *buf); |
|---|
| 38 | 45 | |
|---|
| 39 | 46 | #endif /* __ETNAVIV_CMDBUF_H__ */ |
|---|