Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/guc: Check response data of CLIENT_SOFT_RESET action
@ 2025-02-19 19:27 Michal Wajdeczko
  2025-02-19 20:33 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Michal Wajdeczko @ 2025-02-19 19:27 UTC (permalink / raw)
  To: intel-xe; +Cc: Michal Wajdeczko, Dan Carpenter, Matthew Brost

Treat unexpected non-zero response data from GuC as -EPROTO error.
This will also prevent passing positive value to ERR_PTR().

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/intel-xe/5fd5a4b9-88ee-47f1-ac3e-32a20960c5b0@stanley.mountain/
Fixes: 12f95f9900c0 ("drm/xe/guc: Prefer GT oriented logs for GuC messages")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 1619c0a52db9..bb03db361512 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -1238,6 +1238,8 @@ int xe_guc_suspend(struct xe_guc *guc)
 
 	ret = xe_guc_mmio_send(guc, action, ARRAY_SIZE(action));
 	if (ret) {
+		if (ret > 0)
+			ret = -EPROTO;
 		xe_gt_err(gt, "GuC suspend failed: %pe\n", ERR_PTR(ret));
 		return ret;
 	}
-- 
2.47.1


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

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

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 19:27 [PATCH] drm/xe/guc: Check response data of CLIENT_SOFT_RESET action Michal Wajdeczko
2025-02-19 20:33 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-19 20:33 ` ✓ CI.checkpatch: " Patchwork
2025-02-19 20:35 ` ✓ CI.KUnit: " Patchwork
2025-02-19 20:51 ` ✓ CI.Build: " Patchwork
2025-02-19 20:53 ` ✓ CI.Hooks: " Patchwork
2025-02-19 20:55 ` ✓ CI.checksparse: " Patchwork
2025-02-19 21:02 ` [PATCH] " Matthew Brost
2025-02-19 21:15 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-02-19 22:10 ` [PATCH] " Cavitt, Jonathan
2025-02-20 18:42   ` Michal Wajdeczko
2025-02-20 20:09     ` Cavitt, Jonathan
2025-02-20 20:49       ` Michal Wajdeczko
2025-02-20 22:03         ` Cavitt, Jonathan
2025-02-20 18:20 ` ✗ Xe.CI.Full: failure for " Patchwork

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