Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API
@ 2026-09-08 10:18 Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

This series meant for converitng the logs struct of IO_BUS device hardware
catergories with different components such as GT, HWWOM, REGS, PAT, GT,
LMTT, VRAM.

Patch 1 adds the new component definitions. Patches 2-13 convert individual
subsystems to use xe_log_err/xe_log_err_fatal/xe_log_info with the
appropriate component tags:

  - GGTT: GSM probe and configuration errors
  - HWMON: PCode readback and registration failures
  - MMIO/REGS: BAR mapping, save-restore, whitelist, and force-wake errors
  - MEMIRQ: Page allocation and GuC setup failures
  - PAT: Missing PAT table detection
  - GT: Unknown GMDID version reporting
  - LMTT: HW invalidation failures
  - VRAM: BAR validation and visibility errors

Dnyaneshwar Bhadane (13):
  drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components
  drm/xe/ggtt: Report GGTT errors using structured logging
  drm/xe/hwmon: Report errors using structured xe_log API
  drm/xe/mmio: Report BAR mapping errors using structured xe_log API
  drm/xe/memirq: Report errors using structured xe_log API
  drm/xe/reg_whitelist: Report whitelist overflow using structured
    xe_log API
  drm/xe/reg_sr: Report save-restore errors using structured xe_log API
  drm/xe/pat: Return error from xe_pat_init_early() on unknown platform
  drm/xe/pat: Report missing PAT table using structured xe_log API
  drm/xe/pci: Report unknown GMDID versions using structured xe_log API
  drm/xe/lmtt: Report invalidation errors using structured xe_log API
  drm/xe/vram: Report tile vs device VRAM visibility errors
  drm/xe/vram: Report VRAM errors using structured xe_log API

 drivers/gpu/drm/xe/abi/xe_log_abi.h   |  3 +++
 drivers/gpu/drm/xe/xe_device.c        |  4 +++-
 drivers/gpu/drm/xe/xe_ggtt.c          |  9 ++++++---
 drivers/gpu/drm/xe/xe_hwmon.c         | 10 ++++++----
 drivers/gpu/drm/xe/xe_lmtt.c          | 10 ++++++----
 drivers/gpu/drm/xe/xe_memirq.c        |  7 ++++---
 drivers/gpu/drm/xe/xe_mmio.c          | 12 ++++++++----
 drivers/gpu/drm/xe/xe_pat.c           | 20 +++++++++-----------
 drivers/gpu/drm/xe/xe_pat.h           |  2 +-
 drivers/gpu/drm/xe/xe_pci.c           | 10 ++++++----
 drivers/gpu/drm/xe/xe_reg_sr.c        | 22 +++++++++++-----------
 drivers/gpu/drm/xe/xe_reg_whitelist.c |  7 ++++---
 drivers/gpu/drm/xe/xe_vram.c          | 20 +++++++++++++++-----
 13 files changed, 82 insertions(+), 54 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:23   ` sashiko-bot
  2026-09-08 10:18 ` [PATCH v2 02/13] drm/xe/ggtt: Report GGTT errors using structured logging Dnyaneshwar Bhadane
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Register new DRIVER_HARDWARE log components for hardware I/O subsystems
that currently lack structured error reporting:

  - VRAM (ID 6): Video RAM access and BAR visibility errors
  - PAT (ID 7): Page Attribute Table programming errors
  - HWMON (ID 8): Hardware monitor registration and sensor errors

All three use IO_BUS as their default SIGID since they interact with
hardware through MMIO or PCode register paths.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/abi/xe_log_abi.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/abi/xe_log_abi.h b/drivers/gpu/drm/xe/abi/xe_log_abi.h
index d6105520173e..4a60aa48fab1 100644
--- a/drivers/gpu/drm/xe/abi/xe_log_abi.h
+++ b/drivers/gpu/drm/xe/abi/xe_log_abi.h
@@ -150,6 +150,9 @@ enum xe_log_location_bits {
 	define(DRIVER_HARDWARE, 3, GT, GT_TDR, "Graphics Technology")		\
 	define(DRIVER_HARDWARE, 4, LMTT, IO_BUS, "LMEM Translation Table")	\
 	define(DRIVER_HARDWARE, 5, MEMIRQ, IO_BUS, "Memory Based IRQ")		\
+	define(DRIVER_HARDWARE, 6, VRAM, IO_BUS, "Virtual RAM")			\
+	define(DRIVER_HARDWARE, 7, PAT, IO_BUS, "Page Attribute Table")		\
+	define(DRIVER_HARDWARE, 8, HWMON, IO_BUS, "Hardware Monitoring")	\
 	/* */									\
 	define(DRIVER_FEATURE, 1, PF, SW, "SR-IOV Physical Function")		\
 	define(DRIVER_FEATURE, 2, VF, SW, "SR-IOV Virtual Function")		\
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 02/13] drm/xe/ggtt: Report GGTT errors using structured logging
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 03/13] drm/xe/hwmon: Report errors using structured xe_log API Dnyaneshwar Bhadane
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace xe_tile_err() calls with xe_log_err_fatal() using the GGTT
component tag in GGTT initialization error paths.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_ggtt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 63e8bf193605..773777afc68a 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -23,6 +23,7 @@
 #include "xe_gt.h"
 #include "xe_gt_printk.h"
 #include "xe_gt_types.h"
