Re: [PATCH v1 3/5] misc: fastrpc: Fix initial memory allocation for Audio PD memory pool

2025-05-21 Thread Ekansh Gupta
On 5/19/2025 5:11 PM, Srinivas Kandagatla wrote: > On 5/13/25 05:28, Ekansh Gupta wrote: >> The initially allocated memory is not properly included in the pool, >> leading to potential issues with memory management. Set the number >> of pages to one to ensure that the initi

Re: [PATCH v1 2/5] misc: fastrpc: Move all remote heap allocations to a new list

2025-05-21 Thread Ekansh Gupta
On 5/19/2025 5:05 PM, Srinivas Kandagatla wrote: > On 5/13/25 05:28, Ekansh Gupta wrote: >> Remote heap allocations are not organized in a maintainable manner, >> leading to potential issues with memory management. As the remote >> heap allocations are maintained

Re: [PATCH v1 5/5] misc: fastrpc: Add missing unmapping user-requested remote heap

2025-05-21 Thread Ekansh Gupta
On 5/19/2025 7:04 PM, Dmitry Baryshkov wrote: > On Mon, May 19, 2025 at 04:28:34PM +0530, Ekansh Gupta wrote: >> >> On 5/19/2025 4:22 PM, Dmitry Baryshkov wrote: >>> On Tue, May 13, 2025 at 09:58:25AM +0530, Ekansh Gupta wrote: >>>> User request for remot

Re: [PATCH v1 3/5] misc: fastrpc: Fix initial memory allocation for Audio PD memory pool

2025-05-21 Thread Ekansh Gupta
On 5/19/2025 7:01 PM, Dmitry Baryshkov wrote: > On Mon, May 19, 2025 at 04:23:28PM +0530, Ekansh Gupta wrote: >> >> On 5/19/2025 3:47 PM, Dmitry Baryshkov wrote: >>> On Tue, May 13, 2025 at 09:58:23AM +0530, Ekansh Gupta wrote: >>>> The initially allocated me

Re: [PATCH v1 2/5] misc: fastrpc: Move all remote heap allocations to a new list

2025-05-21 Thread Ekansh Gupta
On 5/19/2025 6:59 PM, Dmitry Baryshkov wrote: > On Mon, May 19, 2025 at 04:36:13PM +0530, Ekansh Gupta wrote: >> >> On 5/19/2025 3:46 PM, Dmitry Baryshkov wrote: >>> On Tue, May 13, 2025 at 09:58:22AM +0530, Ekansh Gupta wrote: >>>> Remote heap allocations

Re: [PATCH v1] misc: fastrpc: Fix channel resource access in device_open

2025-05-19 Thread Ekansh Gupta
On 5/18/2025 4:33 PM, Dmitry Baryshkov wrote: > On Sat, May 17, 2025 at 12:54:32PM +0530, Ekansh Gupta wrote: >> During rpmsg_probe, fastrpc device nodes are created first, then >> channel specific resources are initialized, followed by >> of_platform_populate, which

Re: [PATCH v1 4/5] misc: fastrpc: Remove buffer from list prior to unmap operation

2025-05-19 Thread Ekansh Gupta
On 5/19/2025 3:50 PM, Dmitry Baryshkov wrote: > On Tue, May 13, 2025 at 09:58:24AM +0530, Ekansh Gupta wrote: >> fastrpc_req_munmap_impl() is called to unmap any buffer. The buffer is >> getting removed from the list after it is unmapped from DSP. This can >> create potenti

Re: [PATCH v1 3/5] misc: fastrpc: Fix initial memory allocation for Audio PD memory pool

2025-05-19 Thread Ekansh Gupta
On 5/19/2025 3:47 PM, Dmitry Baryshkov wrote: > On Tue, May 13, 2025 at 09:58:23AM +0530, Ekansh Gupta wrote: >> The initially allocated memory is not properly included in the pool, >> leading to potential issues with memory management. Set the number > What is '

Re: [PATCH v1 2/5] misc: fastrpc: Move all remote heap allocations to a new list

2025-05-19 Thread Ekansh Gupta
On 5/19/2025 3:46 PM, Dmitry Baryshkov wrote: > On Tue, May 13, 2025 at 09:58:22AM +0530, Ekansh Gupta wrote: >> Remote heap allocations are not organized in a maintainable manner, >> leading to potential issues with memory management. As the remote > Which issues? I think

Re: [PATCH v1 5/5] misc: fastrpc: Add missing unmapping user-requested remote heap

2025-05-19 Thread Ekansh Gupta
On 5/19/2025 4:22 PM, Dmitry Baryshkov wrote: > On Tue, May 13, 2025 at 09:58:25AM +0530, Ekansh Gupta wrote: >> User request for remote heap allocation is supported using ioctl >> interface but support for unmap is missing. This could result in >> memory leak issues. A

