Backport 1.0.7-1qli1 to trixie - #93
Merged
Merged
Conversation
-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>
Adds a dsp_check utility to assess DSP availability and FastRPC offload readiness, along with user-facing documentation explaining the readiness criteria.
Exit the internal restart loop on AEE_ENOMEMORY so the daemon does not spin indefinitely when the kernel reports OOM; it is pointless to retry in that condition. Add RestartForceExitStatus=SIGTERM to all service files so that an unintended SIGTERM (e.g. pkill) is treated as a failure and triggers a restart, consistent with SIGKILL behavior. Add RestartPreventExitStatus=2 (AEE_ENOMEMORY) to the audiopd service only, since the kernel returns ENOMEM when the remote heap DMA region is not configured, which is a permanent condition that restarting cannot recover from. Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Add --with-sysusersdir and --with-udevrulesdir to DISTCHECK_CONFIGURE_FLAGS with relative paths, keeping the distcheck install self-contained under the temporary _inst prefix. Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
Free hi->name & h->name in cleanup path, and free pdname_uri in open path. Add lock/unlock around pop loop in REVERSE_HANDLE_LIST_ID cleanup. Signed-off-by: Eddie Lin <yutlin@qti.qualcomm.com>
Add a new config deinit path to free FARF log filename buffers allocated during config init, ensuring init/deinit are paired. Signed-off-by: Eddie Lin <yutlin@qti.qualcomm.com>
Free hi->name & h->name in cleanup path, and free pdname_uri in open path. Add lock/unlock around pop loop in REVERSE_HANDLE_LIST_ID cleanup. Add a new config deinit path to free FARF log filename buffers allocated during config init, ensuring init/deinit are paired.
…#358) ## Fix `distcheck` failures caused by absolute sysusers/udev paths ### Problem - `make distcheck` failed because `sysusersdir` and `udevrulesdir` default to absolute system paths: - `/usr/lib/sysusers.d` - `/usr/lib/udev/rules.d` - The `distcheck` environment is unprivileged and cannot install files into these locations. ### Solution - Add `--with-sysusersdir` and `--with-udevrulesdir` to `DISTCHECK_CONFIGURE_FLAGS`. - Configure both directories to use relative paths within the build tree instead of system locations. ### Result - Prevents installation attempts to protected system directories during `distcheck`. - Aligns with the existing `systemdsystemunitdir` override. - Allows `make distcheck` to complete successfully in isolated build environments.
GDSP0 and GDSP1 domains are missing from usage instructions and test support. The test binary and its usage instructions need to reflect these domains so that users can target them when running tests. Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
- FASTRPC_GET_URI: split combined uri/uri_len check so an insufficient output buffer returns AEE_EBADSIZE instead of AEE_EBADPARM - remote_munmap64: reject zero and negative size with AEE_EBADPARM before the value reaches the kernel ioctl; remote_munmap inherits this via its int64_t cast and delegation Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
- Guard against size_t overflow before buf.size = size + PAGE_SIZE, using SIZE_MAX as the correct upper bound for size_t arithmetic - Fix mmap failure detection by checking MAP_FAILED instead of NULL - Change rpc_info::size from int to size_t to avoid truncation in munmap - Remove erroneous free() on mmap'd pointer in bail; simplify cleanup - Fix size <= 0 comparison with unsigned size_t, use size == 0 - Add size <= 0 guard in rpcmem_alloc() to reject negative values without breaking the existing int size API - Reset dmafd/rpcfd to -1 after close() in rpcmem_deinit() - Remove dead aligned_buf computation overwritten on the next line - Remove unused struct fastrpc_alloc_dma_buf Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Signed-off-by: Eddie Lin <yutlin@qti.qualcomm.com>
On a system with multiple YAML files under conf.d/, the daemon emits a DSP_LIBRARY_PATH not found warning for every file that does not contain an entry for the running machine. With 17+ YAML files installed, this floods journalctl with noise on every daemon startup. Root cause: get_dsp_lib_path() emitted a warning whenever the target machine name was not found in a given file. parse_config_dir() called it for every YAML file unconditionally, so a warning was printed for each file that legitimately belongs to a different board. Fix: Remove the per-file warning from get_dsp_lib_path(). Read every YAML file in conf.d/ unconditionally so that all target configurations are checked. On a single root filesystem supporting multiple targets, each target has its own YAML file and all must be scanned to find the matching machine. The existing summary warning for no match across all files is preserved, giving exactly one diagnostic when something is genuinely wrong. Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Distributions such as Debian require manual pages for installed binaries. The FastRPC daemons currently do not have associated documentation. Provide manual pages for the FastRPC user API and daemon interfaces. Use a single daemon manual page for the various DSP daemon names and install the appropriate aliases during installation so the documentation remains consistent across compatibility entry points. Fixes: #229 Related to: #321 Signed-off-by: Mahima Bhattaram <mbhattar@qti.qualcomm.com>
…362) On a system with multiple YAML files under conf.d/, the daemon emits a DSP_LIBRARY_PATH not found warning for every file that does not contain an entry for the running machine. With 17+ YAML files installed, this floods journalctl with noise on every daemon startup. Root cause: get_dsp_lib_path() emitted a warning whenever the target machine name was not found in a given file. parse_config_dir() called it for every YAML file unconditionally, so a warning was printed for each file that legitimately belongs to a different board. Fix: Remove the per-file warning from get_dsp_lib_path(). Read every YAML file in conf.d/ unconditionally so that all target configurations are checked. On a single root filesystem supporting multiple targets, each target has its own YAML file and all must be scanned to find the matching machine. The existing summary warning for no match across all files is preserved, giving exactly one diagnostic when something is genuinely wrong. Fixes: #322 CRs-Fixed: 4604037
… (#360) - Guard against size_t overflow before buf.size = size + PAGE_SIZE, using SIZE_MAX as the correct upper bound for size_t arithmetic - Fix mmap failure detection by checking MAP_FAILED instead of NULL - Change rpc_info::size from int to size_t to avoid truncation in munmap - Remove erroneous free() on mmap'd pointer in bail; simplify cleanup - Fix size <= 0 comparison with unsigned size_t, use size == 0 - Add size <= 0 guard in rpcmem_alloc() to reject negative values without breaking the existing int size API - Reset dmafd/rpcfd to -1 after close() in rpcmem_deinit() - Remove dead aligned_buf computation overwritten on the next line - Remove unused struct fastrpc_alloc_dma_buf CRs-Fixed: 4601066
- FASTRPC_GET_URI: split combined uri/uri_len check so an insufficient output buffer returns AEE_EBADSIZE instead of AEE_EBADPARM - remote_munmap64: reject zero and negative size with AEE_EBADPARM before the value reaches the kernel ioctl; remote_munmap inherits this via its int64_t cast and delegation CRs-Fixed: 4597612
This update expands the FastRPC test application to include execution options for GDSP, GDSP1. CRs-fixed: 4585075
Exit the internal restart loop on AEE_ENOMEMORY so the daemon does not spin indefinitely when the kernel reports OOM; it is pointless to retry in that condition. Add RestartForceExitStatus=SIGTERM to all service files so that an unintended SIGTERM (e.g. pkill) is treated as a failure and triggers a restart, consistent with SIGKILL behavior. Add RestartPreventExitStatus=2 (AEE_ENOMEMORY) to the audiopd service only, since the kernel returns ENOMEM when the remote heap DMA region is not configured, which is a permanent condition that restarting cannot recover from. CRs-Fixed: 4585150
Distributions such as Debian require manual pages for installed binaries. The FastRPC daemons currently do not have associated documentation. Provide manual pages for the FastRPC user API and daemon interfaces. Use a single daemon manual page for the various DSP daemon names and install the appropriate aliases during installation so the documentation remains consistent across compatibility entry points. Fixes: #229 Related to: #321 CRs-Fixed: 4600851
Remove workflows and actions for pre-merge board builds, LAVA testing, and nightly kernel build. LAVA tests are now handled externally and post results back to each PR. Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
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 power modes. With polling mode support fastRPC
driver can poll continuously on a memory after sending a message
to remote subsystem 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.
Steps to enable polling mode:
** Remote control structure **:
typedef enum remote_rpc_latency_flags {
RPC_DISABLE_QOS = 0,
RPC_PM_QOS,
RPC_ADAPTIVE_QOS,
RPC_POLL_QOS,
} remote_rpc_control_latency_t;
struct remote_rpc_control_latency {
remote_rpc_control_latency_t enable;
uint32_t latency;
};
** Application code **:
struct remote_rpc_control_latency data;
data.enable = RPC_POLL_QOS;
err = remote_handle64_control(h, DSPRPC_CONTROL_LATENCY, (void*)&data, sizeof(data));
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Replace the global DSP_LIBS_LOCATION in get_dsp_search_path() with a
per-domain DSP_SEARCH_PATHS_CACHE[], built lazily in domain_init().
Search path preference order for each domain:
1. ADSP_LIBRARY_PATH env (user/container, prepended at open-time)
2. Arch-specific path (CONFIG_BASE_DIR/hexagon/v<XY>)
- Resolved via fastrpc_get_cap(ARCH_VER) low byte on modern targets
- Falls back to per-domain YAML key (ADSP_ARCH..CDSP_ARCH) on
legacy targets where the capability API is not supported
3. DSP_LIBS_LOCATION (board-specific YAML path + generic fallback)
Add optional *_ARCH keys to the config schema and parse them into
DSP_ARCH_FROM_YAML[] in fastrpc_config_parser.c, exposed via
get_dsp_arch_from_yaml().
Update conf_guideline.md to document the new *_ARCH keys, relative path
convention, per-file layout, and updated naming scheme.
Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
Document the role of FastRPC daemons (adsprpcd, cdsprpcd, etc.) and clarify when they are needed. Explains that FastRPC works in two modes: - Basic mode (without daemons): All RPC calls work, but static PD exceptions are silent and static PDs cannot access system services on APPS (dynamic PDs are unaffected) - Full-featured mode (with daemons): Adds exception logging, reverse RPC for file I/O and memory allocation, lifecycle management (SSR/PDR) Clarifies the distinction between static PDs (root PD, audio PD, sensors PD) which need daemons for system services, and dynamic PDs which communicate directly with their APPS process. Includes resource usage details with references to specific constants in the source code (ADSP_LISTENER_MEM_CACHE_SIZE, DEFAULT_MEMORY_SIZE), and defines technical terms (PDs, HLOS/Linux, APPS, FARF, QuRT, ACDB). Closes: #321 Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com> Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Add Container Considerations section documenting filesystem namespace implications for static vs dynamic PD workloads in containerized environments. Most ML/compute workloads (dynamic PDs) work fine; audio workloads (static PDs) need host filesystem coordination. Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com> Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
## Summary This PR removes the GitHub Actions CI/CD implementation from the FastRPC repository, including custom composite actions, reusable workflows, machine configuration definitions, and supporting automation for build, artifact management, and LAVA-based validation. The following components have been removed: - Custom composite actions for: - AWS S3 artifact upload/download management - Workspace synchronization - Docker image creation - FastRPC build and packaging - LAVA job rendering - Build matrix generation - Reusable and top-level workflows for: - Pre-merge CI execution - Sync and build orchestration - LAVA test execution - Parameter loading - Nightly kernel build and artifact publication - Machine configuration data: - `ci/MACHINES.json` ## Impact - Removes CI/CD workflow definitions and supporting actions from the FastRPC repository. - Removes AWS S3 artifact management helpers. - Removes LAVA job generation, submission, monitoring, and result collection automation from this repository. - Removes device matrix generation and machine-specific build configuration handling. - Eliminates all repository-specific GitHub Actions CI/CD components. **Note:** This change does **not** remove the FastRPC pre-merge build and test pipeline itself. The CI/CD workflows will continue to be executed from dedicated CI configuration repositories: - **STG:** `fastrpc-config` - **PROD:** `fastrpc-ci` This PR only migrates ownership of the workflow definitions away from the FastRPC source repository. ## Motivation This change centralizes CI/CD workflow management in dedicated configuration repositories, reducing maintenance overhead within the FastRPC repository and enabling independent management of build and validation infrastructure. ## Validation - Verified removal of all CI/CD-related GitHub Actions, workflows, and machine configuration files from the FastRPC repository. - Confirmed that pre-merge build and test execution will continue through the centralized CI repositories (`fastrpc-config` and `fastrpc-ci`). - Confirmed that the change does not modify FastRPC source code or runtime functionality.
Replace the global DSP_LIBS_LOCATION in get_dsp_search_path() with a
per-domain DSP_SEARCH_PATHS_CACHE[], built lazily in domain_init().
Search path preference order for each domain:
1. ADSP_LIBRARY_PATH env (user/container, prepended at open-time)
2. Arch-specific path (CONFIG_BASE_DIR/hexagon/v\<XY>)
- Resolved via fastrpc_get_cap(ARCH_VER) low byte on modern targets
- Falls back to per-domain YAML key (ADSP_ARCH..CDSP_ARCH) on legacy
targets where the capability API is not supported
3. DSP_LIBS_LOCATION (board-specific YAML path + generic fallback)
Add optional *_ARCH keys to the config schema and parse them into
DSP_ARCH_FROM_YAML[] in fastrpc_config_parser.c, exposed via
get_dsp_arch_from_yaml().
Update conf_guideline.md to document the new *_ARCH keys, relative path
convention, per-file layout, and updated naming scheme.
CRs-Fixed: 4608348
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 power modes. With polling mode support fastRPC driver can poll
continuously on a memory after sending a message to remote subsystem
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.
Steps to enable polling mode:
** Remote control structure **:
typedef enum remote_rpc_latency_flags {
RPC_DISABLE_QOS = 0,
RPC_PM_QOS,
RPC_ADAPTIVE_QOS,
RPC_POLL_QOS,
} remote_rpc_control_latency_t;
struct remote_rpc_control_latency {
remote_rpc_control_latency_t enable;
uint32_t latency;
};
** Application code **:
struct remote_rpc_control_latency data;
data.enable = RPC_POLL_QOS;
err = remote_handle64_control(h, DSPRPC_CONTROL_LATENCY, (void*)&data,
sizeof(data));
CRs-Fixed: 4624233
Document the role of FastRPC daemons (adsprpcd, cdsprpcd, etc.) and clarify when they are needed. Explains that FastRPC works in two modes: - Basic mode (without daemons): All RPC calls work, but DSP exceptions are silent and DSP cannot access system services on APPS - Full-featured mode (with daemons): Adds exception logging, remote file I/O, and memory allocation services Closes: #321
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
This is inappropriate to land in the /usr/bin/ namespace, so installing it into /usr/libexec for now. Upstream bug to resolve properly: qualcomm/fastrpc#381 Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
The daemons provided by fastrpc-support do not function unless they have libraries provided by libfastrpc1 available, but do not dynamically link to them. I believe they use dlopen() instead. Specify the dependency explicitly. This should mean that `apt install fastrpc-support` alone should work. Closes: #88 Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
qli rebase 1.0.7
Signed-off-by: GitHub Service Bot <githubservice@qti.qualcomm.com>
Prepare 1.0.7-2 with the addition of a patch from upstream PR #387; fixes lookup of non-machine specific Hexagon DSP files which were missing a / separator. Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
fastrpc-support ships /usr/lib/sysusers.d/fastrpc.conf, but nothing
was creating the fastrpc system group at install time, so the udev
rules in 60-fastrpc.rules could not chgrp the device nodes.
dh_installsysusers generates the required postinst snippet
(correctly guarded on "configure" and honouring $DPKG_ROOT) and adds
the systemd | systemd-standalone-sysusers | systemd-sysusers
dependency via ${misc:Depends}. It only runs by default from compat
14, so enable it explicitly through the installsysusers sequence
add-on; this keeps debhelper-compat (= 13) and works with the
debhelper in trixie, which is needed for trixie-backports. The
add-on is a no-op once we move to compat 14.
Closes: #85
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
fastrpc-support has no maintainer script and does not call adduser
or addgroup. The fastrpc system group is created by the systemd
sysusers file, which pulls in the appropriate implementation via
${misc:Depends}.
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
The udev rules shipped in fastrpc-support call setfacl, so the package should have a Depends on acl which provides it. Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Misc packaging fixes
d/patches: add fix-hexagon-path from PR #387
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Declaring the add-on as a build-dependency is equivalent -- dh
auto-loads sequence add-ons listed in Build-Depends -- but it avoids
a lintian false positive:
E: fastrpc source: missing-build-dependency-for-dh-addon
installsysusers (does not satisfy libdebhelper-perl:any)
[debian/rules]
debhelper in trixie (13.24.2) already provides
dh-sequence-installsysusers, so this keeps working for
trixie-backports.
Verified that dh_installsysusers is still inserted after dh_install
and that lintian is now clean on the source package.
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Merge with Debian 1.0.7-2
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Signed-off-by: Robie Basak <robie.basak@oss.qualcomm.com>
Robie Basak (basak-qcom)
force-pushed
the
qli-trixie-1.0.7
branch
from
September 9, 2026 10:25
c3c511e to
7c2b526
Compare
Contributor
Author
|
Validated: |
Robie Basak (basak-qcom)
merged commit Sep 9, 2026
e6c2fa0
into
qli/debian/trixie
4 of 5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This a straight backport merge with no other changes. I will self-approve after CI passes (and checking carefully).