From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
Shuicheng Lin <shuicheng.lin@intel.com>
Cc: intel-xe@lists.freedesktop.org, matthew.d.roper@intel.com,
rodrigo.vivi@intel.com, Alex Zuo <alex.zuo@intel.com>
Subject: Re: [PATCH] drm/xe: Log unreliable MMIO reads during forcewake
Date: Sun, 13 Oct 2024 14:46:31 +0200 [thread overview]
Message-ID: <a4dd5112-1bbe-41e5-aee7-52addfc7d9c1@intel.com> (raw)
In-Reply-To: <ZwoEbQAQolLNLbeq@DUT025-TGLU.fm.intel.com>
On 12.10.2024 07:09, Matthew Brost wrote:
> On Sat, Oct 12, 2024 at 03:34:45AM +0000, 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.
>>
>> 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));
>
> Set the ret value (-EIO) to kick the error to upper layers?
note that in upcoming series [1] there will be no error code returned
[1] https://patchwork.freedesktop.org/series/137982/#rev9
>
>> if (ret)
>
> Then...
>
> if (ret)
> ...
> else if (value == ~0)
> ...
> ret = -EIO;
>
> Matt
>
>> 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 prev parent reply other threads:[~2024-10-13 12:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=a4dd5112-1bbe-41e5-aee7-52addfc7d9c1@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=alex.zuo@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@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