From: "Tauro, Riana" <riana.tauro@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>, <karthik.poosa@intel.com>,
<sk.anirban@intel.com>, <raag.jadav@intel.com>,
<michal.wajdeczko@intel.com>,
<aravind.iddamsetty@linux.intel.com>,
<umesh.nerlige.ramappa@intel.com>,
<dnyaneshwar.bhadane@intel.com>, <anoop.c.vijay@intel.com>
Subject: Re: [PATCH v6 1/9] drm/xe/sysctrl: Return error codes from sysctrl_wait_bit_clear()
Date: Fri, 4 Sep 2026 11:31:21 +0530 [thread overview]
Message-ID: <fd49ce9f-42cc-4b17-94ca-c3b434a1493d@intel.com> (raw)
In-Reply-To: <20260831104456.1770605-12-mallesh.koujalagi@intel.com>
Hi Mallesh
On 31-08-2026 16:14, Mallesh Koujalagi wrote:
> Make sysctrl_wait_bit_clear() return an error code rather than a bool
> and update callers to use xe_log_err() with the propagated error code.
>
> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Can you please respond to all comments in previous revs before sending
new revisions
Re: [PATCH v4 1/7] drm/xe/sysctrl: Return error codes from
sysctrl_wait_bit_clear() - Tauro, Riana
<https://lore.kernel.org/intel-xe/292aaec1-662d-466a-83a6-dc820dace637@intel.com/>Thanks
Riana
> ---
> v5:
> - Fix align issue. (Michal)
> ---
> drivers/gpu/drm/xe/xe_sysctrl_mailbox.c | 28 ++++++++++++-------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c b/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
> index 72baf1aa4b3a..c36cac8c6288 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
> @@ -11,6 +11,7 @@
>
> #include "regs/xe_sysctrl_regs.h"
> #include "xe_device.h"
> +#include "xe_log.h"
> #include "xe_mmio.h"
> #include "xe_pm.h"
> #include "xe_printk.h"
> @@ -34,15 +35,11 @@ struct xe_sysctrl_mailbox_msg_hdr {
> #define XE_SYSCTRL_HDR_RESULT(hdr) \
> FIELD_GET(SYSCTRL_HDR_RESULT_MASK, le32_to_cpu((hdr)->data))
>
> -static bool sysctrl_wait_bit_clear(struct xe_sysctrl *sc, u32 bit_mask,
> - unsigned int timeout_ms)
> +static int sysctrl_wait_bit_clear(struct xe_sysctrl *sc, u32 bit_mask,
> + unsigned int timeout_ms)
> {
> - int ret;
> -
> - ret = xe_mmio_wait32_not(sc->mmio, SYSCTRL_MB_CTRL, bit_mask, bit_mask,
> - timeout_ms * 1000, NULL, false);
> -
> - return ret == 0;
> + return xe_mmio_wait32_not(sc->mmio, SYSCTRL_MB_CTRL, bit_mask, bit_mask,
> + timeout_ms * 1000, NULL, false);
> }
>
> static bool sysctrl_wait_bit_set(struct xe_sysctrl *sc, u32 bit_mask,
> @@ -146,12 +143,14 @@ static int sysctrl_send_frames(struct xe_sysctrl *sc,
> u32 ctrl_reg, total_frames, frame;
> size_t bytes_sent, frame_size;
> bool phase;
> + int ret;
>
> total_frames = DIV_ROUND_UP(cmd_size, XE_SYSCTRL_MB_FRAME_SIZE);
>
> - if (!sysctrl_wait_bit_clear(sc, SYSCTRL_MB_CTRL_RUN_BUSY, timeout_ms)) {
> - xe_err(xe, "sysctrl: Mailbox busy\n");
> - return -EBUSY;
> + ret = sysctrl_wait_bit_clear(sc, SYSCTRL_MB_CTRL_RUN_BUSY, timeout_ms);
> + if (ret) {
> + xe_log_err(xe, SYSCTRL, ret, "Mailbox busy\n");
> + return ret;
> }
>
> ctrl_reg = xe_mmio_read32(sc->mmio, SYSCTRL_MB_CTRL);
> @@ -174,9 +173,10 @@ static int sysctrl_send_frames(struct xe_sysctrl *sc,
>
> xe_mmio_write32(sc->mmio, SYSCTRL_MB_CTRL, ctrl_reg);
>
> - if (!sysctrl_wait_bit_clear(sc, SYSCTRL_MB_CTRL_RUN_BUSY, timeout_ms)) {
> - xe_err(xe, "sysctrl: Frame %u acknowledgment timeout\n", frame);
> - return -ETIMEDOUT;
> + ret = sysctrl_wait_bit_clear(sc, SYSCTRL_MB_CTRL_RUN_BUSY, timeout_ms);
> + if (ret) {
> + xe_log_err(xe, SYSCTRL, ret, "Frame %u acknowledgment timeout\n", frame);
> + return ret;
> }
>
> bytes_sent += frame_size;
next prev parent reply other threads:[~2026-09-04 6:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 10:44 [PATCH v6 0/9] drm/xe/sysctrl: Clean up error handling in Mallesh Koujalagi
2026-08-31 10:44 ` [PATCH v6 1/9] drm/xe/sysctrl: Return error codes from sysctrl_wait_bit_clear() Mallesh Koujalagi
2026-08-31 10:55 ` sashiko-bot
2026-09-04 6:01 ` Tauro, Riana [this message]
2026-08-31 10:44 ` [PATCH v6 2/9] drm/xe/sysctrl: Return error codes from sysctrl_wait_bit_set() Mallesh Koujalagi
2026-08-31 10:59 ` sashiko-bot
2026-08-31 10:45 ` [PATCH v6 3/9] drm/xe/sysctrl: Make sysctrl_write_frame() void Mallesh Koujalagi
2026-08-31 10:45 ` [PATCH v6 4/9] drm/xe/sysctrl: Make sysctrl_read_frame() void Mallesh Koujalagi
2026-09-02 16:16 ` Michal Wajdeczko
2026-09-03 4:45 ` Mallesh, Koujalagi
2026-08-31 10:45 ` [PATCH v6 5/9] drm/xe/sysctrl: Use xe_assert() for payload size validation Mallesh Koujalagi
2026-08-31 10:45 ` [PATCH v6 6/9] drm/xe/sysctrl: Replace FIELD_GET() with REG_FIELD_GET() Mallesh Koujalagi
2026-08-31 11:07 ` sashiko-bot
2026-08-31 10:45 ` [PATCH v6 7/9] drm/xe/sysctrl: Improve firmware response error logging Mallesh Koujalagi
2026-08-31 11:00 ` sashiko-bot
2026-09-02 16:22 ` Michal Wajdeczko
2026-09-03 4:59 ` Mallesh, Koujalagi
2026-08-31 10:45 ` [PATCH v6 8/9] drm/xe/sysctrl: Log group and command ID on mailbox failure Mallesh Koujalagi
2026-08-31 11:00 ` sashiko-bot
2026-08-31 10:45 ` [PATCH v6 9/9] drm/xe/sysctrl: Report 'System Controller event' error using SIGID Mallesh Koujalagi
2026-08-31 11:00 ` sashiko-bot
2026-08-31 14:37 ` ✓ CI.KUnit: success for drm/xe/sysctrl: Clean up error handling in (rev3) Patchwork
2026-08-31 15:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-31 17:52 ` ✗ 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=fd49ce9f-42cc-4b17-94ca-c3b434a1493d@intel.com \
--to=riana.tauro@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=michal.wajdeczko@intel.com \
--cc=raag.jadav@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;
as well as URLs for NNTP newsgroup(s).