FROMLIST: media: qcom: iris: add firmware debug logging support - #92
Merged
Tingwei Zhang (quic-tingweiz) merged 1 commit intoSep 2, 2026
Conversation
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>
Tingwei Zhang (quic-tingweiz)
approved these changes
Aug 27, 2026
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. |
Tingwei Zhang (quic-tingweiz)
merged commit Sep 2, 2026
815b7d6
into
qualcomm-linux:resolute-qcom-devel
13 of 17 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.
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