Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled
Date: Fri, 5 Jan 2024 20:59:36 +0100	[thread overview]
Message-ID: <c2af7f83-d615-48db-8d7e-c660d0db71ec@intel.com> (raw)
In-Reply-To: <20240102214320.1255783-1-matthew.brost@intel.com>



On 02.01.2024 22:43, Matthew Brost wrote:
> Protect entire IRQ handler by CT being enabled rather than just G2H
> handler.
> 
> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_ct.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.h b/drivers/gpu/drm/xe/xe_guc_ct.h
> index f15f8a4857e0..05302db02e08 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.h
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.h
> @@ -24,10 +24,11 @@ void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p, bool atomic);
>  
>  static inline void xe_guc_ct_irq_handler(struct xe_guc_ct *ct)
>  {
> -	wake_up_all(&ct->wq);
> -	if (ct->enabled)
> +	if (ct->enabled) {

nit: to simplify the code I would rather exit early if (!ct->enabled)

> +		wake_up_all(&ct->wq);

btw, shouldn't we wake up wq _after_ we process a g2h message?
and maybe this should be done in fast_path or worker?

>  		queue_work(system_unbound_wq, &ct->g2h_worker);
> -	xe_guc_ct_fast_path(ct);
> +		xe_guc_ct_fast_path(ct);
> +	}

anyway, since we move forward,

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

>  }
>  
>  /* Basic CT send / receives */

  parent reply	other threads:[~2024-01-05 19:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 21:43 [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled Matthew Brost
2024-01-03 13:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-03 13:32 ` ✓ CI.checkpatch: " Patchwork
2024-01-03 13:32 ` ✓ CI.KUnit: " Patchwork
2024-01-03 13:40 ` ✓ CI.Build: " Patchwork
2024-01-03 13:40 ` ✓ CI.Hooks: " Patchwork
2024-01-03 13:42 ` ✓ CI.checksparse: " Patchwork
2024-01-03 14:16 ` ✓ CI.BAT: " Patchwork
2024-01-05 19:59 ` Michal Wajdeczko [this message]
2024-01-05 20:12   ` [PATCH] " Matthew Brost
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05 20:25 Matthew Brost
2024-01-05 20:34 Matthew Brost

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=c2af7f83-d615-48db-8d7e-c660d0db71ec@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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