mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 03:45:20 +07:00
6cffd79504
User process can involve dealing with big buffer sizes, and also passing buffers from one compute context bank to other compute context bank for complex dsp algorithms. This patch adds support to fastrpc to make it a proper dmabuf exporter to avoid making copies of buffers. Co-developed-by: Thierry Escande <thierry.escande@linaro.org> Signed-off-by: Thierry Escande <thierry.escande@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42 lines
929 B
C
42 lines
929 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __QCOM_FASTRPC_H__
|
|
#define __QCOM_FASTRPC_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf)
|
|
#define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32)
|
|
#define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke)
|
|
#define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4)
|
|
#define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create)
|
|
|
|
struct fastrpc_invoke_args {
|
|
__u64 ptr;
|
|
__u64 length;
|
|
__s32 fd;
|
|
__u32 reserved;
|
|
};
|
|
|
|
struct fastrpc_invoke {
|
|
__u32 handle;
|
|
__u32 sc;
|
|
__u64 args;
|
|
};
|
|
|
|
struct fastrpc_init_create {
|
|
__u32 filelen; /* elf file length */
|
|
__s32 filefd; /* fd for the file */
|
|
__u32 attrs;
|
|
__u32 siglen;
|
|
__u64 file; /* pointer to elf file */
|
|
};
|
|
|
|
struct fastrpc_alloc_dma_buf {
|
|
__s32 fd; /* fd */
|
|
__u32 flags; /* flags to map with */
|
|
__u64 size; /* size */
|
|
};
|
|
|
|
#endif /* __QCOM_FASTRPC_H__ */
|