Re: [PATCH v1 1/5] misc: fastrpc: Add NULL check to fastrpc_buf_free to prevent crash

2025-05-19 Thread Ekansh Gupta
On 5/19/2025 4:10 PM, Srinivas Kandagatla wrote: > On 5/19/25 11:09, Dmitry Baryshkov wrote: >> On Mon, May 19, 2025 at 10:25:46AM +0100, Srinivas Kandagatla wrote: >>> On 5/13/25 05:28, Ekansh Gupta wrote: >>>> The fastrpc_buf_free function currently does not

[PATCH v1] misc: fastrpc: Fix channel resource access in device_open

2025-05-17 Thread Ekansh Gupta
applications allocate sessions. Fixes: f6f9279f2bf0e ("misc: fastrpc: Add Qualcomm fastrpc basic driver model") Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/dr

[PATCH v1 5/5] misc: fastrpc: Add missing unmapping user-requested remote heap

2025-05-12 Thread Ekansh Gupta
;) Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 62 ++ 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index d54368bf8c5c..b64c5b9e07b5 100644 --- a/drivers/misc

[PATCH v1 3/5] misc: fastrpc: Fix initial memory allocation for Audio PD memory pool

2025-05-12 Thread Ekansh Gupta
pport for audiopd") Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index d4e38b5e5e6c..b629e24f00bc 100644 --- a/drivers/misc/fastrpc.c +++

[PATCH v1 0/5] misc: fastrpc: Add missing bug fixes

2025-05-12 Thread Ekansh Gupta
Add missing bug fixes in memory areas. This patch series carries following fixes: - Add proper checks to fastrpc_buf_free to avoid potential issues. - Add multiple fixes for remote heap which is used by Audio PD. Ekansh Gupta (5): misc: fastrpc: Add NULL check to fastrpc_buf_free to prevent

[PATCH v1 2/5] misc: fastrpc: Move all remote heap allocations to a new list

2025-05-12 Thread Ekansh Gupta
be using the memory. Move all remote heap allocations to a dedicated list where the entries are cleaned only for user requests and subsystem shutdown. Fixes: 0871561055e66 ("misc: fastrpc: Add support for audiopd") Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fast

[PATCH v1 4/5] misc: fastrpc: Remove buffer from list prior to unmap operation

2025-05-12 Thread Ekansh Gupta
operation. Fixes: 2419e55e532de ("misc: fastrpc: add mmap/unmap support") Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc

[PATCH v1 1/5] misc: fastrpc: Add NULL check to fastrpc_buf_free to prevent crash

2025-05-12 Thread Ekansh Gupta
handling of NULL pointers and prevent potential crashes. Fixes: c68cfb718c8f9 ("misc: fastrpc: Add support for context Invoke method") Cc: sta...@kernel.org Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/misc/fastrpc.c

Re: [PATCH v1 4/4] misc: fastrpc: Add debugfs support for fastrpc

2025-04-11 Thread Ekansh Gupta
On 12/3/2024 5:27 PM, Dmitry Baryshkov wrote: > On Tue, 3 Dec 2024 at 07:22, Ekansh Gupta wrote: >> >> >> On 12/2/2024 6:18 PM, Dmitry Baryshkov wrote: >>> On Mon, Dec 02, 2024 at 03:27:43PM +0530, Ekansh Gupta wrote: >>>> On 11/22/2024 12:23 AM, Dm

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-04-05 Thread Ekansh Gupta
On 3/20/2025 9:27 PM, Ekansh Gupta wrote: > > On 3/20/2025 7:45 PM, Dmitry Baryshkov wrote: >> On Thu, Mar 20, 2025 at 07:19:31PM +0530, Ekansh Gupta wrote: >>> On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: >>>> On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh

Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc

2025-04-04 Thread Ekansh Gupta
On 3/21/2025 5:53 PM, Srinivas Kandagatla wrote: > > > On 20/03/2025 18:43, Dmitry Baryshkov wrote: >> On Thu, Mar 20, 2025 at 05:11:20PM +, Srinivas Kandagatla wrote: >>> >>> >>> On 20/03/2025 09:14, Ling Xu wrote: The fastrpc driver has support for 5 types of remoteprocs. There are >>

Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc

2025-04-04 Thread Ekansh Gupta
> @@ -2338,6 +2342,8 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device > *rpdev) > break; > case CDSP_DOMAIN_ID: > case CDSP1_DOMAIN_ID: > + case GDSP0_DOMAIN_ID: > + case GDSP1_DOMAIN_ID: Reviewed-by: Ekansh Gupta Thanks, Ekansh > data->unsigned_support = true; > /* Create both device nodes so that we can allow both Signed > and Unsigned PD */ > err = fastrpc_device_register(rdev, data, true, > domains[domain_id]);

Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc

2025-04-04 Thread Ekansh Gupta
On 4/2/2025 2:12 PM, Dmitry Baryshkov wrote: > On 02/04/2025 11:38, Ekansh Gupta wrote: >> >> >> On 3/21/2025 5:53 PM, Srinivas Kandagatla wrote: >>> >>> >>> On 20/03/2025 18:43, Dmitry Baryshkov wrote: >>>> On Thu,

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-21 Thread Ekansh Gupta
On 3/21/2025 4:47 PM, Dmitry Baryshkov wrote: > On Fri, 21 Mar 2025 at 12:18, Ekansh Gupta > wrote: >> >> >> On 3/20/2025 9:27 PM, Ekansh Gupta wrote: >>> On 3/20/2025 7:45 PM, Dmitry Baryshkov wrote: >>>> On Thu, Mar 20, 2025 at 07:19:31PM +0530, E

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-20 Thread Ekansh Gupta
On 3/20/2025 7:45 PM, Dmitry Baryshkov wrote: > On Thu, Mar 20, 2025 at 07:19:31PM +0530, Ekansh Gupta wrote: >> >> On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: >>> On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh Gupta wrote: >>>> >>>> On 1/2

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-20 Thread Ekansh Gupta
On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: > On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh Gupta wrote: >> >> >> On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: >>> On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh Gupta wrote: >>>> For any remot

