summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_log.h
AgeCommit message (Collapse)Author
2026-08-14drm/xe/log: Index all SIGID printk messagesMichal Wajdeczko
When CONFIG_PRINTK_INDEX is enabled, it is expected that all device level printk messages are indexed for audit. While usually this is done automatically behind the scenes when code is using regular dev_printk macros, since we are generating different dmesg messages inside xe_log_emit() based on the severity, component and location, we only get those entries in /sys/kernel/debug/printk/index/xe: <3> drivers/gpu/drm/xe/xe_log.c:142 log_dmesg_vprintk "%s %s: [drm] *ERROR* %pV" <6> drivers/gpu/drm/xe/xe_log.c:140 log_dmesg_vprintk "%s %s: [drm] %pV" Explicitly generate printk index using dev_printk_index_emit() with some generic prefix that includes the SIGID tag. Suggested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-12-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for errno-onlyMichal Wajdeczko
For the software based SIGID errors, we will usually want to pass only the errno value as the data to be logged in the dmesg line or the CPER record. Add simple wrappers for that. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> #v3 Link: https://patch.msgid.link/20260814171801.13347-11-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for component & severityMichal Wajdeczko
There are only few CPER severity levels defined, add some helpers to avoid forcing developers to write full CPER severity enum name in every macro call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-10-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for componentsMichal Wajdeczko
Our component list already defines relation between the component name, identified by the TAG, and its numerical identifier and the assigned SIGID. We can also already prepare location identifier based on the pointer type used to emit the log entry. Add helper that will prepare SIGID, COMPONENT and LOCATION parameters for xe_log_emit() using provided components TAG and the pointer. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-9-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for location & severityMichal Wajdeczko
There are only few CPER severity levels defined, add more helpers to avoid forcing developers to write full CPER severity name in every function call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-8-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for locationMichal Wajdeczko
We can determine the location of the SIGID error source based on the type of the xe pointer being currently available. Add helper macros that will accept any of xe_device, xe_tile or xe_gt pointers instead of plain pci_dev to generate valid XE_LOG_LOCATION identifier and then call low-level xe_log_emit(pdev) function. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-7-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for severityMichal Wajdeczko
There are only few CPER severity levels defined, add simple helper for each of them, to avoid forcing developers to write full severity name in every function call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-6-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add structured SIGID error logging infrastructureMallesh Koujalagi
Today the driver reports faults with ad-hoc drm_err()/xe_gt_err() strings that have no stable shape. That is readable for a human, but it gives fleet tooling nothing durable to match on: the wording changes between releases, lines can be rate-limited or dropped under an error storm, and there is no consistent way to ask "which recognised fault just happened?". Introduce a signature identifier (SIGID): a small, stable integer that names one recognised Xe fault site and serves as the primary handle for triage. A SIGID maps, through published end-user documentation, to a description and a recommended action; the driver only has to emit the right SIGID next to the usual human-readable text. Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Assisted-by: Copilot:Opus-4.8 Co-developed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Stuart Summers <stuart.summers@intel.com> cc: Badal Nilawar <badal.nilawar@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Link: https://patch.msgid.link/20260814171801.13347-3-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>