Skip to content

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

Merged
vgarodia merged 1 commit into
qualcomm-linux:tech/mm/videofrom
WangaoW:iris_fw_log
Aug 27, 2026
Merged

FROMLIST: media: qcom: iris: add firmware debug logging support#1750
vgarodia merged 1 commit into
qualcomm-linux:tech/mm/videofrom
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

CRs-fixed: 4657239

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
qcomlnxci requested review from a team, dikshita-agarwal and vgarodia and removed request for a team August 26, 2026 02:38
@vgarodia
vgarodia merged commit 00e60cd into qualcomm-linux:tech/mm/video Aug 27, 2026
6 of 8 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.

2 participants