1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2018 Intel Corporation */
10 #define IPU3_CSS_POOL_SIZE 4
13 * imgu_css_map - store DMA mapping info for buffer
15 * @size: size of the buffer in bytes.
16 * @vaddr: kernel virtual address.
17 * @daddr: iova dma address to access IPU3.
27 * imgu_css_pool - circular buffer pool definition
29 * @entry: array with IPU3_CSS_POOL_SIZE elements.
30 * @entry.param: a &struct imgu_css_map for storing the mem mapping.
31 * @entry.valid: used to mark if the entry has valid data.
32 * @last: write pointer, initialized to IPU3_CSS_POOL_SIZE.
34 struct imgu_css_pool {
36 struct imgu_css_map param;
38 } entry[IPU3_CSS_POOL_SIZE];
42 int imgu_css_dma_buffer_resize(struct imgu_device *imgu,
43 struct imgu_css_map *map, size_t size);
44 void imgu_css_pool_cleanup(struct imgu_device *imgu,
45 struct imgu_css_pool *pool);
46 int imgu_css_pool_init(struct imgu_device *imgu, struct imgu_css_pool *pool,
48 void imgu_css_pool_get(struct imgu_css_pool *pool);
49 void imgu_css_pool_put(struct imgu_css_pool *pool);
50 const struct imgu_css_map *imgu_css_pool_last(struct imgu_css_pool *pool,