lkml.org 
[lkml]   [2023]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] misc: fastrpc: use coherent pool for untranslated Compute Banks


On 27/03/2023 19:42, Dylan Van Assche wrote:
> 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@dylanvanassche.be>

Reviewed-by: Caleb Connolly <caleb.connolly@linaro.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 caf2ae556956..b7ddf6b90022 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -939,7 +939,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.39.2
>

--
Kind Regards,
Caleb

\
 
 \ /
  Last update: 2023-05-06 19:31    [W:0.052 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site