Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe/pcode: Convert unsupported commands to debug level
@ 2025-11-07  5:56 Raag Jadav
  2025-11-07  6:05 ` ✓ CI.KUnit: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Raag Jadav @ 2025-11-07  5:56 UTC (permalink / raw)
  To: lucas.demarchi, rodrigo.vivi
  Cc: intel-xe, riana.tauro, matthew.brost, michal.wajdeczko,
	badal.nilawar, Raag Jadav

If the device is running older pcode firmware, it is possible that newer
mailbox commands are not supported by it. The respective functionality
isn't useful in that case but neither is error logging, since it doesn't
particularly signify anything wrong with pcode firmware or device as a
whole. This is useful in cases where we want to make a decision on driver
functionality based on pcode return codes and a bit simpler design choice
compared to other solutions like checking pcode firmware version, which
comes with additional complexity of binding every single command to a
specific version and deems pcode commands useless in case driver fails to
obtain it for reasons unrelated to pcode.

v2: Split unsupported command cases

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---

Following up on earlier attempt[1] now that we really have things blowing
up. Another alternative would be to further split boottime and runtime cases
but that again is its own design discussion.

[1] https://lore.kernel.org/intel-xe/Z8n1Uy1hqAkYxeFE@black.fi.intel.com/

 drivers/gpu/drm/xe/xe_pcode.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index 6a7ddb9005f9..d9a0bd7ea36c 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -47,8 +47,13 @@ static int pcode_mailbox_status(struct xe_tile *tile)
 
 	err = xe_mmio_read32(&tile->mmio, PCODE_MAILBOX) & PCODE_ERROR_MASK;
 	if (err) {
-		drm_err(&tile_to_xe(tile)->drm, "PCODE Mailbox failed: %d %s", err,
-			err_decode[err].str ?: "Unknown");
+		if (err == -ENXIO)
+			drm_dbg(&tile_to_xe(tile)->drm, "PCODE Mailbox failed: %d %s",
+				err, err_decode[err].str ?: "Unknown");
+		else
+			drm_err(&tile_to_xe(tile)->drm, "PCODE Mailbox failed: %d %s",
+				err, err_decode[err].str ?: "Unknown");
+
 		return err_decode[err].errno ?: -EPROTO;
 	}
 
-- 
2.43.0


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

end of thread, other threads:[~2025-11-17 22:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07  5:56 [PATCH v2] drm/xe/pcode: Convert unsupported commands to debug level Raag Jadav
2025-11-07  6:05 ` ✓ CI.KUnit: success for " Patchwork
2025-11-07  6:42 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-07 11:43 ` [PATCH v2] " Lucas De Marchi
2025-11-07 11:56   ` Lucas De Marchi
2025-11-07 12:03 ` Lucas De Marchi
2025-11-07 13:16   ` Ville Syrjälä
2025-11-12 14:45     ` Raag Jadav
2025-11-14  5:25       ` Raag Jadav
2025-11-17 14:26       ` Gupta, Anshuman
2025-11-17 22:03         ` Rodrigo Vivi
2025-11-08 22:14 ` ✓ Xe.CI.Full: success for " Patchwork

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