All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/xe/guc: Don't overuse ct_to_xe()
Date: Wed, 10 Apr 2024 16:27:49 +0000	[thread overview]
Message-ID: <Zha+BaMJS3WGSV/E@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240404193647.759-3-michal.wajdeczko@intel.com>

On Thu, Apr 04, 2024 at 09:36:47PM +0200, Michal Wajdeczko wrote:
> Pointer to xe_device might be already available or could be added.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

This is going to clash with [1] so I'd drop this for now and then
revisit once [1] is merged since [1] is an actual functiona change that
Rodrigo has been working on for a while now.

Matt

[1] https://patchwork.freedesktop.org/series/132240/

> ---
>  drivers/gpu/drm/xe/xe_guc_ct.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 06952b0480f7..ae255dab6516 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -1210,8 +1210,8 @@ void xe_guc_ct_fast_path(struct xe_guc_ct *ct)
>  	bool ongoing;
>  	int len;
>  
> -	ongoing = xe_device_mem_access_get_if_ongoing(ct_to_xe(ct));
> -	if (!ongoing && xe_pm_read_callback_task(ct_to_xe(ct)) == NULL)
> +	ongoing = xe_device_mem_access_get_if_ongoing(xe);
> +	if (!ongoing && xe_pm_read_callback_task(xe) == NULL)
>  		return;
>  
>  	spin_lock(&ct->fast_lock);
> @@ -1254,6 +1254,7 @@ static int dequeue_one_g2h(struct xe_guc_ct *ct)
>  static void g2h_worker_func(struct work_struct *w)
>  {
>  	struct xe_guc_ct *ct = container_of(w, struct xe_guc_ct, g2h_worker);
> +	struct xe_device *xe = ct_to_xe(ct);
>  	struct xe_gt *gt = ct_to_gt(ct);
>  	bool ongoing;
>  	int ret;
> @@ -1281,8 +1282,8 @@ static void g2h_worker_func(struct work_struct *w)
>  	 * responses, if the worker here is blocked on those callbacks
>  	 * completing, creating a deadlock.
>  	 */
> -	ongoing = xe_device_mem_access_get_if_ongoing(ct_to_xe(ct));
> -	if (!ongoing && xe_pm_read_callback_task(ct_to_xe(ct)) == NULL)
> +	ongoing = xe_device_mem_access_get_if_ongoing(xe);
> +	if (!ongoing && xe_pm_read_callback_task(xe) == NULL)
>  		return;
>  
>  	do {
> @@ -1299,7 +1300,7 @@ static void g2h_worker_func(struct work_struct *w)
>  	} while (ret == 1);
>  
>  	if (ongoing)
> -		xe_device_mem_access_put(ct_to_xe(ct));
> +		xe_device_mem_access_put(xe);
>  }
>  
>  static void guc_ctb_snapshot_capture(struct xe_device *xe, struct guc_ctb *ctb,
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-04-10 16:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 19:36 [PATCH 1/3] drm/xe/guc: Prefer GT oriented logs in GuC CTB code Michal Wajdeczko
2024-04-04 19:36 ` [PATCH 2/3] drm/xe/guc: Prefer GT oriented asserts in " Michal Wajdeczko
2024-04-10 16:24   ` Matthew Brost
2024-04-04 19:36 ` [PATCH 3/3] drm/xe/guc: Don't overuse ct_to_xe() Michal Wajdeczko
2024-04-10 16:27   ` Matthew Brost [this message]
2024-04-04 20:05 ` ✓ CI.Patch_applied: success for series starting with [1/3] drm/xe/guc: Prefer GT oriented logs in GuC CTB code Patchwork
2024-04-04 20:05 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-04 20:06 ` ✓ CI.KUnit: success " Patchwork
2024-04-04 20:18 ` ✓ CI.Build: " Patchwork
2024-04-04 20:24 ` ✓ CI.Hooks: " Patchwork
2024-04-04 20:25 ` ✓ CI.checksparse: " Patchwork
2024-04-04 20:49 ` ✓ CI.BAT: " Patchwork
2024-04-10 16:22 ` [PATCH 1/3] " 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=Zha+BaMJS3WGSV/E@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.