Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake
@ 2024-10-17  3:40 Shuicheng Lin
  2024-10-17  4:21 ` ✓ CI.Patch_applied: success for drm/xe: Log unreliable MMIO reads during forcewake (rev2) Patchwork
                   ` (28 more replies)
  0 siblings, 29 replies; 34+ messages in thread
From: Shuicheng Lin @ 2024-10-17  3:40 UTC (permalink / raw)
  To: intel-xe
  Cc: Shuicheng Lin, Alex Zuo, Matthew Brost, Michal Wajdeczko,
	Himal Prasad Ghimiray, Matt Roper, Rodrigo Vivi

In some cases, when the driver attempts to read an MMIO register,
the hardware may return 0xFFFFFFFF. The current force wake path
code treats this as a valid response, as it only checks the BIT.
However, 0xFFFFFFFF should be considered an invalid value, indicating
a potential issue. To address this, we should add a log entry to
highlight this condition.

v2 (Matt Brost):
  - set ret value (-EIO) to kick the error to upper layers

Suggested-by: Alex Zuo <alex.zuo@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/xe_force_wake.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c
index a64c14757c84..49ceb16e82e4 100644
--- a/drivers/gpu/drm/xe/xe_force_wake.c
+++ b/drivers/gpu/drm/xe/xe_force_wake.c
@@ -115,10 +115,15 @@ static int __domain_wait(struct xe_gt *gt, struct xe_force_wake_domain *domain,
 			     XE_FORCE_WAKE_ACK_TIMEOUT_MS * USEC_PER_MSEC,
 			     &value, true);
 	if (ret)
-		xe_gt_notice(gt, "Force wake domain %d failed to ack %s (%pe) reg[%#x] = %#x\n",
-			     domain->id, str_wake_sleep(wake), ERR_PTR(ret),
-			     domain->reg_ack.addr, value);
-
+		xe_gt_err(gt, "Force wake domain %d failed to ack %s (%pe) reg[%#x] = %#x\n",
+			  domain->id, str_wake_sleep(wake), ERR_PTR(ret),
+			  domain->reg_ack.addr, value);
+	if (value == ~0) {
+		xe_gt_err(gt,
+			  "Force wake domain %d: %s. MMIO unreliable (forcewake register returns 0xFFFFFFFF)!\n",
+			  domain->id, str_wake_sleep(wake));
+		ret = -EIO;
+	}
 	return ret;
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2024-10-18 16:00 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17  3:40 [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake Shuicheng Lin
2024-10-17  4:21 ` ✓ CI.Patch_applied: success for drm/xe: Log unreliable MMIO reads during forcewake (rev2) Patchwork
2024-10-17  4:21 ` ✓ CI.checkpatch: " Patchwork
2024-10-17  4:22 ` ✓ CI.KUnit: " Patchwork
2024-10-17  4:34 ` ✓ CI.Build: " Patchwork
2024-10-17  4:36 ` ✓ CI.Hooks: " Patchwork
2024-10-17  4:37 ` ✓ CI.checksparse: " Patchwork
2024-10-17  5:01 ` ✓ CI.BAT: " Patchwork
2024-10-17 14:35 ` [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake Ghimiray, Himal Prasad
2024-10-17 14:55 ` ✗ CI.FULL: failure for drm/xe: Log unreliable MMIO reads during forcewake (rev2) Patchwork
2024-10-17 15:30 ` [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake Nilawar, Badal
2024-10-17 16:14   ` Lin, Shuicheng
2024-10-17 16:30 ` Rodrigo Vivi
2024-10-17 16:30 ` [PATCH v3] drm/xe: Handle " Shuicheng Lin
2024-10-17 17:50   ` Ghimiray, Himal Prasad
2024-10-17 22:25     ` Lin, Shuicheng
2024-10-18 15:13       ` Rodrigo Vivi
2024-10-17 17:31 ` ✓ CI.Patch_applied: success for drm/xe: Log unreliable MMIO reads during forcewake (rev3) Patchwork
2024-10-17 17:31 ` ✓ CI.checkpatch: " Patchwork
2024-10-17 17:34 ` ✓ CI.KUnit: " Patchwork
2024-10-17 17:46 ` ✓ CI.Build: " Patchwork
2024-10-17 17:48 ` ✓ CI.Hooks: " Patchwork
2024-10-17 17:50 ` ✓ CI.checksparse: " Patchwork
2024-10-17 18:18 ` ✓ CI.BAT: " Patchwork
2024-10-17 22:15 ` [PATCH v4] drm/xe: Handle unreliable MMIO reads during forcewake Shuicheng Lin
2024-10-17 22:58 ` ✓ CI.Patch_applied: success for drm/xe: Log unreliable MMIO reads during forcewake (rev4) Patchwork
2024-10-17 22:58 ` ✓ CI.checkpatch: " Patchwork
2024-10-17 22:59 ` ✓ CI.KUnit: " Patchwork
2024-10-17 23:11 ` ✓ CI.Build: " Patchwork
2024-10-17 23:13 ` ✓ CI.Hooks: " Patchwork
2024-10-17 23:15 ` ✓ CI.checksparse: " Patchwork
2024-10-17 23:34 ` ✓ CI.BAT: " Patchwork
2024-10-18  9:53 ` ✗ CI.FULL: failure for drm/xe: Log unreliable MMIO reads during forcewake (rev3) Patchwork
2024-10-18 16:00 ` ✗ CI.FULL: failure for drm/xe: Log unreliable MMIO reads during forcewake (rev4) Patchwork

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