Skip to content

Commit ba21740

Browse files
DylanVanAsschegregkh
authored andcommitted
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: Dylan Van Assche <[email protected]> Reviewed-by: Caleb Connolly <[email protected]> Reviewed-by: Ekansh Gupta <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c3c0363 commit ba21740

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/misc/fastrpc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,10 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx)
953953

954954
ctx->msg_sz = pkt_size;
955955

956-
err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
956+
if (ctx->fl->sctx->sid)
957+
err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
958+
else
959+
err = fastrpc_remote_heap_alloc(ctx->fl, dev, pkt_size, &ctx->buf);
957960
if (err)
958961
return err;
959962

0 commit comments

Comments
 (0)