misc: fastrpc: Add support for audiopd
In order to be able to start the adsp listener for audiopd using adsprpcd, we need to add the corresponding ioctl for creating a static process. On that ioctl call we need to allocate the heap. Allocating the heap needs to be happening only once and needs to be kept between different device open calls, so attach it to the channel context to make sure that remains until the RPMSG driver is removed. Then, if there are any VMIDs associated with the static ADSP process, do a call to SCM to assign it. And then, send all the necessary info related to heap to the DSP. Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221125071405.148786-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
72fa6f7820
commit
0871561055
@@ -13,6 +13,7 @@
|
||||
#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
|
||||
#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
|
||||
#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
|
||||
#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
|
||||
#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
|
||||
#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
|
||||
#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
|
||||
@@ -87,6 +88,12 @@ struct fastrpc_init_create {
|
||||
__u64 file; /* pointer to elf file */
|
||||
};
|
||||
|
||||
struct fastrpc_init_create_static {
|
||||
__u32 namelen; /* length of pd process name */
|
||||
__u32 memlen;
|
||||
__u64 name; /* pd process name */
|
||||
};
|
||||
|
||||
struct fastrpc_alloc_dma_buf {
|
||||
__s32 fd; /* fd */
|
||||
__u32 flags; /* flags to map with */
|
||||
|
||||
Reference in New Issue
Block a user