misc: fastrpc: Add support for audiopd
authorAbel Vesa <abel.vesa@linaro.org>
Fri, 25 Nov 2022 07:14:02 +0000 (07:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 17:45:33 +0000 (18:45 +0100)
commit0871561055e666da421d779397efcc1e5e964cab
tree24493dc9fac48f32cde17a8825cc5ca0209f2fac
parent72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2
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>
drivers/misc/fastrpc.c
include/uapi/misc/fastrpc.h