1 /* SPDX-License-Identifier: GPL-2.0 */
4 * VideoCore Shared Memory CMA allocator
6 * Copyright: 2018, Raspberry Pi (Trading) Ltd
8 * Based on vc_sm_defs.h from the vmcs_sm driver Copyright Broadcom Corporation.
12 #ifndef __VC_SM_KNL_H__INCLUDED__
13 #define __VC_SM_KNL_H__INCLUDED__
15 #if !defined(__KERNEL__)
16 #error "This interface is for kernel use only..."
19 /* Free a previously allocated or imported shared memory handle and block. */
20 int vc_sm_cma_free(void *handle);
22 /* Get an internal resource handle mapped from the external one. */
23 int vc_sm_cma_int_handle(void *handle);
25 /* Import a block of memory into the GPU space. */
26 int vc_sm_cma_import_dmabuf(struct dma_buf *dmabuf, void **handle);
28 #endif /* __VC_SM_KNL_H__INCLUDED__ */