Repository navigation
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 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. Program the firmware debug configuration during core initialization, runtime resume, and before opening a new session. This allows a fw_level value written before session start to take effect without requiring a driver reload, and preserves the setting after firmware is reinitialized. Add HFI Gen1 and Gen2 support for sending the firmware debug configuration, and flush firmware debug messages from the debug queue. Emit firmware error and fatal messages with dev_err_ratelimited(), and use dev_dbg() for other firmware debug messages. Bound firmware log printing by the packet size so messages do not need to be NUL terminated by firmware. 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-arm-msm/20260911-media-qcom-iris-fw-log-v2-1-6c46288f3ffb@oss.qualcomm.com/ Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com> Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com> Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Verbose firmware logging can produce a large number of debug queue packets. The Iris interrupt thread used to drain the message queue once and then drain the debug queue. With heavy firmware logging, response packets that arrive while debug packets are being drained can remain pending until a later interrupt. Increase the HFI response timeout and runtime PM autosuspend delay when firmware logging is enabled beyond the default error and fatal levels. Restore the default values when the firmware log level is reduced again. Link: https://lore.kernel.org/linux-arm-msm/20260911-media-qcom-iris-fw-log-v2-2-6c46288f3ffb@oss.qualcomm.com/ Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com> Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Test Matrix
|
LAVA Failed Case Triage SummaryPR: #1416 Job 269807 | SoC hamoa-evkLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269807 Failed test cases in LAVA job 269807 (SoC: hamoa-evk).
Job 269808 | SoC qcs8300-rideLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269808 Failed test cases in LAVA job 269808 (SoC: qcs8300-ride).
Job 269809 | SoC purwa-evkLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269809 Failed test cases in LAVA job 269809 (SoC: purwa-evk).
Job 269810 | SoC qcs6490-rb3gen2LAVA job: https://lava-oss.qualcomm.com/scheduler/job/269810 Failed test cases in LAVA job 269810 (SoC: qcs6490-rb3gen2).
Job 269811 | SoC qcs9100-rideLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269811 Failed test cases in LAVA job 269811 (SoC: qcs9100-ride).
Job 269812 | SoC shikra-iqs-evkLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269812 Failed test cases in LAVA job 269812 (SoC: shikra-iqs-evk).
Job 269813 | SoC qcs615-rideLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269813 Failed test cases in LAVA job 269813 (SoC: qcs615-ride).
Job 269814 | SoC lemans-evkLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269814 Failed test cases in LAVA job 269814 (SoC: lemans-evk).
Job 269815 | SoC monaco-evkLAVA job: https://lava-oss.qualcomm.com/scheduler/job/269815 Failed test cases in LAVA job 269815 (SoC: monaco-evk).
|
|
Mainline PR is open : qualcomm-linux/kernel-topics#2057 |
The driver currently has no way to configure firmware debug
logging at runtime. This makes firmware-side issues harder to
debug, because changing the firmware debug mask requires a
rebuild or reload.
The patch adds a debugfs fw_level file under the Iris debugfs
directory. The value is stored per Iris core and is normalized
on write, so userspace reads back the same mask that is
programmed to firmware.
The firmware debug configuration is sent during core
initialization and before opening a new session. This allows a
fw_level value written before a session starts to take effect for
that session.
HFI Gen1 and Gen2 paths are added for programming the debug
configuration and reading firmware debug messages from the debug
queue. Firmware error and fatal messages are printed with
dev_err_ratelimited(), while other firmware messages use
dev_dbg().
The default mask enables only firmware error and fatal messages
to avoid enabling verbose firmware logging by default.
Failure to configure firmware debug logging is treated as non-fatal
and does not block normal video operation.
CRs-fixed: 4657239