From: Matthew Brost <matthew.brost@intel.com>
To: Zhanjun Dong <zhanjun.dong@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <daniele.ceraolospurio@intel.com>
Subject: Re: [PATCH v1] drm/xe/guc: Change outstanding assertion to error
Date: Thu, 16 Oct 2025 22:45:19 -0700 [thread overview]
Message-ID: <aPHX728qFlSgfvsf@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251017004654.1490644-1-zhanjun.dong@intel.com>
On Thu, Oct 16, 2025 at 08:46:54PM -0400, Zhanjun Dong wrote:
> GuC CT layer will check GuC to host outstanding counter when changing
> state, trigger assertion if the counter is not 0. However, the failed
> assertion is expected on fault injection test, change it to error to
Is this expected, though? I know I added this assert to only allow
transitions of the GuC with G2H outstanding if moving to
XE_GUC_CT_STATE_STOPPED.
For example, this is a valid state transition when starting a GT reset
or migrating a VF.
It is not a valid state transition say on a normal driver load which
this assert would catch.
I see this error occurs during a device probe failure. In my opinion, we
should ensure a proper state transition from running → stopped →
disabled to preserve the intent of this assert.
> make it works with CI system.
>
I'm also concerned about converting the assert—which includes a stack
trace—into just a debug message. If this issue occurs again, we might
not have enough information to properly debug it.
Matt
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5466
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5530
> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_ct.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 18f6327bf552..85416db1563c 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -436,8 +436,9 @@ static void guc_ct_change_state(struct xe_guc_ct *ct,
> mutex_lock(&ct->lock); /* Serialise dequeue_one_g2h() */
> spin_lock_irq(&ct->fast_lock); /* Serialise CT fast-path */
>
> - xe_gt_assert(ct_to_gt(ct), ct->g2h_outstanding == 0 ||
> - state == XE_GUC_CT_STATE_STOPPED);
> + if (ct->g2h_outstanding != 0 && state != XE_GUC_CT_STATE_STOPPED)
> + xe_gt_err(ct_to_gt(ct), "Unexpected outsanding counter:%d on switch state:%d\n",
> + ct->g2h_outstanding, state);
>
> if (ct->g2h_outstanding)
> xe_pm_runtime_put(ct_to_xe(ct));
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-10-17 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 0:46 [PATCH v1] drm/xe/guc: Change outstanding assertion to error Zhanjun Dong
2025-10-17 0:53 ` ✓ CI.KUnit: success for " Patchwork
2025-10-17 1:38 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-17 5:45 ` Matthew Brost [this message]
2025-10-17 22:27 ` ✗ 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=aPHX728qFlSgfvsf@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=zhanjun.dong@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