Skip to content

FROMLIST: media: qcom: iris: add firmware debug logging support - #92

Merged
Tingwei Zhang (quic-tingweiz) merged 1 commit into
qualcomm-linux:resolute-qcom-develfrom
WangaoW:iris_fw_log
Sep 2, 2026
Merged

FROMLIST: media: qcom: iris: add firmware debug logging support#92
Tingwei Zhang (quic-tingweiz) merged 1 commit into
qualcomm-linux:resolute-qcom-develfrom
WangaoW:iris_fw_log

Conversation

@WangaoW

@WangaoW WangaoW commented Aug 26, 2026

Copy link
Copy Markdown

Iris does not provide runtime control for firmware debug logging, which makes firmware-side failures harder to diagnose without rebuilding or reloading the driver.

Add a debugfs fw_level file under the Iris debugfs directory so the firmware debug log mask can be configured at runtime. Keep the default mask limited to firmware error and fatal messages to avoid enabling verbose firmware logging by default.

Store the mask per Iris core, and normalize values written through debugfs so userspace reads back the same mask that is sent to firmware. Use READ_ONCE() and WRITE_ONCE() for lockless debugfs access and HFI packet construction.

Program the firmware debug configuration during core initialization and before opening a new session. This lets a fw_level value written before session start take effect for that session without requiring a driver reload.

Add HFI Gen1 and Gen2 support for sending the firmware debug configuration to firmware, and flush firmware debug messages from the debug queue. Firmware error and fatal messages are emitted through dev_err_ratelimited(), while other firmware debug messages use dev_dbg().

Treat failures to configure firmware debug logging as non-fatal, since they should not prevent video sessions from running.

Link: https://lore.kernel.org/linux-media/20260815-media-qcom-iris-fw-log-v1-1-c8a70eb08849@oss.qualcomm.com/
Tested-by: Wangao Wang wangao.wang@oss.qualcomm.com

Iris does not provide runtime control for firmware debug
logging, which makes firmware-side failures harder to diagnose
without rebuilding or reloading the driver.

Add a debugfs fw_level file under the Iris debugfs directory so
the firmware debug log mask can be configured at runtime. Keep
the default mask limited to firmware error and fatal messages to
avoid enabling verbose firmware logging by default.

Store the mask per Iris core, and normalize values written
through debugfs so userspace reads back the same mask that is
sent to firmware. Use READ_ONCE() and WRITE_ONCE() for lockless
debugfs access and HFI packet construction.

Program the firmware debug configuration during core
initialization and before opening a new session. This lets a
fw_level value written before session start take effect for that
session without requiring a driver reload.

Add HFI Gen1 and Gen2 support for sending the firmware debug
configuration to firmware, and flush firmware debug messages
from the debug queue. Firmware error and fatal messages are
emitted through dev_err_ratelimited(), while other firmware debug
messages use dev_dbg().

Treat failures to configure firmware debug logging as non-fatal,
since they should not prevent video sessions from running.

Link: https://lore.kernel.org/linux-media/20260815-media-qcom-iris-fw-log-v1-1-c8a70eb08849@oss.qualcomm.com/
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com>
@bjordiscollaku

Copy link
Copy Markdown
Contributor

This PR was raised before the new canonical tag rebase introduced build error due to fit image generation, which was solved immediately by my PR fix(ci): temporarily disable Canonical FIT image generation by bjordiscollaku · Pull Request #91 · q….

In other words the premerge build is outdated from 5 days ago, prior to the fix. We need to re-trigger premerge build on this PR. One way of doing that is by closing and re-opening PR to refresh state and re-fire pre-merge.

@quic-tingweiz
Tingwei Zhang (quic-tingweiz) merged commit 815b7d6 into qualcomm-linux:resolute-qcom-devel Sep 2, 2026
13 of 17 checks passed
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