From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Shuicheng Lin <shuicheng.lin@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Alex Zuo <alex.zuo@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Anshuman Gupta <Anshuman.Gupta@intel.com>
Subject: Re: [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake
Date: Thu, 17 Oct 2024 21:00:45 +0530 [thread overview]
Message-ID: <8875582e-5e7a-4c10-9c69-23c7b892f745@intel.com> (raw)
In-Reply-To: <20241017034026.1525693-1-shuicheng.lin@intel.com>
On 17-10-2024 09:10, Shuicheng Lin wrote:
> 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));
Register value return 0xFFFFFFFF means PCIe accesses are unreliable,
timed out and device is in bad state. As commented in rev1, accesses are
recovering after some time, wondering how?
Acked-by: Badal Nilawar <badal.nilawar@intel.com>
Regards,
Badal
> + ret = -EIO;
> + }
> return ret;
> }
>
next prev parent reply other threads:[~2024-10-17 15:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Nilawar, Badal [this message]
2024-10-17 16:14 ` [PATCH v2] drm/xe: Log unreliable MMIO reads during forcewake 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
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=8875582e-5e7a-4c10-9c69-23c7b892f745@intel.com \
--to=badal.nilawar@intel.com \
--cc=Anshuman.Gupta@intel.com \
--cc=alex.zuo@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=shuicheng.lin@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