+#include "xe_log.h"
 #include "xe_map.h"
 #include "xe_mmio.h"
 #include "xe_pat.h"
@@ -403,7 +404,8 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
 		else
 			gsm_size = probe_gsm_size(pdev);
 		if (gsm_size == 0) {
-			xe_tile_err(ggtt->tile, "Hardware reported no preallocated GSM\n");
+			xe_log_err_fatal(ggtt->tile, GGTT, -ENOMEM,
+					 "Hardware reported no preallocated GSM\n");
 			return -ENOMEM;
 		}
 		ggtt_start = wopcm;
@@ -414,8 +416,9 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
 
 		if (ggtt_start < wopcm ||
 		    ggtt_start + ggtt_size > GUC_GGTT_TOP) {
-			xe_tile_err(ggtt->tile, "Invalid GGTT configuration: %#llx-%#llx\n",
-				    ggtt_start, ggtt_start + ggtt_size - 1);
+			xe_log_err_fatal(ggtt->tile, GGTT, -ERANGE,
+					 "Invalid GGTT configuration: %#llx-%#llx\n",
+					 ggtt_start, ggtt_start + ggtt_size - 1);
 			return -ERANGE;
 		}
 	}
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 03/13] drm/xe/hwmon: Report errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 02/13] drm/xe/ggtt: Report GGTT errors using structured logging Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 04/13] drm/xe/mmio: Report BAR mapping " Dnyaneshwar Bhadane
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace drm_err() calls with xe_log_err() using the HWMON component
tag to enable structured error reporting with SIGID for hardware
monitor failures:

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_hwmon.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 5284cab6703d..0f87bd517164 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -15,6 +15,7 @@
 #include "regs/xe_pcode_regs.h"
 #include "xe_device.h"
 #include "xe_hwmon.h"
+#include "xe_log.h"
 #include "xe_mmio.h"
 #include "xe_pcode.h"
 #include "xe_pcode_api.h"
@@ -563,9 +564,9 @@ xe_hwmon_power_max_interval_show(struct device *dev, struct device_attribute *at
 	if (hwmon->xe->info.has_mbx_power_limits) {
 		ret = xe_hwmon_pcode_read_power_limit(hwmon, power_attr, channel, &reg_val);
 		if (ret) {
-			drm_err(&hwmon->xe->drm,
-				"power interval read fail, ch %d, attr %d, val 0x%08x, ret %d\n",
-				channel, power_attr, reg_val, ret);
+			xe_log_err(hwmon->xe, HWMON, ret,
+				   "power interval read fail, ch %d, attr %d, val 0x%08x\n",
+				   channel, power_attr, reg_val);
 			reg_val = 0;
 		}
 	} else {
@@ -1599,7 +1600,8 @@ int xe_hwmon_register(struct xe_device *xe)
 								&hwmon_chip_info,
 								hwmon_groups);
 	if (IS_ERR(hwmon->hwmon_dev)) {
-		drm_err(&xe->drm, "Failed to register xe hwmon (%pe)\n", hwmon->hwmon_dev);
+		xe_log_err(xe, HWMON, PTR_ERR(hwmon->hwmon_dev),
+			   "Failed to register xe hwmon\n");
 		xe->hwmon = NULL;
 		return PTR_ERR(hwmon->hwmon_dev);
 	}
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 04/13] drm/xe/mmio: Report BAR mapping errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (2 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 03/13] drm/xe/hwmon: Report errors using structured xe_log API Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 05/13] drm/xe/memirq: Report " Dnyaneshwar Bhadane
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace xe_err() calls with xe_log_err() and xe_log_err_fatal() using
the REGS component tag for MMIO BAR probe failures

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_mmio.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7fa18dfcb5a2..890146b8836b 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -15,6 +15,7 @@
 #include "regs/xe_bars.h"
 #include "xe_device.h"
 #include "xe_gt_sriov_vf.h"
+#include "xe_log.h"
 #include "xe_printk.h"
 #include "xe_sriov.h"
 #include "xe_tile_printk.h"
@@ -71,8 +72,8 @@ int xe_mmio_probe_tiles(struct xe_device *xe)
 		return 0;
 
 	if (xe->mmio.size < xe->info.tile_count * tile_mmio_size) {
-		xe_err(xe, "GTTMMADR_BAR is too small for %d tiles: %zu\n",
-		       xe->info.tile_count, xe->mmio.size);
+		xe_log_err_fatal(xe, REGS, -EIO, "GTTMMADR_BAR is too small for %d tiles: %zu\n",
+				 xe->info.tile_count, xe->mmio.size);
 		return -EIO;
 	}
 
@@ -105,13 +106,16 @@ int xe_mmio_probe_early(struct xe_device *xe)
 
 	xe->mmio.regs = pcim_iomap(pdev, GTTMMADR_BAR, 0);
 	if (!xe->mmio.regs) {
-		xe_err(xe, "Failed to map GTTMMADR_BAR\n");
+		xe_log_err_fatal(xe, REGS, -EIO,
+				 "Failed to map GTTMMADR_BAR\n");
 		return -EIO;
 	}
 
 	xe->mmio.size = pci_resource_len(pdev, GTTMMADR_BAR);
 	if (xe->mmio.size < SZ_16M) {
-		xe_err(xe, "GTTMMADR_BAR is too small: %zu\n", xe->mmio.size);
+		xe_log_err_fatal(xe, REGS, -EIO,
+				 "GTTMMADR_BAR is too small: %zu\n",
+				 xe->mmio.size);
 		return -EIO;
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 05/13] drm/xe/memirq: Report errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (3 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 04/13] drm/xe/mmio: Report BAR mapping " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:28   ` sashiko-bot
  2026-09-08 10:18 ` [PATCH v2 06/13] drm/xe/reg_whitelist: Report whitelist overflow " Dnyaneshwar Bhadane
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace memirq_err() calls with xe_log_err() using the MEMIRQ
component tag for memory-based IRQ failures

v2:
- No need to log ERR_PTR(err) explicitly (Mallesh)
- Using tile instead of xe for more local log location(sashiko bot)

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_memirq.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c
index 9dfe965cb46e..32b9f87a10ec 100644
--- a/drivers/gpu/drm/xe/xe_memirq.c
+++ b/drivers/gpu/drm/xe/xe_memirq.c
@@ -15,6 +15,7 @@
 #include "xe_gt.h"
 #include "xe_guc.h"
 #include "xe_hw_engine.h"
+#include "xe_log.h"
 #include "xe_memirq.h"
 #include "xe_tile_printk.h"
 
@@ -232,7 +233,7 @@ static int memirq_alloc_pages(struct xe_memirq *memirq)
 	return 0;
 
 out:
-	memirq_err(memirq, "Failed to allocate memirq page (%pe)\n", ERR_PTR(err));
+	xe_log_err(tile, MEMIRQ, err, "Failed to allocate memirq page\n");
 	return err;
 }
 
@@ -370,8 +371,8 @@ int xe_memirq_init_guc(struct xe_memirq *memirq, struct xe_guc *guc)
 	return 0;
 
 failed:
-	memirq_err(memirq, "Failed to setup report pages in %s (%pe)\n",
-		   guc_name(guc), ERR_PTR(err));
+	xe_log_err(memirq_to_tile(memirq), MEMIRQ, err,
+		   "Failed to setup report pages in %s\n", guc_name(guc));
 	return err;
 }
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 06/13] drm/xe/reg_whitelist: Report whitelist overflow using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (4 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 05/13] drm/xe/memirq: Report " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 07/13] drm/xe/reg_sr: Report save-restore errors " Dnyaneshwar Bhadane
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace xe_gt_err() with xe_log_err() using the REGS component tag
when the maximum register whitelist slots are exhausted.

v2:
- Use -EOVERFLOW on max limit reached (Mallesh)

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_reg_whitelist.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c
index cab1b578ca0e..b15004fc5761 100644
--- a/drivers/gpu/drm/xe/xe_reg_whitelist.c
+++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c
@@ -14,6 +14,7 @@
 #include "xe_gt.h"
 #include "xe_gt_types.h"
 #include "xe_gt_printk.h"
+#include "xe_log.h"
 #include "xe_platform_types.h"
 #include "xe_reg_sr.h"
 #include "xe_rtp.h"
@@ -186,9 +187,9 @@ static int whitelist_apply_to_hwe(struct xe_hw_engine *hwe, struct xe_reg_sr *in
 		};
 
 		if (slot == RING_MAX_NONPRIV_SLOTS) {
-			xe_gt_err(hwe->gt,
-				  "hwe %s: maximum register whitelist slots (%d) reached, refusing to add more\n",
-				  hwe->name, RING_MAX_NONPRIV_SLOTS);
+			xe_log_err(hwe->gt, REGS, -EOVERFLOW,
+				   "hwe %s: maximum register whitelist slots (%d) reached, refusing to add more\n",
+				   hwe->name, RING_MAX_NONPRIV_SLOTS);
 			break;
 		}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 07/13] drm/xe/reg_sr: Report save-restore errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (5 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 06/13] drm/xe/reg_whitelist: Report whitelist overflow " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 08/13] drm/xe/pat: Return error from xe_pat_init_early() on unknown platform Dnyaneshwar Bhadane
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace xe_gt_notice() and xe_gt_err() calls with xe_log_info() and
xe_log_err() using the REGS component tag for register save-restore
operations:

  - MCR register mismatch corrections
  - Failed to add register to save-restore list
  - Force-wake timeout during SR apply
v2:
- Drop error type from logging explicitly(Mallesh).
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_reg_sr.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c
index e328f5072557..ee17e8c10a46 100644
--- a/drivers/gpu/drm/xe/xe_reg_sr.c
+++ b/drivers/gpu/drm/xe/xe_reg_sr.c
@@ -21,6 +21,7 @@
 #include "xe_gt_printk.h"
 #include "xe_gt_types.h"
 #include "xe_hw_engine_types.h"
+#include "xe_log.h"
 #include "xe_lrc.h"
 #include "xe_mmio.h"
 #include "xe_rtp_types.h"
@@ -87,15 +88,15 @@ static struct xe_reg sanitize_mcr(struct xe_reg_sr *sr,
 
 	if (is_mcr && !reg.mcr) {
 		reg.mcr = 1;
-		xe_gt_notice(gt, "xe_reg_sr_entry using non-MCR register for address 0x%x, forcing MCR\n",
-			     reg.addr);
+		xe_log_info(gt, REGS, "xe_reg_sr_entry using non-MCR register for address 0x%x, forcing MCR\n",
+			    reg.addr);
 		reg_sr_inc_error(sr);
 	}
 
 	if (!is_mcr && reg.mcr) {
 		reg.mcr = 0;
-		xe_gt_notice(gt, "xe_reg_sr_entry using MCR register for address 0x%x, forcing non-MCR\n",
-			     reg.addr);
+		xe_log_info(gt, REGS, "xe_reg_sr_entry using MCR register for address 0x%x, forcing non-MCR\n",
+			    reg.addr);
 		reg_sr_inc_error(sr);
 	}
 
@@ -143,12 +144,11 @@ int xe_reg_sr_add(struct xe_reg_sr *sr,
 fail_free:
 	kfree(pentry);
 fail:
-	xe_gt_err(gt,
-		  "discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s): ret=%d\n",
-		  idx, e->clr_bits, e->set_bits,
-		  str_yes_no(e->reg.masked),
-		  str_yes_no(e->reg.mcr),
-		  ret);
+	xe_log_err(gt, REGS, ret,
+		   "discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s)\n",
+		   idx, e->clr_bits, e->set_bits,
+		   str_yes_no(e->reg.masked),
+		   str_yes_no(e->reg.mcr));
 	reg_sr_inc_error(sr);
 
 	return ret;
@@ -219,7 +219,7 @@ void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt)
 
 	CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FORCEWAKE_ALL);
 	if (!xe_force_wake_ref_has_domain(fw_ref.domains, XE_FORCEWAKE_ALL)) {
-		xe_gt_err(gt, "Failed to apply, err=-ETIMEDOUT\n");
+		xe_log_err(gt, REGS, -ETIMEDOUT, "Failed to apply\n");
 		return;
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 08/13] drm/xe/pat: Return error from xe_pat_init_early() on unknown platform
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (6 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 07/13] drm/xe/reg_sr: Report save-restore errors " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API Dnyaneshwar Bhadane
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

xe_pat_init_early() currently only logs an error when the platform's
graphics version doesn't match any known PAT table, but continues
probing with an uninitialized pat.ops. This can lead to a NULL
pointer dereference later when pat.ops is used.

Change xe_pat_init_early() to return an int and propagate -ENODATA
to xe_device_probe() so the driver fails to load cleanly instead of
continuing in a broken state.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c |  4 +++-
 drivers/gpu/drm/xe/xe_pat.c    | 14 +++++---------
 drivers/gpu/drm/xe/xe_pat.h    |  2 +-
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 8583b2e9ecf4..b7f78d45dee1 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -960,7 +960,9 @@ int xe_device_probe(struct xe_device *xe)
 	int err;
 	u8 id;
 
-	xe_pat_init_early(xe);
+	err = xe_pat_init_early(xe);
+	if (err)
+		return err;
 
 	err = xe_sriov_init(xe);
 	if (err)
diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
index a5fe1beec652..8af92e3c4c17 100644
--- a/drivers/gpu/drm/xe/xe_pat.c
+++ b/drivers/gpu/drm/xe/xe_pat.c
@@ -590,7 +590,7 @@ static const struct xe_pat_ops xe3p_xpc_pat_ops = {
 	.entry_dump = xe3p_xpc_pat_entry_dump,
 };
 
-void xe_pat_init_early(struct xe_device *xe)
+int xe_pat_init_early(struct xe_device *xe)
 {
 	xe->pat.idx[XE_CACHE_WB_COMPRESSION] = XE_PAT_INVALID_IDX;
 	xe->pat.idx[XE_CACHE_NONE_COMPRESSION] = XE_PAT_INVALID_IDX;
@@ -678,22 +678,18 @@ void xe_pat_init_early(struct xe_device *xe)
 		xe->pat.idx[XE_CACHE_WT] = 2;
 		xe->pat.idx[XE_CACHE_WB] = 0;
 	} else {
-		/*
-		 * Going forward we expect to need new PAT settings for most
-		 * new platforms; failure to provide a new table can easily
-		 * lead to subtle, hard-to-debug problems.  If none of the
-		 * conditions above match the platform we're running on we'll
-		 * raise an error rather than trying to silently inherit the
-		 * most recent platform's behavior.
-		 */
 		drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%02d!\n",
 			GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
+		return -ENODATA;
+
 	}
 
+	xe_assert(xe, xe->pat.ops);
 	xe_assert(xe, xe->pat.ops->dump);
 	xe_assert(xe, xe->pat.ops->program_graphics);
 	xe_assert(xe, MEDIA_VER(xe) < 13 || xe->pat.ops->program_media);
 	xe_assert(xe, GRAPHICS_VER(xe) < 20 || xe->pat.ops->entry_dump);
+	return 0;
 }
 
 void xe_pat_init(struct xe_gt *gt)
diff --git a/drivers/gpu/drm/xe/xe_pat.h b/drivers/gpu/drm/xe/xe_pat.h
index 7060f66e1d63..66e335fb3b0c 100644
--- a/drivers/gpu/drm/xe/xe_pat.h
+++ b/drivers/gpu/drm/xe/xe_pat.h
@@ -43,7 +43,7 @@ struct xe_pat_table_entry {
  * xe_pat_init_early - SW initialization, setting up data based on device
  * @xe: xe device
  */
-void xe_pat_init_early(struct xe_device *xe);
+int xe_pat_init_early(struct xe_device *xe);
 
 /**
  * xe_pat_init - Program HW PAT table
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (7 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 08/13] drm/xe/pat: Return error from xe_pat_init_early() on unknown platform Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:26   ` sashiko-bot
  2026-09-08 10:18 ` [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions " Dnyaneshwar Bhadane
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace drm_err() with xe_log_err() using the PAT component tag
when a platform has no matching PAT table entry.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_pat.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
index 8af92e3c4c17..f012eaba838a 100644
--- a/drivers/gpu/drm/xe/xe_pat.c
+++ b/drivers/gpu/drm/xe/xe_pat.c
@@ -16,6 +16,7 @@
 #include "xe_force_wake.h"
 #include "xe_gt.h"
 #include "xe_gt_mcr.h"
+#include "xe_log.h"
 #include "xe_mmio.h"
 #include "xe_sriov.h"
 #include "xe_wa.h"
@@ -678,8 +679,9 @@ int xe_pat_init_early(struct xe_device *xe)
 		xe->pat.idx[XE_CACHE_WT] = 2;
 		xe->pat.idx[XE_CACHE_WB] = 0;
 	} else {
-		drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%02d!\n",
-			GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
+		xe_log_err(xe, PAT, -EINVAL,
+			   "Missing PAT table for platform with graphics version %d.%02d!\n",
+			   GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
 		return -ENODATA;
 
 	}
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (8 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:28   ` sashiko-bot
  2026-09-08 10:18 ` [PATCH v2 11/13] drm/xe/lmtt: Report invalidation errors " Dnyaneshwar Bhadane
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace drm_err() with xe_log_err() using the GT component tag when
hardware reports unrecognized graphics or media IP versions during
GMDID handling.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_pci.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 1e04e8ef2611..249001ef77b1 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -718,8 +718,9 @@ static int handle_gmdid(struct xe_device *xe,
 
 	*graphics_ip = find_graphics_ip(ver);
 	if (!*graphics_ip) {
-		drm_err(&xe->drm, "Hardware reports unknown graphics version %u.%02u\n",
-			ver / 100, ver % 100);
+		xe_log_err(xe, REGS, -EINVAL,
+			   "Hardware reports unknown graphics version %u.%02u\n",
+			   ver / 100, ver % 100);
 	}
 
 	ret = read_gmdid(xe, GMDID_MEDIA, &ver, media_revid);
@@ -732,8 +733,9 @@ static int handle_gmdid(struct xe_device *xe,
 
 	*media_ip = find_media_ip(ver);
 	if (!*media_ip) {
-		drm_err(&xe->drm, "Hardware reports unknown media version %u.%02u\n",
-			ver / 100, ver % 100);
+		xe_log_err(xe, REGS, -EINVAL,
+			   "Hardware reports unknown media version %u.%02u\n",
+			   ver / 100, ver % 100);
 	}
 
 	return 0;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 11/13] drm/xe/lmtt: Report invalidation errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (9 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 12/13] drm/xe/vram: Report tile vs device VRAM visibility errors Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 13/13] drm/xe/vram: Report VRAM errors using structured xe_log API Dnyaneshwar Bhadane
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace xe_tile_sriov_err() with xe_log_err() using the LMTT component
tag for LMTT and MERT invalidation failures, preserving the SR-IOV
prefix in the log message.

v2:
- Drop logging error type in log (Mallesh)

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_lmtt.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_lmtt.c b/drivers/gpu/drm/xe/xe_lmtt.c
index 0c726eda9390..fe77b3ec0680 100644
--- a/drivers/gpu/drm/xe/xe_lmtt.c
+++ b/drivers/gpu/drm/xe/xe_lmtt.c
@@ -14,6 +14,7 @@
 #include "xe_bo.h"
 #include "xe_tlb_inval.h"
 #include "xe_lmtt.h"
+#include "xe_log.h"
 #include "xe_map.h"
 #include "xe_mert.h"
 #include "xe_mmio.h"
@@ -302,14 +303,15 @@ void xe_lmtt_invalidate_hw(struct xe_lmtt *lmtt)
 
 	err = lmtt_invalidate_hw(lmtt);
 	if (err)
-		xe_tile_sriov_err(tile, "LMTT invalidation failed (%pe)",
-				  ERR_PTR(err));
+		xe_log_err(tile, LMTT, err, "%s invalidation failed.",
+			   xe_sriov_printk_prefix(xe));
 
 	if (xe_device_has_mert(xe) && xe_tile_is_root(tile)) {
 		err = xe_mert_invalidate_lmtt(xe);
 		if (err)
-			xe_tile_sriov_err(tile, "MERT LMTT invalidation failed (%pe)",
-					  ERR_PTR(err));
+			xe_log_err(tile, LMTT, err,
+				   "%s MERT invalidation failed.\n",
+				   xe_sriov_printk_prefix(xe));
 	}
 }
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 12/13] drm/xe/vram: Report tile vs device VRAM visibility errors
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (10 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 11/13] drm/xe/lmtt: Report invalidation errors " Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  2026-09-08 10:18 ` [PATCH v2 13/13] drm/xe/vram: Report VRAM errors using structured xe_log API Dnyaneshwar Bhadane
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Derive the owning tile of a struct xe_vram_region inside
vram_region_init() from vram->id, so the "no CPU visible VRAM"
error can distinguish a per-tile region from the device-wide
region without changing the function's signature.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_vram.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index dcedd8cfd731..fa06c7ae56b1 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -244,6 +244,7 @@ static int vram_region_init(struct xe_device *xe, struct xe_vram_region *vram,
 			    struct xe_vram_region *lmem_bar, u64 offset, u64 usable_size,
 			    u64 region_size, resource_size_t remain_io_size)
 {
+	struct xe_tile *tile = vram == xe->mem.vram ? NULL : &xe->tiles[vram->id];
 	/* Check if VRAM region is already initialized */
 	if (vram->mapping)
 		return 0;
@@ -253,7 +254,8 @@ static int vram_region_init(struct xe_device *xe, struct xe_vram_region *vram,
 	vram->io_size = min_t(u64, usable_size, remain_io_size);
 
 	if (!vram->io_size) {
-		drm_err(&xe->drm, "Tile without any CPU visible VRAM. Aborting.\n");
+		drm_err(&xe->drm, "%s without any CPU visible VRAM. Aborting.\n",
+			tile ? "Tile" : "Device");
 		return -ENODEV;
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 13/13] drm/xe/vram: Report VRAM errors using structured xe_log API
  2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
                   ` (11 preceding siblings ...)
  2026-09-08 10:18 ` [PATCH v2 12/13] drm/xe/vram: Report tile vs device VRAM visibility errors Dnyaneshwar Bhadane
@ 2026-09-08 10:18 ` Dnyaneshwar Bhadane
  12 siblings, 0 replies; 18+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-09-08 10:18 UTC (permalink / raw)
  To: intel-xe; +Cc: mallesh.koujalagi, Dnyaneshwar Bhadane

Replace drm_err()/drm_info() with xe_log_err_fatal()/xe_log_info()
using the VRAM component tag. The "no CPU visible VRAM" error uses
tile or device as the log location depending on the caller context.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_vram.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index fa06c7ae56b1..6c8558042ad4 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -17,6 +17,7 @@
 #include "xe_device.h"
 #include "xe_force_wake.h"
 #include "xe_gt_mcr.h"
+#include "xe_log.h"
 #include "xe_map.h"
 #include "xe_migrate.h"
 #include "xe_mmio.h"
@@ -46,7 +47,8 @@ static int determine_lmem_bar_size(struct xe_device *xe, struct xe_vram_region *
 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
 
 	if (!resource_is_valid(pdev, LMEM_BAR)) {
-		drm_err(&xe->drm, "pci resource is not valid\n");
+		xe_log_err_fatal(xe, VRAM, -ENXIO,
+				 "pci resource is not valid\n");
 		return -ENXIO;
 	}
 
@@ -254,8 +256,13 @@ static int vram_region_init(struct xe_device *xe, struct xe_vram_region *vram,
 	vram->io_size = min_t(u64, usable_size, remain_io_size);
 
 	if (!vram->io_size) {
-		drm_err(&xe->drm, "%s without any CPU visible VRAM. Aborting.\n",
-			tile ? "Tile" : "Device");
+		if (tile) {
+			xe_log_err_fatal(tile, VRAM, -ENODEV,
+					 "Tile without any CPU visible VRAM. Aborting.\n");
+		} else {
+			xe_log_err_fatal(xe, VRAM, -ENODEV,
+					 "Device without any CPU visible VRAM. Aborting.\n");
+		}
 		return -ENODEV;
 	}
 
@@ -320,7 +327,7 @@ int xe_vram_probe(struct xe_device *xe)
 	err = determine_lmem_bar_size(xe, &lmem_bar);
 	if (err)
 		return err;
-	drm_info(&xe->drm, "VISIBLE VRAM: %pa, %pa\n", &lmem_bar.io_start, &lmem_bar.io_size);
+	xe_log_info(xe, VRAM, "VISIBLE VRAM: %pa, %pa\n", &lmem_bar.io_start, &lmem_bar.io_size);
 
 	remain_io_size = lmem_bar.io_size;
 
@@ -342,8 +349,9 @@ int xe_vram_probe(struct xe_device *xe)
 			return err;
 
 		if (total_size > lmem_bar.io_size) {
-			drm_info(&xe->drm, "VRAM: %pa is larger than resource %pa\n",
-				 &total_size, &lmem_bar.io_size);
+			xe_log_info(xe, VRAM,
+				    "Total size %pa is larger than resource %pa\n",
+				    &total_size, &lmem_bar.io_size);
 		}
 
 		remain_io_size -= min_t(u64, tile->mem.vram->actual_physical_size, remain_io_size);
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components
  2026-09-08 10:18 ` [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
@ 2026-09-08 10:23   ` sashiko-bot
  0 siblings, 0 replies; 18+ messages in thread
From: sashiko-bot @ 2026-09-08 10:23 UTC (permalink / raw)
  To: Dnyaneshwar Bhadane; +Cc: intel-xe

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The VRAM log component is incorrectly named "Virtual RAM" instead of "Video RAM" in the macro definition.
--

commit 7e2394ed2d7e6aa2312536fe5e3e318f1713fb04
Author: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>

drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components

This commit registers new DRIVER_HARDWARE log components for VRAM, PAT, and
HWMON subsystems to enable structured error reporting. It assigns them IDs
and string names for use in the ABI.

> diff --git a/drivers/gpu/drm/xe/abi/xe_log_abi.h b/drivers/gpu/drm/xe/abi/xe_log_abi.h
> index d6105520173e7..4a60aa48fab19 100644
> --- a/drivers/gpu/drm/xe/abi/xe_log_abi.h
> +++ b/drivers/gpu/drm/xe/abi/xe_log_abi.h
[ ... ]
> @@ -150,6 +150,9 @@ enum xe_log_location_bits {
>  	define(DRIVER_HARDWARE, 3, GT, GT_TDR, "Graphics Technology")		\
>  	define(DRIVER_HARDWARE, 4, LMTT, IO_BUS, "LMEM Translation Table")	\
>  	define(DRIVER_HARDWARE, 5, MEMIRQ, IO_BUS, "Memory Based IRQ")		\
> +	define(DRIVER_HARDWARE, 6, VRAM, IO_BUS, "Virtual RAM")			\

[Severity: Low]
Is the string name for this component correct? VRAM typically stands for
"Video RAM" rather than "Virtual RAM" in the context of hardware subsystems.
The commit message describes it as "Video RAM access", but this ABI definition
exposes it as "Virtual RAM" in structured error logs.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908101849.1219614-1-dnyaneshwar.bhadane@intel.com?part=1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API
  2026-09-08 10:18 ` [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API Dnyaneshwar Bhadane
@ 2026-09-08 10:26   ` sashiko-bot
  0 siblings, 0 replies; 18+ messages in thread
From: sashiko-bot @ 2026-09-08 10:26 UTC (permalink / raw)
  To: Dnyaneshwar Bhadane; +Cc: intel-xe

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Inconsistent error code between structured log and function return value
--

commit 3f9326bca2893681a5346e8107dec4ac43a4112b
Author: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>

drm/xe/pat: Report missing PAT table using structured xe_log API

This commit replaces the standard drm_err() logging with the structured
xe_log_err() API using the PAT component tag for platforms that do not
have a matching PAT table entry.

> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 8af92e3c4c17c..f012eaba838a2 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c

[ ... ]

> @@ -678,8 +679,9 @@ int xe_pat_init_early(struct xe_device *xe)
>  		xe->pat.idx[XE_CACHE_WT] = 2;
>  		xe->pat.idx[XE_CACHE_WB] = 0;
>  	} else {
> -		drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%02d!\n",
> -			GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
> +		xe_log_err(xe, PAT, -EINVAL,
> +			   "Missing PAT table for platform with graphics version %d.%02d!\n",
> +			   GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
>  		return -ENODATA;

[Severity: Low]
Does this code intentionally log -EINVAL but return -ENODATA? Reaching the
end of the platform matching chain in xe_pat_init_early() logs one error
code (-EINVAL) to the structured telemetry API but returns a different one
(-ENODATA) to its caller. Would it be better to align these error codes to
prevent confusion during debugging or automated log analysis?

>  
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908101849.1219614-1-dnyaneshwar.bhadane@intel.com?part=9

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 05/13] drm/xe/memirq: Report errors using structured xe_log API
  2026-09-08 10:18 ` [PATCH v2 05/13] drm/xe/memirq: Report " Dnyaneshwar Bhadane
@ 2026-09-08 10:28   ` sashiko-bot
  0 siblings, 0 replies; 18+ messages in thread
From: sashiko-bot @ 2026-09-08 10:28 UTC (permalink / raw)
  To: Dnyaneshwar Bhadane; +Cc: intel-xe

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `memirq_err` macro definition was left behind as dead code after all of its usages were replaced.
--

commit 391745f6a990d1f601917ad8a478f9eb84f04e45
Author: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>

drm/xe/memirq: Report errors using structured xe_log API

Replace memirq_err() calls with xe_log_err() using the MEMIRQ
component tag for memory-based IRQ failures

> diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c
> index 9dfe965cb46ec..32b9f87a10ecf 100644
> --- a/drivers/gpu/drm/xe/xe_memirq.c
> +++ b/drivers/gpu/drm/xe/xe_memirq.c
> @@ -232,7 +233,7 @@ static int memirq_alloc_pages(struct xe_memirq *memirq)
>  	return 0;
>  
>  out:
> -	memirq_err(memirq, "Failed to allocate memirq page (%pe)\n", ERR_PTR(err));
> +	xe_log_err(tile, MEMIRQ, err, "Failed to allocate memirq page\n");
>  	return err;
>  }

[Severity: Low]
Should the memirq_err() macro definition also be removed?

Since this patch replaced all of its usages, the macro definition at the top
of drivers/gpu/drm/xe/xe_memirq.c is left behind as unused dead code:

#define memirq_err(m, _fmt, ...)	memirq_printk(m, err, _fmt, ##__VA_ARGS__)

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908101849.1219614-1-dnyaneshwar.bhadane@intel.com?part=5

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions using structured xe_log API
  2026-09-08 10:18 ` [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions " Dnyaneshwar Bhadane
@ 2026-09-08 10:28   ` sashiko-bot
  0 siblings, 0 replies; 18+ messages in thread
From: sashiko-bot @ 2026-09-08 10:28 UTC (permalink / raw)
  To: Dnyaneshwar Bhadane; +Cc: intel-xe

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch uses the 'REGS' component tag instead of the 'GT' tag claimed in the commit message.
--

commit 5fd6d40222829ad569de8cdf73c334a89531ce68
Author: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>

drm/xe/pci: Report unknown GMDID versions using structured xe_log API

This commit updates the GMDID handling code to replace drm_err() with the
structured xe_log_err() function when hardware reports unrecognized graphics
or media IP versions.

> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -718,8 +718,9 @@ static int handle_gmdid(struct xe_device *xe,
>  
>  	*graphics_ip = find_graphics_ip(ver);
>  	if (!*graphics_ip) {
> -		drm_err(&xe->drm, "Hardware reports unknown graphics version %u.%02u\n",
> -			ver / 100, ver % 100);
> +		xe_log_err(xe, REGS, -EINVAL,
> +			   "Hardware reports unknown graphics version %u.%02u\n",
> +			   ver / 100, ver % 100);

[Severity: Medium]
The commit message states this replaces drm_err() with xe_log_err() "using
the GT component tag". However, handle_gmdid() uses the REGS tag here.
Should this use the GT tag as described in the commit message, or is REGS
the intended tag for this log?

>  	}
>  
>  	ret = read_gmdid(xe, GMDID_MEDIA, &ver, media_revid);
> @@ -732,8 +733,9 @@ static int handle_gmdid(struct xe_device *xe,
>  
>  	*media_ip = find_media_ip(ver);
>  	if (!*media_ip) {
> -		drm_err(&xe->drm, "Hardware reports unknown media version %u.%02u\n",
> -			ver / 100, ver % 100);
> +		xe_log_err(xe, REGS, -EINVAL,
> +			   "Hardware reports unknown media version %u.%02u\n",
> +			   ver / 100, ver % 100);

[Severity: Medium]
Similarly, this uses the REGS tag for the unknown media version error. Does
this also need to be updated to use the GT tag to match the commit
description?

>  	}
>  
>  	return 0;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908101849.1219614-1-dnyaneshwar.bhadane@intel.com?part=10

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-09-08 10:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 10:18 [PATCH v2 00/13] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 01/13] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
2026-09-08 10:23   ` sashiko-bot
2026-09-08 10:18 ` [PATCH v2 02/13] drm/xe/ggtt: Report GGTT errors using structured logging Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 03/13] drm/xe/hwmon: Report errors using structured xe_log API Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 04/13] drm/xe/mmio: Report BAR mapping " Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 05/13] drm/xe/memirq: Report " Dnyaneshwar Bhadane
2026-09-08 10:28   ` sashiko-bot
2026-09-08 10:18 ` [PATCH v2 06/13] drm/xe/reg_whitelist: Report whitelist overflow " Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 07/13] drm/xe/reg_sr: Report save-restore errors " Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 08/13] drm/xe/pat: Return error from xe_pat_init_early() on unknown platform Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 09/13] drm/xe/pat: Report missing PAT table using structured xe_log API Dnyaneshwar Bhadane
2026-09-08 10:26   ` sashiko-bot
2026-09-08 10:18 ` [PATCH v2 10/13] drm/xe/pci: Report unknown GMDID versions " Dnyaneshwar Bhadane
2026-09-08 10:28   ` sashiko-bot
2026-09-08 10:18 ` [PATCH v2 11/13] drm/xe/lmtt: Report invalidation errors " Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 12/13] drm/xe/vram: Report tile vs device VRAM visibility errors Dnyaneshwar Bhadane
2026-09-08 10:18 ` [PATCH v2 13/13] drm/xe/vram: Report VRAM errors using structured xe_log API Dnyaneshwar Bhadane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox