For ADSP, only a limited number of FastRPC context banks (CBs) are
available. Each CB supports a single session, which means only a few
processes can run on ADSP simultaneously. If all sessions are consumed
by fastrpc daemons, no session remains available when a user application
starts, causing the application to fail.

To work around this, some Device Tree sources set:
  qcom,nsessions = <5>;
which duplicated sessions inline during fastrpc_cb_probe(). Upstream
feedback indicated that this policy does not belong in DT and should be
handled at the driver level instead.

This series removes the per-CB DT-driven duplication and replaces it with
a fixed driver-side post-probe step: after of_platform_populate() returns
in fastrpc_rpmsg_probe() — once all compute-CB child nodes have been
probed and the session array is fully populated — FASTRPC_DUP_SESSIONS (4)
copies of the last probed session are appended for the ADSP domain. This
keeps the per-CB probe path simple and ensures duplicates are always
derived from a stable, fully-initialised session state.

The qcom,nsessions binding is deprecated in the same series.

Patch [v1]: 
https://lore.kernel.org/r/[email protected]

Signed-off-by: Vinayak Katoch <[email protected]>
---
Changes in v2:
- Added patch to deprecate the qcom,nsessions dt-binding.
- Kept the logic unchanged; only split into two patches.

---
Vinayak Katoch (2):
      dt-bindings: misc: qcom,fastrpc: deprecate qcom,nsessions
      misc: fastrpc: create duplicate sessions after all CB probing

 .../devicetree/bindings/misc/qcom,fastrpc.yaml     |  2 ++
 drivers/misc/fastrpc.c                             | 30 ++++++++++++----------
 2 files changed, 19 insertions(+), 13 deletions(-)
---
base-commit: 97e797263a5e963da3d1e66e743fd518567dfe37
change-id: 20260609-dup-sessions-ea2acaac1994

Best regards,
-- 
Vinayak Katoch <[email protected]>

Reply via email to