From 933b45da5d1d7c06d53e523833b5f8a6a9bdfa63 Mon Sep 17 00:00:00 2001 From: Sricharan R Date: Thu, 24 Aug 2017 12:51:34 +0530 Subject: rpmsg: glink: Add support for TX intents Intents are nothing but pre-allocated buffers of appropriate size that are allocated on the local side and communicated to the remote side and the remote stores the list of intent ids that it is informed. Later when remote side is intenting to send data, it picks up a right intent (based on the size) and sends the data buffer and the intent id. Local side receives the data and copies it to the local intent buffer. The whole idea is to avoid stalls on the transport for allocating memory, used for copy based transports. When the remote request to allocate buffers using CMD_RX_INTENT_REQ, we allocate buffers of requested size, store the buffer id locally and also communicate the intent id to the remote. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_glink_smem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/rpmsg/qcom_glink_smem.c') diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c index 8ad641a08cd8..9d73ced075e7 100644 --- a/drivers/rpmsg/qcom_glink_smem.c +++ b/drivers/rpmsg/qcom_glink_smem.c @@ -284,8 +284,9 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent, *tx_pipe->head = 0; glink = qcom_glink_native_probe(dev, - 0, - &rx_pipe->native, &tx_pipe->native); + GLINK_FEATURE_INTENT_REUSE, + &rx_pipe->native, &tx_pipe->native, + false); if (IS_ERR(glink)) { ret = PTR_ERR(glink); goto err_put_dev; -- cgit v1.2.3