From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>,
<intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>,
<matthew.brost@intel.com>
Cc: <anshuman.gupta@intel.com>, <badal.nilawar@intel.com>,
<vinay.belgaumkar@intel.com>, <riana.tauro@intel.com>,
<karthik.poosa@intel.com>, <sk.anirban@intel.com>,
<raag.jadav@intel.com>, <aravind.iddamsetty@linux.intel.com>,
<umesh.nerlige.ramappa@intel.com>,
<dnyaneshwar.bhadane@intel.com>, <anoop.c.vijay@intel.com>
Subject: Re: [PATCH v5 5/7] drm/xe/sysctrl: Improve firmware response error logging
Date: Thu, 27 Aug 2026 16:40:46 +0200 [thread overview]
Message-ID: <b71b1992-22f0-480c-ac42-e5b5223d3ada@intel.com> (raw)
In-Reply-To: <1b5b9d19-75bf-4c7c-86da-d7f8434f4695@intel.com>
On 8/27/2026 2:50 PM, Mallesh, Koujalagi wrote:
>
> On 27-08-2026 04:27 pm, Michal Wajdeczko wrote:
>>
>> On 8/25/2026 1:05 PM, Mallesh Koujalagi wrote:
>>> Use xe_log_err() helper and include additional details when a
>>> response header mismatch occurs.
>>>
>>> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>> ---
>>> v5:
>>> - Use %#x after REG_FIELD_GET change. (Michal)
>>> ---
>>> drivers/gpu/drm/xe/xe_sysctrl_mailbox.c | 18 +++++++++++-------
>>> 1 file changed, 11 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c b/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
>>> index f8b518dcafa2..5032d766b314 100644
>>> --- a/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
>>> +++ b/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
>>> @@ -24,16 +24,16 @@ struct xe_sysctrl_mailbox_msg_hdr {
>>> } __packed;
>>> #define XE_SYSCTRL_HDR_GROUP_ID(hdr) \
>>> - FIELD_GET(SYSCTRL_HDR_GROUP_ID_MASK, le32_to_cpu((hdr)->data))
>>> + REG_FIELD_GET(SYSCTRL_HDR_GROUP_ID_MASK, le32_to_cpu((hdr)->data))
>>> #define XE_SYSCTRL_HDR_COMMAND(hdr) \
>>> - FIELD_GET(SYSCTRL_HDR_COMMAND_MASK, le32_to_cpu((hdr)->data))
>>> + REG_FIELD_GET(SYSCTRL_HDR_COMMAND_MASK, le32_to_cpu((hdr)->data))
>>> #define XE_SYSCTRL_HDR_IS_RESPONSE(hdr) \
>>> - FIELD_GET(SYSCTRL_HDR_IS_RESPONSE, le32_to_cpu((hdr)->data))
>>> + REG_FIELD_GET(SYSCTRL_HDR_IS_RESPONSE, le32_to_cpu((hdr)->data))
>>> #define XE_SYSCTRL_HDR_RESULT(hdr) \
>>> - FIELD_GET(SYSCTRL_HDR_RESULT_MASK, le32_to_cpu((hdr)->data))
>>> + REG_FIELD_GET(SYSCTRL_HDR_RESULT_MASK, le32_to_cpu((hdr)->data))
>> this should be mentioned in this commit message
>>
>> nit: or maybe above changes should be done in its own patch?
> Sure! will make different patch for that.
>>
>>> static int sysctrl_wait_bit_clear(struct xe_sysctrl *sc, u32 bit_mask,
>>> unsigned int timeout_ms)
>>> @@ -237,13 +237,17 @@ static int sysctrl_receive_frames(struct xe_sysctrl *sc,
>>> if (!XE_SYSCTRL_HDR_IS_RESPONSE(hdr) ||
>>> XE_SYSCTRL_HDR_GROUP_ID(hdr) != XE_SYSCTRL_HDR_GROUP_ID(req) ||
>>> XE_SYSCTRL_HDR_COMMAND(hdr) != XE_SYSCTRL_HDR_COMMAND(req)) {
>>> - xe_err(xe, "sysctrl: Response header mismatch\n");
>>> + xe_log_err(xe, SYSCTRL, -EPROTO,
>>> + "Response header mismatch: got group=%#x cmd=%#x is_resp=%u, expected group=%#x cmd=%#x\n",
>>> + XE_SYSCTRL_HDR_GROUP_ID(hdr), XE_SYSCTRL_HDR_COMMAND(hdr),
>>> + XE_SYSCTRL_HDR_IS_RESPONSE(hdr),
>>> + XE_SYSCTRL_HDR_GROUP_ID(req), XE_SYSCTRL_HDR_COMMAND(req));
>> nit: as admin may not know what is "group" "cmd" "resp"
>> maybe we can just log raw hdr value?
>>
>> "Response header mismatch: %#x\n", hdr
>
> "Response header mismatch: got=%#x expected=%#x\n", le32_to_cpu(hdr->data), le32_to_cpu(req->data)); please let me know, is this fine?
looks fine, but it could be even simpler:
"Response header mismatch: %#x != %#x\n"
>
> Thanks,
>
> -/Mallesh
>
>>> return -EPROTO;
>>> }
>>> if (XE_SYSCTRL_HDR_RESULT(hdr) != 0) {
>>> - xe_err(xe, "sysctrl: Firmware error: 0x%02lx\n",
>>> - XE_SYSCTRL_HDR_RESULT(hdr));
>>> + xe_log_err(xe, SYSCTRL, -EIO, "Firmware error: %#04x\n",
>>> + XE_SYSCTRL_HDR_RESULT(hdr));
>>> return -EIO;
>>> }
>>>
next prev parent reply other threads:[~2026-08-27 14:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 11:05 [PATCH v5 0/7] drm/xe/sysctrl: Clean up error handling in Mallesh Koujalagi
2026-08-25 11:05 ` [PATCH v5 1/7] drm/xe/sysctrl: Return error codes from sysctrl_wait_bit_clear() Mallesh Koujalagi
2026-08-25 11:24 ` sashiko-bot
2026-08-25 11:05 ` [PATCH v5 2/7] drm/xe/sysctrl: Return error codes from sysctrl_wait_bit_set() Mallesh Koujalagi
2026-08-25 11:24 ` sashiko-bot
2026-08-25 11:05 ` [PATCH v5 3/7] drm/xe/sysctrl: Make sysctrl_write_frame() void Mallesh Koujalagi
2026-08-25 11:05 ` [PATCH v5 4/7] drm/xe/sysctrl: Use xe_assert() for payload size validation Mallesh Koujalagi
2026-08-25 11:05 ` [PATCH v5 5/7] drm/xe/sysctrl: Improve firmware response error logging Mallesh Koujalagi
2026-08-25 11:22 ` sashiko-bot
2026-08-27 10:57 ` Michal Wajdeczko
2026-08-27 12:50 ` Mallesh, Koujalagi
2026-08-27 14:40 ` Michal Wajdeczko [this message]
2026-08-25 11:05 ` [PATCH v5 6/7] drm/xe/sysctrl: Log group and command ID on mailbox failure Mallesh Koujalagi
2026-08-25 11:21 ` sashiko-bot
2026-08-27 11:01 ` Michal Wajdeczko
2026-08-25 11:05 ` [PATCH v5 7/7] drm/xe/sysctrl: Report 'System Controller event' error using SIGID Mallesh Koujalagi
2026-08-25 11:18 ` sashiko-bot
2026-08-27 11:06 ` Michal Wajdeczko
2026-08-25 11:13 ` ✓ CI.KUnit: success for drm/xe/sysctrl: Clean up error handling in (rev2) Patchwork
2026-08-25 11:50 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-25 16:29 ` ✗ Xe.CI.FULL: failure " 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=b71b1992-22f0-480c-ac42-e5b5223d3ada@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=dnyaneshwar.bhadane@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--cc=mallesh.koujalagi@intel.com \
--cc=matthew.brost@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=sk.anirban@intel.com \
--cc=umesh.nerlige.ramappa@intel.com \
--cc=vinay.belgaumkar@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