Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d73b71de authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: adsprpc: Invalidate remote output buffers"

parents b84c266b 2c093133
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -1748,11 +1748,12 @@ static void inv_args_pre(struct smq_invoke_ctx *ctx)
					DMA_BIDIRECTIONAL);
				dma_buf_end_cpu_access(map->buf,
					DMA_BIDIRECTIONAL);
			} else
			} else {
				dmac_flush_range(
					uint64_to_ptr(rpra[i].buf.pv), (char *)
					uint64_to_ptr(rpra[i].buf.pv + 1));
			}
		}

		end = (uintptr_t)uint64_to_ptr(rpra[i].buf.pv +
							rpra[i].buf.len);
@@ -1762,12 +1763,13 @@ static void inv_args_pre(struct smq_invoke_ctx *ctx)
					DMA_BIDIRECTIONAL);
				dma_buf_end_cpu_access(map->buf,
					DMA_BIDIRECTIONAL);
			} else
			} else {
				dmac_flush_range((char *)end,
					(char *)end + 1);
			}
		}
	}
}

static void inv_args(struct smq_invoke_ctx *ctx)
{
@@ -1929,11 +1931,13 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
			goto bail;
	}

	if (!fl->sctx->smmu.coherent) {
	PERF(fl->profile, GET_COUNTER(perf_counter, PERF_INVARGS),
	inv_args_pre(ctx);
	PERF_END);
	}

	PERF(fl->profile, GET_COUNTER(perf_counter, PERF_INVARGS),
	inv_args(ctx);
	PERF_END);

	PERF(fl->profile, GET_COUNTER(perf_counter, PERF_LINK),
	VERIFY(err, 0 == fastrpc_invoke_send(ctx, kernel, invoke->handle));
@@ -1952,7 +1956,6 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
	}

	PERF(fl->profile, GET_COUNTER(perf_counter, PERF_INVARGS),
	if (!fl->sctx->smmu.coherent)
	inv_args(ctx);
	PERF_END);