Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / media / platform / sti / hva / hva-mem.h
blobfec549dff2b3fc63a114b8586313d5fc9a45a129
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) STMicroelectronics SA 2015
4 * Authors: Yannick Fertre <yannick.fertre@st.com>
5 * Hugues Fruchet <hugues.fruchet@st.com>
6 */
8 #ifndef HVA_MEM_H
9 #define HVA_MEM_H
11 /**
12 * struct hva_buffer - hva buffer
14 * @name: name of requester
15 * @paddr: physical address (for hardware)
16 * @vaddr: virtual address (kernel can read/write)
17 * @size: size of buffer
19 struct hva_buffer {
20 const char *name;
21 dma_addr_t paddr;
22 void *vaddr;
23 u32 size;
26 int hva_mem_alloc(struct hva_ctx *ctx,
27 __u32 size,
28 const char *name,
29 struct hva_buffer **buf);
31 void hva_mem_free(struct hva_ctx *ctx,
32 struct hva_buffer *buf);
34 #endif /* HVA_MEM_H */