From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org, matthew.d.roper@intel.com,
rodrigo.vivi@intel.com
Cc: Shuicheng Lin <shuicheng.lin@intel.com>, Alex Zuo <alex.zuo@intel.com>
Subject: [PATCH] drm/xe: Log unreliable MMIO reads during forcewake
Date: Sat, 12 Oct 2024 03:34:45 +0000 [thread overview]
Message-ID: <20241012033445.1090373-1-shuicheng.lin@intel.com> (raw)
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(>->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
next reply other threads:[~2024-10-12 4:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 3:34 Shuicheng Lin [this message]
2024-10-12 4:22 ` ✓ CI.Patch_applied: success for drm/xe: Log unreliable MMIO reads during forcewake 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241012033445.1090373-1-shuicheng.lin@intel.com \
--to=shuicheng.lin@intel.com \
--cc=alex.zuo@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox