]> www.infradead.org Git - users/jedix/linux-maple.git/commit
misc: fastrpc: Add support for multiple PD from one process
authorEkansh Gupta <quic_ekangupt@quicinc.com>
Fri, 10 Jan 2025 13:43:07 +0000 (13:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jan 2025 14:17:44 +0000 (15:17 +0100)
commit37d56e0fb08e1f806de638b7dc8edff329cb683d
treeb2ffa757bca6884b727c39a02d25cb9f904538a7
parent6847b00c3c85fffff15f29e030a2fa489bdde88b
misc: fastrpc: Add support for multiple PD from one process

Memory intensive applications(which requires more tha 4GB) that wants
to offload tasks to DSP might have to split the tasks to multiple
user PD to make the resources available.

For every call to DSP, fastrpc driver passes the process tgid which
works as an identifier for the DSP to enqueue the tasks to specific PD.
With current design, if any process opens device node more than once
and makes PD init request, same tgid will be passed to DSP which will
be considered a bad request and this will result in failure as the same
identifier cannot be used for multiple DSP PD.

Assign and pass a client ID to DSP which would be assigned during device
open and will be dependent on the index of session allocated for the PD.
This will allow the same process to open the device more than once and
spawn multiple dynamic PD for ease of processing.

Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20250110134308.123739-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c