Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Log unreliable MMIO reads during forcewake
@ 2024-10-12  3:34 Shuicheng Lin
  2024-10-12  4:22 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Shuicheng Lin @ 2024-10-12  3:34 UTC (permalink / raw)
  To: intel-xe, matthew.d.roper, rodrigo.vivi; +Cc: Shuicheng Lin, Alex Zuo

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.

Suggested-by: Alex Zuo <alex.zuo@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_force_wake.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c
index a64c14757c84..46f36d05293a 100644
--- a/drivers/gpu/drm/xe/xe_force_wake.c
+++ b/drivers/gpu/drm/xe/xe_force_wake.c
@@ -114,6 +114,10 @@ static int __domain_wait(struct xe_gt *gt, struct xe_force_wake_domain *domain,
 	ret = xe_mmio_wait32(&gt->mmio, domain->reg_ack, domain->val, wake ? domain->val : 0,
 			     XE_FORCE_WAKE_ACK_TIMEOUT_MS * USEC_PER_MSEC,
 			     &value, true);
+	if (value == ~0)
+		xe_gt_notice(gt,
+			     "Force wake domain %d: %s. MMIO unreliable (forcewake register returns 0xFFFFFFFF)!\n",
+			     domain->id, str_wake_sleep(wake));
 	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),
-- 
2.25.1


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

end of thread, other threads:[~2024-10-14 21:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12  3:34 [PATCH] drm/xe: Log unreliable MMIO reads during forcewake Shuicheng Lin
2024-10-12  4:22 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-12  4:22 ` ✓ CI.checkpatch: " Patchwork
2024-10-12  4:23 ` ✓ CI.KUnit: " Patchwork
2024-10-12  4:35 ` ✓ CI.Build: " Patchwork
2024-10-12  4:37 ` ✓ CI.Hooks: " Patchwork
2024-10-12  4:39 ` ✓ CI.checksparse: " Patchwork
2024-10-12  4:58 ` ✓ CI.BAT: " Patchwork
2024-10-12  5:09 ` [PATCH] " Matthew Brost
2024-10-13 12:46   ` Michal Wajdeczko
2024-10-14 21:09     ` Lin, Shuicheng
2024-10-14 21:08   ` Lin, Shuicheng
2024-10-12 10:20 ` ✗ 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