1
2
3
4 #ifndef __IPU3_UTIL_H
5 #define __IPU3_UTIL_H
6
7 struct device;
8 struct imgu_device;
9
10 #define IPU3_CSS_POOL_SIZE 4
11
12
13
14
15
16
17
18
19
20
21 struct imgu_css_map {
22 size_t size;
23 void *vaddr;
24 dma_addr_t daddr;
25 struct vm_struct *vma;
26 };
27
28
29
30
31
32
33
34
35
36 struct imgu_css_pool {
37 struct {
38 struct imgu_css_map param;
39 bool valid;
40 } entry[IPU3_CSS_POOL_SIZE];
41 u32 last;
42 };
43
44 int imgu_css_dma_buffer_resize(struct imgu_device *imgu,
45 struct imgu_css_map *map, size_t size);
46 void imgu_css_pool_cleanup(struct imgu_device *imgu,
47 struct imgu_css_pool *pool);
48 int imgu_css_pool_init(struct imgu_device *imgu, struct imgu_css_pool *pool,
49 size_t size);
50 void imgu_css_pool_get(struct imgu_css_pool *pool);
51 void imgu_css_pool_put(struct imgu_css_pool *pool);
52 const struct imgu_css_map *imgu_css_pool_last(struct imgu_css_pool *pool,
53 u32 last);
54
55 #endif