All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Matt Roper <matthew.d.roper@intel.com>,
	 Francois Dugast <francois.dugast@intel.com>,
	Maarten Lankhorst <dev@lankhorst.se>
Subject: Re: [PATCH 6/7] drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish()
Date: Mon, 3 Feb 2025 16:46:03 -0500	[thread overview]
Message-ID: <Z6E5G38KtXc7UJTC@intel.com> (raw)
In-Reply-To: <20250131223140.4144292-7-lucas.demarchi@intel.com>

On Fri, Jan 31, 2025 at 02:31:39PM -0800, Lucas De Marchi wrote:
> Now that xe_gt_remove is handled entirely by xe_gt, it's clear there are
> some extra calls to xe_hw_fence_irq_finish() that aren't necessary.
> Neither all_fw_domain_init() or gt_fw_domain_init() need to do that
> since it's handled by the caller on any error.

I remember having bumped into this code a while ago and having
the feeling it was duplicated...  but at least it all makes sense now...


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 48f6fd8c14b65..b05a0f27cc88c 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -388,13 +388,11 @@ static void dump_pat_on_error(struct xe_gt *gt)
>  static int gt_fw_domain_init(struct xe_gt *gt)
>  {
>  	unsigned int fw_ref;
> -	int err, i;
> +	int err;
>  
>  	fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> -	if (!fw_ref) {
> -		err = -ETIMEDOUT;
> -		goto err_hw_fence_irq;
> -	}
> +	if (!fw_ref)
> +		return -ETIMEDOUT;
>  
>  	if (!xe_gt_is_media_type(gt)) {
>  		err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt);
> @@ -435,9 +433,6 @@ static int gt_fw_domain_init(struct xe_gt *gt)
>  err_force_wake:
>  	dump_pat_on_error(gt);
>  	xe_force_wake_put(gt_to_fw(gt), fw_ref);
> -err_hw_fence_irq:
> -	for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
> -		xe_hw_fence_irq_finish(&gt->fence_irq[i]);
>  
>  	return err;
>  }
> @@ -445,7 +440,7 @@ static int gt_fw_domain_init(struct xe_gt *gt)
>  static int all_fw_domain_init(struct xe_gt *gt)
>  {
>  	unsigned int fw_ref;
> -	int err, i;
> +	int err;
>  
>  	fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
>  	if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
> @@ -523,8 +518,6 @@ static int all_fw_domain_init(struct xe_gt *gt)
>  
>  err_force_wake:
>  	xe_force_wake_put(gt_to_fw(gt), fw_ref);
> -	for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
> -		xe_hw_fence_irq_finish(&gt->fence_irq[i]);
>  
>  	return err;
>  }
> -- 
> 2.48.0
> 

  reply	other threads:[~2025-02-03 21:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 22:31 [PATCH 0/7] Cleanup error handling on probe Lucas De Marchi
2025-01-31 22:31 ` [PATCH 1/7] drm/xe: Fix xe_display_fini() calls Lucas De Marchi
2025-02-03 20:32   ` Rodrigo Vivi
2025-01-31 22:31 ` [PATCH 2/7] drm/xe: Fix error handling in xe_irq_install() Lucas De Marchi
2025-02-03 20:36   ` Rodrigo Vivi
2025-01-31 22:31 ` [PATCH 3/7] drm/xe: Fix xe_tile_init_noalloc() error propagation Lucas De Marchi
2025-02-03 14:21   ` Francois Dugast
2025-01-31 22:31 ` [PATCH 4/7] drm/xe: Stop ignoring errors from xe_ttm_stolen_mgr_init() Lucas De Marchi
2025-02-03 14:10   ` Francois Dugast
2025-01-31 22:31 ` [PATCH 5/7] drm/xe: Cleanup unwind of gt initialization Lucas De Marchi
2025-02-01  6:24   ` Raag Jadav
2025-02-01 15:55     ` Lucas De Marchi
2025-02-02  8:09       ` Raag Jadav
2025-01-31 22:31 ` [PATCH 6/7] drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish() Lucas De Marchi
2025-02-03 21:46   ` Rodrigo Vivi [this message]
2025-01-31 22:31 ` [PATCH 7/7] drm/xe: Move oa fini to xe_oa Lucas De Marchi
2025-01-31 22:37 ` ✓ CI.Patch_applied: success for Cleanup error handling on probe Patchwork
2025-01-31 22:37 ` ✓ CI.checkpatch: " Patchwork
2025-01-31 22:38 ` ✓ CI.KUnit: " Patchwork
2025-01-31 22:55 ` ✓ CI.Build: " Patchwork
2025-01-31 22:57 ` ✓ CI.Hooks: " Patchwork
2025-01-31 22:59 ` ✓ CI.checksparse: " Patchwork
2025-01-31 23:32 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-02-01  8:05 ` ✗ Xe.CI.Full: " Patchwork
2025-02-03 18:39 ` [PATCH 0/7] " Lucas De Marchi
2025-02-04  8:58 ` Tvrtko Ursulin
2025-02-04 14:50   ` Lucas De Marchi
2025-02-04 18:10     ` Tvrtko Ursulin
2025-02-04 22:42       ` Rodrigo Vivi

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=Z6E5G38KtXc7UJTC@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dev@lankhorst.se \
    --cc=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@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.