Commit ba217405 authored by Dylan Van Assche's avatar Dylan Van Assche Committed by Greg Kroah-Hartman

misc: fastrpc: use coherent pool for untranslated Compute Banks

Use fastrpc_remote_heap_alloc to allocate from the FastRPC device
instead of the Compute Bank when the session ID is 0. This ensures
that the allocation is inside the coherent DMA pool which is already
accessible to the DSP. This is necessary to support FastRPC devices
which do not have dedicated Compute Banks such as the SLPI on the SDM845.
The latter uses an allocated CMA region instead of FastRPC Compute Banks.
Signed-off-by: default avatarDylan Van Assche <me@dylanvanassche.be>
Reviewed-by: default avatarCaleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: default avatarEkansh Gupta <quic_ekangupt@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240705075900.424100-6-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3c0363b
......@@ -953,7 +953,10 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx)
ctx->msg_sz = pkt_size;
err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
if (ctx->fl->sctx->sid)
err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
else
err = fastrpc_remote_heap_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
if (err)
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment