From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v4 2/2] drm/xe/guc: Request max GT freq during resume
Date: Mon, 17 Jun 2024 14:20:31 -0400 [thread overview]
Message-ID: <ZnB-b0UqkVJRLtZ1@intel.com> (raw)
In-Reply-To: <20240617081051.3340442-3-vinay.belgaumkar@intel.com>
On Mon, Jun 17, 2024 at 01:10:51AM -0700, Vinay Belgaumkar wrote:
> We already request max freq in the load path, moving it
> to __xe_guc_upload will ensure this speeds up GuC load in
> the resume path as well.
>
> v2: Rename xe_guc_pc_init_early since we now call it per
> GuC load (Michal W)
>
> v3: Keep pc_init_early() and init RPx values there (Rodrigo)
thanks
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 4 +++-
> drivers/gpu/drm/xe/xe_guc_pc.c | 15 +++++++++++++--
> drivers/gpu/drm/xe/xe_guc_pc.h | 1 +
> 3 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 0e1a5674ef13..178a0fe59107 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -699,6 +699,9 @@ static int __xe_guc_upload(struct xe_guc *guc)
> {
> int ret;
>
> + /* Raise GT freq to speed up HuC/GuC load */
> + xe_guc_pc_raise_unslice(&guc->pc);
> +
> guc_write_params(guc);
> guc_prepare_xfer(guc);
>
> @@ -784,7 +787,6 @@ int xe_guc_min_load_for_hwconfig(struct xe_guc *guc)
>
> xe_guc_ads_populate_minimal(&guc->ads);
>
> - /* Raise GT freq to speed up HuC/GuC load */
> xe_guc_pc_init_early(&guc->pc);
>
> ret = __xe_guc_upload(guc);
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index d9194328b495..1775183662a4 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -688,17 +688,28 @@ static u32 pc_max_freq_cap(struct xe_guc_pc *pc)
> }
>
> /**
> - * xe_guc_pc_init_early - Initialize RPx values and request a higher GT
> + * xe_guc_pc_raise_unslice - Initialize RPx values and request a higher GT
> * frequency to allow faster GuC load times
> * @pc: Xe_GuC_PC instance
> */
> +void xe_guc_pc_raise_unslice(struct xe_guc_pc *pc)
> +{
> + struct xe_gt *gt = pc_to_gt(pc);
> +
> + xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
> + pc_set_cur_freq(pc, pc_max_freq_cap(pc));
> +}
> +
> +/**
> + * xe_guc_pc_init_early - Initialize RPx values
> + * @pc: Xe_GuC_PC instance
> + */
> void xe_guc_pc_init_early(struct xe_guc_pc *pc)
> {
> struct xe_gt *gt = pc_to_gt(pc);
>
> xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
> pc_init_fused_rp_values(pc);
> - pc_set_cur_freq(pc, pc_max_freq_cap(pc));
> }
>
> static int pc_adjust_freq_bounds(struct xe_guc_pc *pc)
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.h b/drivers/gpu/drm/xe/xe_guc_pc.h
> index 7ba875c3613b..3b4103f59b19 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.h
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.h
> @@ -31,5 +31,6 @@ u64 xe_guc_pc_rc6_residency(struct xe_guc_pc *pc);
> u64 xe_guc_pc_mc6_residency(struct xe_guc_pc *pc);
> void xe_guc_pc_init_early(struct xe_guc_pc *pc);
> int xe_guc_pc_restore_stashed_freq(struct xe_guc_pc *pc);
> +void xe_guc_pc_raise_unslice(struct xe_guc_pc *pc);
>
> #endif /* _XE_GUC_PC_H_ */
> --
> 2.38.1
>
next prev parent reply other threads:[~2024-06-17 18:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 8:10 [PATCH v4 0/2] Apply Wa_22019338487 Vinay Belgaumkar
2024-06-17 8:10 ` [PATCH v4 1/2] drm/xe/lnl: " Vinay Belgaumkar
2024-06-17 18:18 ` Rodrigo Vivi
2024-06-18 23:45 ` Belgaumkar, Vinay
2024-06-17 19:48 ` Michal Wajdeczko
2024-06-18 23:47 ` Belgaumkar, Vinay
2024-06-19 14:42 ` Rodrigo Vivi
2024-06-17 8:10 ` [PATCH v4 2/2] drm/xe/guc: Request max GT freq during resume Vinay Belgaumkar
2024-06-17 18:20 ` Rodrigo Vivi [this message]
2024-06-17 8:18 ` ✓ CI.Patch_applied: success for Apply Wa_22019338487 (rev2) Patchwork
2024-06-17 8:18 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-17 8:19 ` ✗ CI.KUnit: 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=ZnB-b0UqkVJRLtZ1@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 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.