Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Varun Gupta <varun.gupta@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/xe/guc: Skip CLEANUP message when GuC is stopped
Date: Tue, 18 Aug 2026 18:09:17 -0700	[thread overview]
Message-ID: <aoUCPYIDeBVhLg5l@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260818040733.135964-1-varun.gupta@intel.com>

On Tue, Aug 18, 2026 at 09:37:33AM +0530, Varun Gupta wrote:
> Attempting to enqueue a CLEANUP message while the GuC is stopped

I think we going in the opposit direction - always send a cleanup
message:

https://patchwork.freedesktop.org/series/171989/

> (during a device reset or suspend) triggers a missing outer runtime
> PM protection warning in xe_pm_runtime_get_noresume().
> 

Hmm, do you have stack trace? You shouldn't be possible to get to
CLEANUP code without a PM reference.

Matt

> Since the GuC cannot service Command Transport (CT) requests while
> stopped, skip the message and route directly to local teardown.
> 
> Fixes: d930c19fdff3 ("drm/xe: Build PM into GuC CT layer")
> Cc: stable@vger.kernel.org
> Signed-off-by: Varun Gupta <varun.gupta@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_submit.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 9036f89dff7d..24f35b0179e1 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -2180,12 +2180,14 @@ static bool guc_exec_queue_try_add_msg(struct xe_exec_queue *q,
>  #define STATIC_MSG_CGP_SYNC	3
>  static void guc_exec_queue_destroy(struct xe_exec_queue *q)
>  {
> +	struct xe_guc *guc = exec_queue_to_guc(q);
>  	struct xe_sched_msg *msg = q->guc->static_msgs + STATIC_MSG_CLEANUP;
>  
> -	if (!(q->flags & EXEC_QUEUE_FLAG_PERMANENT) && !exec_queue_wedged(q))
> +	if (!(q->flags & EXEC_QUEUE_FLAG_PERMANENT) && !exec_queue_wedged(q) &&
> +	    !xe_guc_read_stopped(guc))
>  		guc_exec_queue_add_msg(q, msg, CLEANUP);
>  	else
> -		__guc_exec_queue_destroy(exec_queue_to_guc(q), q);
> +		__guc_exec_queue_destroy(guc, q);
>  }
>  
>  static int guc_exec_queue_set_priority(struct xe_exec_queue *q,
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2026-08-19  1:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  4:07 [PATCH] drm/xe/guc: Skip CLEANUP message when GuC is stopped Varun Gupta
2026-08-18  4:14 ` ✓ CI.KUnit: success for " Patchwork
2026-08-18  4:26 ` [PATCH] " sashiko-bot
2026-08-18  5:05 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-08-18  6:40 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-08-19  1:09 ` Matthew Brost [this message]
2026-08-19  1:17   ` [PATCH] " Matthew Brost
2026-08-19  5:53     ` Gupta, Varun

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=aoUCPYIDeBVhLg5l@gsse-cloud1.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=varun.gupta@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