All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Release force wake first then runtime power
Date: Wed, 7 May 2025 15:30:23 -0400	[thread overview]
Message-ID: <aBu0zzXBjelQUy2d@intel.com> (raw)
In-Reply-To: <91469b5e-170a-4f18-a694-61e26acd1ea8@intel.com>

On Wed, May 07, 2025 at 09:19:31AM +0530, Ghimiray, Himal Prasad wrote:
> 
> 
> On 07-05-2025 07:53, Shuicheng Lin wrote:
> > xe_force_wake_get() is dependent on xe_pm_runtime_get(), so for
> > the release path, xe_force_wake_put() should be called first then
> > xe_pm_runtime_put().
> > Combine the error path and normal path together with goto.
> > 
> > Fixes: 85d547608ef5 ("drm/xe/xe_gt_debugfs: Update handling of xe_force_wake_get return")
> > Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
> 
> LGTM
> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

pushed do drm-xe-next, thanks for the patch and the for the review
> 
> > ---
> >   drivers/gpu/drm/xe/xe_gt_debugfs.c | 9 +++++----
> >   1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > index a88076e9cc7d..119a55bb7580 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > @@ -92,22 +92,23 @@ static int hw_engines(struct xe_gt *gt, struct drm_printer *p)
> >   	struct xe_hw_engine *hwe;
> >   	enum xe_hw_engine_id id;
> >   	unsigned int fw_ref;
> > +	int ret = 0;
> >   	xe_pm_runtime_get(xe);
> >   	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)) {
> > -		xe_pm_runtime_put(xe);
> > -		xe_force_wake_put(gt_to_fw(gt), fw_ref);
> > -		return -ETIMEDOUT;
> > +		ret = -ETIMEDOUT;
> > +		goto fw_put;
> >   	}
> >   	for_each_hw_engine(hwe, gt, id)
> >   		xe_hw_engine_print(hwe, p);
> > +fw_put:
> >   	xe_force_wake_put(gt_to_fw(gt), fw_ref);
> >   	xe_pm_runtime_put(xe);
> > -	return 0;
> > +	return ret;
> >   }
> >   static int powergate_info(struct xe_gt *gt, struct drm_printer *p)
> 

  reply	other threads:[~2025-05-07 19:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  2:23 [PATCH] drm/xe: Release force wake first then runtime power Shuicheng Lin
2025-05-07  2:28 ` ✓ CI.Patch_applied: success for " Patchwork
2025-05-07  2:28 ` ✓ CI.checkpatch: " Patchwork
2025-05-07  2:30 ` ✓ CI.KUnit: " Patchwork
2025-05-07  2:38 ` ✓ CI.Build: " Patchwork
2025-05-07  2:40 ` ✓ CI.Hooks: " Patchwork
2025-05-07  2:42 ` ✓ CI.checksparse: " Patchwork
2025-05-07  3:09 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-07  3:49 ` [PATCH] " Ghimiray, Himal Prasad
2025-05-07 19:30   ` Rodrigo Vivi [this message]
2025-05-07  5:05 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-05-26 16:46 ` ✗ CI.Patch_applied: " 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=aBu0zzXBjelQUy2d@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=shuicheng.lin@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.