[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240705075900.424100-6-srinivas.kandagatla@linaro.org>
Date: Fri, 5 Jul 2024 08:58:59 +0100
From: srinivas.kandagatla@...aro.org
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org,
Dylan Van Assche <me@...anvanassche.be>,
Caleb Connolly <caleb.connolly@...aro.org>,
Ekansh Gupta <quic_ekangupt@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH v2 5/6] misc: fastrpc: use coherent pool for untranslated Compute Banks
From: Dylan Van Assche <me@...anvanassche.be>
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: Dylan Van Assche <me@...anvanassche.be>
Reviewed-by: Caleb Connolly <caleb.connolly@...aro.org>
Reviewed-by: Ekansh Gupta <quic_ekangupt@...cinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
drivers/misc/fastrpc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 1c045f9a75a4..95931abc3770 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -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;
--
2.25.1
Powered by blists - more mailing lists