Re: [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode

2025-02-10 Thread Ekansh Gupta
On 1/29/2025 4:53 PM, Dmitry Baryshkov wrote: > On Wed, Jan 29, 2025 at 11:13:05AM +0530, Ekansh Gupta wrote: >> >> >> On 1/29/2025 5:00 AM, Dmitry Baryshkov wrote: >>> On Mon, Jan 27, 2025 at 10:12:39AM +0530, Ekansh Gupta wrote: >>>> DSP needs las

Re: [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode

2025-01-28 Thread Ekansh Gupta
On 1/29/2025 5:00 AM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:39AM +0530, Ekansh Gupta wrote: >> DSP needs last 4 bits of context id to be 0 for polling mode to be >> supported as setting of last 8 is intended for async mode(not yet >> supported on upstrea

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-01-28 Thread Ekansh Gupta
On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh Gupta wrote: >> For any remote call to DSP, after sending an invocation message, >> fastRPC driver waits for glink response and during this time the >> CPU can go into low

Re: [PATCH v2 2/5] misc: fastrpc: Introduce context params structure

2025-01-28 Thread Ekansh Gupta
On 1/27/2025 9:13 PM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:36AM +0530, Ekansh Gupta wrote: >> Add structure to invoke context parameterms. This structure is meant > Nit: for invoke context parameters. Ack. > >> to carry invoke context specific da

[PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-01-26 Thread Ekansh Gupta
which will eliminate CPU wakeup and scheduling latencies and reduce fastRPC overhead. With this change, DSP always sends a glink response which will get ignored if polling mode didn't time out. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c

[PATCH v2 2/5] misc: fastrpc: Introduce context params structure

2025-01-26 Thread Ekansh Gupta
call, call priority etc. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 138 ++--- 1 file changed, 117 insertions(+), 21 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 1a936d462519..c29d5536195e 100644 --- a/drivers

[PATCH v2 3/5] misc: fastrpc: Add CRC support using invokeV2 request

2025-01-26 Thread Ekansh Gupta
remote call. If user intends to enable CRC check, first local user CRC is calculated at user end and a CRC buffer is passed to DSP to capture remote CRC values. DSP is expected to write to the remote CRC buffer which is then compared at user level with the local CRC values. Signed-off-by: Ekansh Gupta

[PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode

2025-01-26 Thread Ekansh Gupta
-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 257a741af115..ef56c793c564 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -40,7 +40,7 @@ #define

[PATCH v2 1/5] misc: fastrpc: Move fdlist to invoke context structure

2025-01-26 Thread Ekansh Gupta
FD list is part of meta buffer which is calulated during put args. Move fdlist to invoke context structure for better maintenance and to avoid code duplicacy for calculation of critcal meta buffer contents that are used by fastrpc driver. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c

[PATCH v2 0/5] misc: fastrpc: Add invokeV2 to support new features

2025-01-26 Thread Ekansh Gupta
reserved bits. - Dropped performance counter changes for now. I will rework and rework and submit it separately. Ekansh Gupta (5): misc: fastrpc: Move fdlist to invoke context structure misc: fastrpc: Introduce context params structure misc: fastrpc: Add CRC support using invokeV2

Re: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2025-01-23 Thread Ekansh Gupta
On 1/23/2025 6:03 PM, Dmitry Baryshkov wrote: > On Thu, Jan 23, 2025 at 05:34:00PM +0530, Ekansh Gupta wrote: >> >> >> On 1/23/2025 4:43 PM, Dmitry Baryshkov wrote: >>> On Thu, Jan 23, 2025 at 03:19:21PM +0530, Ekansh Gupta wrote: >>>> >>

Re: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2025-01-23 Thread Ekansh Gupta
On 1/23/2025 4:43 PM, Dmitry Baryshkov wrote: > On Thu, Jan 23, 2025 at 03:19:21PM +0530, Ekansh Gupta wrote: >> >> >> On 1/23/2025 1:18 PM, Dmitry Baryshkov wrote: >>> On Thu, Jan 23, 2025 at 11:16:41AM +0530, Ekansh Gupta wrote: >>>> >>

Re: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2025-01-23 Thread Ekansh Gupta
On 1/23/2025 1:18 PM, Dmitry Baryshkov wrote: > On Thu, Jan 23, 2025 at 11:16:41AM +0530, Ekansh Gupta wrote: >> >> >> On 10/7/2024 7:27 PM, Dmitry Baryshkov wrote: >>> On Mon, Oct 07, 2024 at 02:15:15PM GMT, Ekansh Gupta wrote: >>>> InvokeV2 reques

Re: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2025-01-22 Thread Ekansh Gupta
On 10/7/2024 7:27 PM, Dmitry Baryshkov wrote: > On Mon, Oct 07, 2024 at 02:15:15PM GMT, Ekansh Gupta wrote: >> InvokeV2 request is intended to support multiple enhanced invoke >> requests like CRC check, performance counter enablement and polling >> mode for RPC invo

Re: [PATCH v1 1/2] misc: fastrpc: Fix registered buffer page address

2025-01-08 Thread Ekansh Gupta
On 12/18/2024 4:42 PM, Dmitry Baryshkov wrote: > On Wed, Dec 18, 2024 at 03:54:28PM +0530, Ekansh Gupta wrote: >> For registered buffers, fastrpc driver sends the buffer information >> to remote subsystem. There is a problem with current implementation >> where the page

[PATCH v1 0/2] Add missing fixes in fastrpc_get_args

2024-12-18 Thread Ekansh Gupta
This patch series adds the listed bug fixes that have been missing in upstream fastRPC driver: - Page address for registered buffer(with fd) is not calculated properly. - Page size calculation for non-registered buffer(copy buffer) is incorrect. Ekansh Gupta (2): misc: fastrpc: Fix

[PATCH v1 2/2] misc: fastrpc: Fix copy buffer page size

2024-12-18 Thread Ekansh Gupta
could result in memory issue. Calculate page start and page end using the offset adjusted address instead of absolute address. Fixes: 02b45b47fbe8 ("misc: fastrpc: fix remote page size calculation") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 4 ++-- 1 file

[PATCH v1 1/2] misc: fastrpc: Fix registered buffer page address

2024-12-18 Thread Ekansh Gupta
in page information and extracts offset information from remote arguments. Mask the offset and pass the base page address to DSP. Fixes: 80f3afd72bd4 ("misc: fastrpc: consider address offset before sending to DSP") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 2

[PATCH v6 2/2] misc: fastrpc: Rename tgid and pid to client_id

2024-12-02 Thread Ekansh Gupta
. Rename the data which uses this client id. Signed-off-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov --- drivers/misc/fastrpc.c | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index

[PATCH v6 0/2] Add changes to use session index as identifier

2024-12-02 Thread Ekansh Gupta
commit text. - Moved from ida to idr. - Changed dsp_pgid data type. - Resolved memory leak. Ekansh Gupta (2): misc: fastrpc: Add support for multiple PD from one process misc: fastrpc: Rename tgid and pid to client_id drivers/misc/fastrpc.c | 58

[PATCH v6 1/2] misc: fastrpc: Add support for multiple PD from one process

2024-12-02 Thread Ekansh Gupta
client ID to DSP which would be assigned during device open and will be dependent on the index of session allocated for the PD. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- drivers/misc

Re: [PATCH v1 4/4] misc: fastrpc: Add debugfs support for fastrpc

2024-12-02 Thread Ekansh Gupta
On 12/2/2024 6:18 PM, Dmitry Baryshkov wrote: > On Mon, Dec 02, 2024 at 03:27:43PM +0530, Ekansh Gupta wrote: >> >> On 11/22/2024 12:23 AM, Dmitry Baryshkov wrote: >>> On Thu, Nov 21, 2024 at 12:12:17PM +0530, Ekansh Gupta wrote: >>>> On 11/18/2024 7:32 PM,

Re: [PATCH v1 4/4] misc: fastrpc: Add debugfs support for fastrpc

2024-12-02 Thread Ekansh Gupta
On 11/22/2024 12:23 AM, Dmitry Baryshkov wrote: > On Thu, Nov 21, 2024 at 12:12:17PM +0530, Ekansh Gupta wrote: >> >> On 11/18/2024 7:32 PM, Greg KH wrote: >>> On Mon, Nov 18, 2024 at 02:10:46PM +0530, Ekansh Gupta wrote: >>>> Add changes to support de

[PATCH v5 2/2] misc: fastrpc: Rename tgid and pid to client_id

2024-12-01 Thread Ekansh Gupta
. Rename the data which uses this client id. Signed-off-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov --- drivers/misc/fastrpc.c | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index

[PATCH v5 1/2] misc: fastrpc: Add support for multiple PD from one process

2024-12-01 Thread Ekansh Gupta
client ID to DSP which would be assigned during device open and will be dependent on the index of session allocated for the PD. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- drivers/misc

[PATCH v5 0/2] Add changes to use session index as identifier

2024-12-01 Thread Ekansh Gupta
. - Changed dsp_pgid data type. - Resolved memory leak. Ekansh Gupta (2): misc: fastrpc: Add support for multiple PD from one process misc: fastrpc: Rename tgid and pid to client_id drivers/misc/fastrpc.c | 57 +- 1 file changed, 29 insertions(+), 28

Re: [PATCH v4 1/2] misc: fastrpc: Add support for multiple PD from one process

2024-11-29 Thread Ekansh Gupta
On 11/22/2024 3:51 AM, Dmitry Baryshkov wrote: > On Thu, Nov 21, 2024 at 02:17:12PM +0530, Ekansh Gupta wrote: >> Memory intensive applications(which requires more tha 4GB) that wants >> to offload tasks to DSP might have to split the tasks to multiple >> user PD to make th

[PATCH v4 1/2] misc: fastrpc: Add support for multiple PD from one process

2024-11-21 Thread Ekansh Gupta
client ID to DSP which would be assigned during device open and will be dependent on the index of session allocated for the PD. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- drivers/misc

[PATCH v4 2/2] misc: fastrpc: Rename tgid and pid to client_id

2024-11-21 Thread Ekansh Gupta
. Rename the data which uses this client id. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 08f223c95c33..93826de9c191 100644

[PATCH v4 0/2] Add changes to use session index as identifier

2024-11-21 Thread Ekansh Gupta
ID. Ekansh Gupta (2): misc: fastrpc: Add support for multiple PD from one process misc: fastrpc: Rename tgid and pid to client_id drivers/misc/fastrpc.c | 58 ++ 1 file changed, 30 insertions(+), 28 deletions(-) -- 2.34.1

Re: [PATCH v1 4/4] misc: fastrpc: Add debugfs support for fastrpc

2024-11-20 Thread Ekansh Gupta
On 11/18/2024 7:32 PM, Greg KH wrote: > On Mon, Nov 18, 2024 at 02:10:46PM +0530, Ekansh Gupta wrote: >> Add changes to support debugfs. The fastrpc directory will be >> created which will carry debugfs files for all fastrpc processes. >> The information of fastrpc user and

Re: [PATCH v1 3/4] misc: fastrpc: Introduce fastrpc_shared.h header

2024-11-20 Thread Ekansh Gupta
On 11/18/2024 7:28 PM, Greg KH wrote: > On Mon, Nov 18, 2024 at 02:10:45PM +0530, Ekansh Gupta wrote: >> Move fastrpc structures and MACRO definitions to a new header file. >> These definitions are consumed by other upcoming features like >> debugfs, PDR support etc. >&g

Re: [PATCH v1 2/4] misc: fastrpc: Rename fastrpc.c to fastrpc_main.c

2024-11-20 Thread Ekansh Gupta
On 11/18/2024 7:28 PM, Greg KH wrote: > On Mon, Nov 18, 2024 at 02:10:44PM +0530, Ekansh Gupta wrote: >> Rename the main fastrpc source file to accomodate new files to be >> compiled in the same kernel object. >> >> Signed-off-by: Ekansh Gupta >> ---

[PATCH v1 0/4] Add debugfs support for fastrpc driver

2024-11-18 Thread Ekansh Gupta
new files. - Add support for debugfs for fastrpc driver. Most of the fastrpc user and channel context information are getting capture as part of patch. Ekansh Gupta (4): misc: fastrpc: Move fastrpc driver to misc/fastrpc/ misc: fastrpc: Rename fastrpc.c to fastrpc_main.c misc

[PATCH v1 3/4] misc: fastrpc: Introduce fastrpc_shared.h header

2024-11-18 Thread Ekansh Gupta
Move fastrpc structures and MACRO definitions to a new header file. These definitions are consumed by other upcoming features like debugfs, PDR support etc. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc/fastrpc_main.c | 136 +- drivers/misc/fastrpc/fastrpc_shared.h

[PATCH v1 1/4] misc: fastrpc: Move fastrpc driver to misc/fastrpc/

2024-11-18 Thread Ekansh Gupta
://lore.kernel.org/all/20240606165939.12950-6-quic_ekang...@quicinc.com/ Signed-off-by: Ekansh Gupta --- MAINTAINERS | 2 +- drivers/misc/Kconfig | 13 + drivers/misc/Makefile| 2 +- drivers/misc/fastrpc/Kconfig | 16

[PATCH v1 4/4] misc: fastrpc: Add debugfs support for fastrpc

2024-11-18 Thread Ekansh Gupta
Add changes to support debugfs. The fastrpc directory will be created which will carry debugfs files for all fastrpc processes. The information of fastrpc user and channel contexts are getting captured as part of this change. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc/Makefile

[PATCH v1 2/4] misc: fastrpc: Rename fastrpc.c to fastrpc_main.c

2024-11-18 Thread Ekansh Gupta
Rename the main fastrpc source file to accomodate new files to be compiled in the same kernel object. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc/Makefile | 1 + drivers/misc/fastrpc/{fastrpc.c => fastrpc_main.c} | 0 2 files changed, 1 insertion(+) rename driv

Re: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2024-10-09 Thread Ekansh Gupta
On 10/7/2024 2:23 PM, Greg KH wrote: > On Mon, Oct 07, 2024 at 02:15:15PM +0530, Ekansh Gupta wrote: >> +struct fastrpc_invoke_v2 { >> +struct fastrpc_invoke inv; >> +__u64 crc; >> +__u32 reserved[16]; > I'm sure we have been over this before, but

[PATCH v1 4/4] misc: fastrpc: Add polling mode support for fastRPC driver

2024-10-07 Thread Ekansh Gupta
which will eliminate CPU wakeup and scheduling latencies and reduce fastRPC overhead. With this change, DSP always sends a glink response which will get ignored if polling mode didn't time out. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c

[PATCH v1 3/4] misc: fastrpc: Modify context id calculation for poll mode

2024-10-07 Thread Ekansh Gupta
Poll mode is a feature to be introduced which improves the fastrpc remote calls latency. For this feature, DSP expects the 4th to 7th bit of context id to be zero. Prepare context id in such a way that polling mode can be supported. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 8

[PATCH v1 2/4] misc: fastrpc: Capture kernel and DSP performance counters

2024-10-07 Thread Ekansh Gupta
performance information in the metadata which is then copied to a buffer passed by the users. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 143 ++-- include/uapi/misc/fastrpc.h | 4 +- 2 files changed, 139 insertions(+), 8 deletions(-) diff --git a

[PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 request

2024-10-07 Thread Ekansh Gupta
remote call. If user intends to enable CRC check, first local user CRC is calculated at user end and a CRC buffer is passed to DSP to capture remote CRC values. DSP is expected to write to the remote CRC buffer which is then compared at user level with the local CRC values. Signed-off-by: Ekansh Gupta

[PATCH v1 0/4] Add invokeV2 to support new features

2024-10-07 Thread Ekansh Gupta
://github.com/quic/fastrpc/pull/73 Ekansh Gupta (4): misc: fastrpc: Add CRC support using invokeV2 request misc: fastrpc: Capture kernel and DSP performance counters misc: fastrpc: Modify context id calculation for poll mode misc: fastrpc: Add polling mode support for fastRPC driver drivers

Re: [PATCH v1 3/3] misc: fastrpc: Skip reference for DMA handles

2024-09-18 Thread Ekansh Gupta
On 8/30/2024 3:03 PM, Dmitry Baryshkov wrote: > On Thu, Aug 22, 2024 at 04:29:33PM GMT, Ekansh Gupta wrote: >> If multiple dma handles are passed with same fd over a remote call >> the kernel driver takes a reference and expects that put for the >> map will be called as m

Re: [PATCH v1 2/3] misc: fastrpc: Fix fastrpc_map_lookup operation

2024-09-18 Thread Ekansh Gupta
On 8/30/2024 3:01 PM, Dmitry Baryshkov wrote: > On Thu, Aug 22, 2024 at 04:29:32PM GMT, Ekansh Gupta wrote: >> Fastrpc driver creates maps for user allocated fd buffers. Before >> creating a new map, the map list is checked for any already existing >> maps using map fd. C

[PATCH v1 3/3] misc: fastrpc: Skip reference for DMA handles

2024-08-22 Thread Ekansh Gupta
call only once for the fd. This can cause SMMU fault issue as the same fd can be used in future for some other call. Fixes: 35a82b87135d ("misc: fastrpc: Add dma handle implementation") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 13 - 1 file

[PATCH v1 2/3] misc: fastrpc: Fix fastrpc_map_lookup operation

2024-08-22 Thread Ekansh Gupta
the next time which could result in memory issues. Check for user passed VA and length also when looking up for the map. Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 24 +++--

[PATCH v1 1/3] misc: fastrpc: Save actual DMA size in fastrpc_map structure

2024-08-22 Thread Ekansh Gupta
: Add support for context Invoke method") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 5204fda51da3..bcfb8ce1a0e3 100644 ---

[PATCH v1 0/3] Add missing fixes to FastRPC driver

2024-08-22 Thread Ekansh Gupta
This patch series adds the listed bug fixes that have been missing in upstream fastRPC driver. - Store actual size of map and check it against the user passed size. - Consider map user VA and actual size for map lookup. - Skip refcount increment for DMA handles. Ekansh Gupta (3): misc: fastrpc

Re: [PATCH v3] misc: fastrpc: Add support for multiple PD from one process

2024-08-19 Thread Ekansh Gupta
On 8/19/2024 4:35 PM, Caleb Connolly wrote: > Hi Ekansh, > > On 08/08/2024 12:42, Ekansh Gupta wrote: >> Memory intensive applications(which requires more tha 4GB) that wants >> to offload tasks to DSP might have to split the tasks to multiple >> user PD to m

[PATCH v3] misc: fastrpc: Add support for multiple PD from one process

2024-08-08 Thread Ekansh Gupta
client ID to DSP which would be assigned during device open and will be dependent on the index of session allocated for the PD. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- Changes in v2

Re: [PATCH v2] misc: fastrpc: Add support for multiple PD from one process

2024-07-25 Thread Ekansh Gupta
On 7/22/2024 1:48 PM, Dmitry Baryshkov wrote: > On Sat, Jul 20, 2024 at 09:16:11AM GMT, Ekansh Gupta wrote: >> Memory intensive applications(which requires more tha 4GB) that wants >> to offload tasks to DSP might have to split the tasks to multiple >> user PD to make th

Re: [PATCH v6 0/2] Fix user PD inimem requirements

2024-07-22 Thread Ekansh Gupta
On 7/22/2024 1:56 PM, Dmitry Baryshkov wrote: > On Mon, Jul 22, 2024 at 01:31:58PM GMT, Ekansh Gupta wrote: >> This patch series fixes the incorrect initmem size assumptions for >> signed and unsigned user PD. >> Previous single patch[v4]: >> https://lore.kernel.org

Re: [PATCH v6 2/2] misc: fastrpc: Increase unsigned PD initmem size

2024-07-22 Thread Ekansh Gupta
On 7/22/2024 2:04 PM, Dmitry Baryshkov wrote: > On Mon, Jul 22, 2024 at 01:32:00PM GMT, Ekansh Gupta wrote: >> For unsigned PD offloading requirement, additional memory is required >> because of additional static heap initialization. Without this >> additional memory, PD

Re: [PATCH v6 1/2] misc: fastrpc: Define a new initmem size for user PD

2024-07-22 Thread Ekansh Gupta
On 7/22/2024 2:02 PM, Dmitry Baryshkov wrote: > On Mon, Jul 22, 2024 at 01:31:59PM GMT, Ekansh Gupta wrote: >> For user PD initialization, initmem is allocated and sent to DSP for >> initial memory requirements like shell loading. The size of this memory >> is decided ba

[PATCH v6 2/2] misc: fastrpc: Increase unsigned PD initmem size

2024-07-22 Thread Ekansh Gupta
PD init is used as the PD heap. Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastr

[PATCH v6 1/2] misc: fastrpc: Define a new initmem size for user PD

2024-07-22 Thread Ekansh Gupta
length of 3MB. Fixes: d73f71c7c6ee ("misc: fastrpc: Add support for create remote init process") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastr

[PATCH v6 0/2] Fix user PD inimem requirements

2024-07-22 Thread Ekansh Gupta
. Changes in v5: - Splitted the change into separate patches. Changes in v6: - Changed Unsigned extra length macro name. - Add comment in proper format. Ekansh Gupta (2): misc: fastrpc: Define a new initmem size for user PD misc: fastrpc: Increase unsigned PD initmem size drivers/misc

Re: [PATCH v5 1/2] misc: fastrpc: Define a new initmem size for user PD

2024-07-22 Thread Ekansh Gupta
On 7/22/2024 1:09 PM, Greg KH wrote: > On Mon, Jul 22, 2024 at 11:42:52AM +0530, Ekansh Gupta wrote: >> >> On 7/22/2024 11:28 AM, Greg KH wrote: >>> On Mon, Jul 22, 2024 at 11:24:36AM +0530, Ekansh Gupta wrote: >>>> For user PD initialization, init

Re: [PATCH v5 2/2] misc: fastrpc: Increase unsigned PD initmem size

2024-07-21 Thread Ekansh Gupta
On 7/22/2024 11:30 AM, Greg KH wrote: > On Mon, Jul 22, 2024 at 11:24:37AM +0530, Ekansh Gupta wrote: >> For unsigned PD offloading requirement, additional memory is required >> because of additional static heap initialization. Without this >> additional memory, PD init

Re: [PATCH v5 1/2] misc: fastrpc: Define a new initmem size for user PD

2024-07-21 Thread Ekansh Gupta
On 7/22/2024 11:28 AM, Greg KH wrote: > On Mon, Jul 22, 2024 at 11:24:36AM +0530, Ekansh Gupta wrote: >> For user PD initialization, initmem is allocated and sent to DSP for >> initial memory requirements like shell loading. The size of this memory >> is decided based on t

[PATCH v5 1/2] misc: fastrpc: Define a new initmem size for user PD

2024-07-21 Thread Ekansh Gupta
length of 3MB. Fixes: d73f71c7c6ee ("misc: fastrpc: Add support for create remote init process") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastr

[PATCH v5 2/2] misc: fastrpc: Increase unsigned PD initmem size

2024-07-21 Thread Ekansh Gupta
PD init is used as the PD heap. Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP") Cc: stable Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastr

[PATCH v5 0/2] Fix user PD inimem requirements

2024-07-21 Thread Ekansh Gupta
in v5: - Splitted the change into separate patches. Ekansh Gupta (2): misc: fastrpc: Define a new initmem size for user PD misc: fastrpc: Increase unsigned PD initmem size drivers/misc/fastrpc.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.34.1

Re: [PATCH v4] misc: fastrpc: Increase unsigned PD initmem size

2024-07-21 Thread Ekansh Gupta
On 7/19/2024 3:36 PM, Dmitry Baryshkov wrote: > On Fri, Jul 19, 2024 at 02:27:08PM GMT, Ekansh Gupta wrote: >> For user PD initialization, initmem is allocated and sent to DSP for >> initial memory requirements like shell loading. This size is the shell >> size that is pas

[PATCH v2] misc: fastrpc: Add support for multiple PD from one process

2024-07-19 Thread Ekansh Gupta
effective pgid to DSP which would be allocated during device open and will have a lifetime till the device is closed. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- Changes in v2

[PATCH v4] misc: fastrpc: Increase unsigned PD initmem size

2024-07-19 Thread Ekansh Gupta
efore loading process to the DSP") Cc: stable Signed-off-by: Ekansh Gupta --- Changes in v2: - Modified commit text. - Removed size check instead of updating max file size. Changes in v3: - Added bound check again with a higher max size definition. - Modified commit text accordingly. Cha

Re: [PATCH v1] misc: fastrpc: Add support for multiple PD from one process

2024-07-03 Thread Ekansh Gupta
On 7/3/2024 4:12 PM, Dmitry Baryshkov wrote: > On Wed, Jul 03, 2024 at 12:22:00PM GMT, Ekansh Gupta wrote: >> Memory intensive applications(which requires more tha 4GB) that wants >> to offload tasks to DSP might have to split the tasks to multiple >> user PD to make th

Re: [PATCH v1] misc: fastrpc: Add support for multiple PD from one process

2024-07-03 Thread Ekansh Gupta
On 7/4/2024 11:47 AM, Ekansh Gupta wrote: > > On 7/3/2024 4:09 PM, Greg KH wrote: >> On Wed, Jul 03, 2024 at 12:22:00PM +0530, Ekansh Gupta wrote: >>> @@ -268,6 +272,7 @@ struct fastrpc_channel_ctx { >>> struct fastrpc_session_ctx session[FASTRPC_MAX_SESS

Re: [PATCH v1] misc: fastrpc: Add support for multiple PD from one process

2024-07-03 Thread Ekansh Gupta
On 7/3/2024 4:09 PM, Greg KH wrote: > On Wed, Jul 03, 2024 at 12:22:00PM +0530, Ekansh Gupta wrote: >> @@ -268,6 +272,7 @@ struct fastrpc_channel_ctx { >> struct fastrpc_session_ctx session[FASTRPC_MAX_SESSIONS]; >> spinlock_t lock; >> struct idr

[PATCH v1] misc: fastrpc: Add support for multiple PD from one process

2024-07-02 Thread Ekansh Gupta
effective pgid to DSP which would be allocated during device open and will have a lifetime till the device is closed. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 48

Re: [PATCH v2] misc: fastrpc: Remove user PD initmem size check

2024-07-02 Thread Ekansh Gupta
On 7/2/2024 3:10 PM, Dmitry Baryshkov wrote: > On Tue, 2 Jul 2024 at 10:07, Ekansh Gupta wrote: >> >> >> On 7/1/2024 10:41 PM, Dmitry Baryshkov wrote: >>> On Mon, Jul 01, 2024 at 10:50:38AM GMT, Ekansh Gupta wrote: >>>> On 6/28/2024 7:51 PM, Greg KH

Re: [PATCH v3] misc: fastrpc: Increase max user PD initmem size

2024-07-02 Thread Ekansh Gupta
On 7/2/2024 2:44 AM, Bjorn Andersson wrote: > On Mon, Jul 01, 2024 at 05:22:37PM +0530, Ekansh Gupta wrote: >> For user PD initialization, initmem is allocated and sent to DSP for >> initial memory requirements like shell loading. This size is passed >> by user space and

  1   2   >