FROMLIST: media: qcom: iris: add firmware debug logging support - #1750
Merged
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>
qcomlnxci
requested review from
a team,
dikshita-agarwal and
vgarodia
and removed request for
a team
August 26, 2026 02:38
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
CRs-fixed: 4657239