From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <vinay.belgaumkar@intel.com>,
<badal.nilawar@intel.com>, <sk.anirban@intel.com>
Subject: Re: [PATCH v1 1/2] drm/xe/guc: Make xe_guc_pc_stop() void
Date: Wed, 22 Apr 2026 08:46:06 -0400 [thread overview]
Message-ID: <aejDDi4gS50ukqJz@intel.com> (raw)
In-Reply-To: <20260422121128.1002031-2-raag.jadav@intel.com>
On Wed, Apr 22, 2026 at 05:40:56PM +0530, Raag Jadav wrote:
> xe_guc_pc_stop() doesn't return any meaningful value. Refactor it into
> void function.
>
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 9 ++-------
> drivers/gpu/drm/xe/xe_guc_pc.c | 10 ++++------
> drivers/gpu/drm/xe/xe_guc_pc.h | 2 +-
> 3 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 1355b68d3fce..ec291588c482 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1730,13 +1730,8 @@ void xe_guc_reset_wait(struct xe_guc *guc)
>
> void xe_guc_stop_prepare(struct xe_guc *guc)
> {
> - if (!IS_SRIOV_VF(guc_to_xe(guc))) {
> - int err;
> -
> - err = xe_guc_pc_stop(&guc->pc);
> - xe_gt_WARN(guc_to_gt(guc), err, "Failed to stop GuC PC: %pe\n",
> - ERR_PTR(err));
> - }
> + if (!IS_SRIOV_VF(guc_to_xe(guc)))
> + xe_guc_pc_stop(&guc->pc);
> }
>
> void xe_guc_stop(struct xe_guc *guc)
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index 7ecd91ad6192..59f2fa79ad42 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -1316,18 +1316,16 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
> * xe_guc_pc_stop - Stop GuC's Power Conservation component
> * @pc: Xe_GuC_PC instance
> */
> -int xe_guc_pc_stop(struct xe_guc_pc *pc)
> +void xe_guc_pc_stop(struct xe_guc_pc *pc)
> {
> struct xe_device *xe = pc_to_xe(pc);
>
> if (xe->info.skip_guc_pc)
> - return 0;
> + return;
>
> mutex_lock(&pc->freq_lock);
> pc->freq_ready = false;
> mutex_unlock(&pc->freq_lock);
> -
> - return 0;
> }
>
> /**
> @@ -1342,10 +1340,10 @@ static void xe_guc_pc_fini_hw(void *arg)
> if (xe_device_wedged(xe))
> return;
>
> - CLASS(xe_force_wake, fw_ref)(gt_to_fw(pc_to_gt(pc)), XE_FW_GT);
> - XE_WARN_ON(xe_guc_pc_stop(pc));
> + xe_guc_pc_stop(pc);
>
> /* Bind requested freq to mert_freq_cap before unload */
> + CLASS(xe_force_wake, fw_ref)(gt_to_fw(pc_to_gt(pc)), XE_FW_GT);
this should be in a different patch.
or at least with a good explanation on why on the commit message.
but the rest of the patch is good...
> pc_set_cur_freq(pc, min(pc_max_freq_cap(pc), xe_guc_pc_get_rpe_freq(pc)));
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.h b/drivers/gpu/drm/xe/xe_guc_pc.h
> index 0678a4e787b3..1025a2b15f5f 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.h
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.h
> @@ -13,7 +13,7 @@ struct drm_printer;
>
> int xe_guc_pc_init(struct xe_guc_pc *pc);
> int xe_guc_pc_start(struct xe_guc_pc *pc);
> -int xe_guc_pc_stop(struct xe_guc_pc *pc);
> +void xe_guc_pc_stop(struct xe_guc_pc *pc);
> void xe_guc_pc_print(struct xe_guc_pc *pc, struct drm_printer *p);
> int xe_guc_pc_action_set_param(struct xe_guc_pc *pc, u8 id, u32 value);
> int xe_guc_pc_action_unset_param(struct xe_guc_pc *pc, u8 id);
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-04-22 12:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 12:10 [PATCH v1 0/2] Minor GuC PC cleanups Raag Jadav
2026-04-22 12:10 ` [PATCH v1 1/2] drm/xe/guc: Make xe_guc_pc_stop() void Raag Jadav
2026-04-22 12:46 ` Rodrigo Vivi [this message]
2026-04-22 12:10 ` [PATCH v1 2/2] drm/xe/gt: Drop redundant forcewake Raag Jadav
2026-04-22 12:46 ` Rodrigo Vivi
2026-04-22 12:21 ` ✓ CI.KUnit: success for Minor GuC PC cleanups Patchwork
2026-04-22 13:11 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-23 6:23 ` ✗ Xe.CI.FULL: failure " 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=aejDDi4gS50ukqJz@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=raag.jadav@intel.com \
--cc=sk.anirban@intel.com \
--cc=vinay.belgaumkar@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