Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / drivers / staging / vc04_services / vc-sm-cma / vc_sm_knl.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 /*
4  * VideoCore Shared Memory CMA allocator
5  *
6  * Copyright: 2018, Raspberry Pi (Trading) Ltd
7  *
8  * Based on vc_sm_defs.h from the vmcs_sm driver Copyright Broadcom Corporation.
9  *
10  */
11
12 #ifndef __VC_SM_KNL_H__INCLUDED__
13 #define __VC_SM_KNL_H__INCLUDED__
14
15 #if !defined(__KERNEL__)
16 #error "This interface is for kernel use only..."
17 #endif
18
19 /* Free a previously allocated or imported shared memory handle and block. */
20 int vc_sm_cma_free(void *handle);
21
22 /* Get an internal resource handle mapped from the external one. */
23 int vc_sm_cma_int_handle(void *handle);
24
25 /* Import a block of memory into the GPU space. */
26 int vc_sm_cma_import_dmabuf(struct dma_buf *dmabuf, void **handle);
27
28 #endif /* __VC_SM_KNL_H__INCLUDED__ */