Skip to content

fastrpc: add dsp_check utility and documentation#336

Open
m-bhattar wants to merge 1 commit into
qualcomm:developmentfrom
m-bhattar:checker
Open

fastrpc: add dsp_check utility and documentation#336
m-bhattar wants to merge 1 commit into
qualcomm:developmentfrom
m-bhattar:checker

Conversation

@m-bhattar

Copy link
Copy Markdown

Adds a dsp_check utility to assess DSP availability and FastRPC offload readiness, along with user-facing documentation explaining the readiness criteria.

@ekanshibu

ekanshibu commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

add proper commit message, also looks like android compilation CI is failing, moving PR to draft until basic problem are resolved.

@ekanshibu ekanshibu marked this pull request as draft April 22, 2026 05:45
Comment thread test/dsp_check.c Outdated
* A DSP is considered Online IFF:
* - remoteproc exists
* - remoteproc state == running
* - firmware for that DSP is present

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order of this should be

  1. firmware file present
  2. remote proc exist
  3. remote proc state

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update

Comment thread test/dsp_check.c Outdated
* - required DSP modules (skel/shell) are present
* - required FastRPC user-space libraries are present
* - firmware build ID matches shell build ID (if available)
* - a matching FastRPC device node exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order is :

DSP is online
FastRPC device exists
user space libraries present
Shell file is present
shell and firmware binaries match

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked, will update

Comment thread test/dsp_check.c Outdated

#define QCOM_BASE_DIR "/usr/share/qcom"
#define MACHINE_MODEL_PATH "/sys/firmware/devicetree/base/model"
#define FW_BASE_PATH "/lib/firmware/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for legacy systems like 820c, QRB5165, etc as they have different locations for firmware files and different device nodes for remote_proc and glink.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked, will update

@m-bhattar m-bhattar force-pushed the checker branch 2 times, most recently from 939e8ae to cef2c85 Compare May 7, 2026 07:15
@m-bhattar m-bhattar requested a review from quic-bkumar May 7, 2026 08:09
@m-bhattar m-bhattar marked this pull request as ready for review May 29, 2026 03:50
Comment thread test/dsp_check_doc.md Outdated
| SignedPD | Signed process domains available |
| UnsignedPD* | Unsigned process domains available |

**Note:** On platforms that do not support unsigned PDs, unsigned binaries must be signed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On platforms that do not support unsigned PDs, skel binaries must be signed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update

Comment thread test/dsp_check_doc.md Outdated
Within the DSP base path, the tool checks for:

- FastRPC shell binaries
- Skeleton (`*_skel.so`) libraries

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What skel libraries are checked for existance?

Comment thread test/dsp_check_doc.md Outdated

- It exists on the platform
- It is currently running
- Firmware is present

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the firmware file check be the first one?

Comment thread test/dsp_check_doc.md Outdated

/dev/dma_heap/system

This result is printed once and applies globally to all DSPs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an optional or mandatory dependency?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is optional, changed this and will update

@m-bhattar m-bhattar force-pushed the checker branch 3 times, most recently from c28545e to 27e20a4 Compare June 5, 2026 11:03
@m-bhattar m-bhattar requested a review from quic-bkumar June 8, 2026 06:16
Comment thread test/dsp_check.c Outdated

printf("\n* If Unsigned PD not supported, needs signing to run\n");

#ifdef PARSE_YAML

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bring #ifdef to start of line

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update

Comment thread test/dsp_check.c Outdated
#include <yaml.h>
#endif


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra blank lines

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update

Comment thread test/dsp_check.c Outdated
*
* DSP Online:
* A DSP is considered Online IFF:
* - remoteproc exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep all these details in .md file, you can remove from here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked, will update

-Add a dsp_check diagnostic utility to evaluate DSP availability and
FastRPC offload readiness across supported DSPs.

This determines DSP online state using remoteproc, validates
firmware presence, checks required DSP runtime modules, verifies
FastRPC user-space libraries, and reports device node availability.
Clear reasons are provided when offload is not possible.
-Works for both Linux and Android targets.
-Documentation for the user is included to describe this readiness
criteria and explain how to interpret the reported output.

Note:
Whitespace changes (CRLF -> LF) are included in this commit.

Signed-off-by: Mahima Bhattaram <mbhattar@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants