All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: "Michał Winiarski" <michal.winiarski@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v3 19/20] drm/xe/guc: Move GuC power control init to "post-hwconfig"
Date: Mon, 20 Nov 2023 13:30:38 +0000	[thread overview]
Message-ID: <ZVtffjXpEMPMP4MN@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20231114130231.2299661-20-michal.winiarski@intel.com>

On Tue, Nov 14, 2023 at 02:02:30PM +0100, Michał Winiarski wrote:
> SLPC is not used at "hwconfig" stage. Move the initialization of data
> structures used for SLPC to a later point in probe.
> Also - move the xe_guc_pc_init_early to happen just prior to initial
> "hwconfig" load.
> 
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_gt.c  |  3 ---
>  drivers/gpu/drm/xe/xe_guc.c | 25 +++++++++++++++++++------
>  2 files changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index d0962e0cc27e9..73665e4e66f22 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -348,9 +348,6 @@ static int gt_fw_domain_init(struct xe_gt *gt)
>  	if (err)
>  		goto err_force_wake;
>  
> -	/* Raise GT freq to speed up HuC/GuC load */
> -	xe_guc_pc_init_early(&gt->uc.guc.pc);
> -
>  	err = xe_uc_init_hwconfig(&gt->uc);
>  	if (err)
>  		goto err_force_wake;
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 3f430d5bc1051..e04b04be32b7d 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -246,11 +246,19 @@ static void guc_fini(struct drm_device *drm, void *arg)
>  	struct xe_guc *guc = arg;
>  
>  	xe_force_wake_get(gt_to_fw(guc_to_gt(guc)), XE_FORCEWAKE_ALL);
> -	xe_guc_pc_fini(&guc->pc);
>  	xe_uc_fini_hw(&guc_to_gt(guc)->uc);
>  	xe_force_wake_put(gt_to_fw(guc_to_gt(guc)), XE_FORCEWAKE_ALL);
>  }
>  
> +static void guc_fini_post_hwconfig(struct drm_device *drm, void *arg)
> +{
> +	struct xe_guc *guc = arg;
> +
> +	xe_force_wake_get(gt_to_fw(guc_to_gt(guc)), XE_FORCEWAKE_ALL);
> +	xe_guc_pc_fini(&guc->pc);
> +	xe_force_wake_put(gt_to_fw(guc_to_gt(guc)), XE_FORCEWAKE_ALL);
> +}
> +
>  static int __guc_bo_reinit(struct xe_guc *guc, struct xe_bo **src)
>  {
>  	struct xe_tile *tile = gt_to_tile(guc_to_gt(guc));
> @@ -316,11 +324,7 @@ int xe_guc_init(struct xe_guc *guc)
>  	if (ret)
>  		goto out;
>  
> -	ret = xe_guc_pc_init(&guc->pc);
> -	if (ret)
> -		goto out;
> -
> -	ret = drmm_add_action_or_reset(&gt_to_xe(gt)->drm, guc_fini, guc);
> +	ret = drmm_add_action_or_reset(&xe->drm, guc_fini, guc);
>  	if (ret)
>  		goto out;
>  
> @@ -348,6 +352,7 @@ int xe_guc_init(struct xe_guc *guc)
>   */
>  int xe_guc_init_post_hwconfig(struct xe_guc *guc)
>  {
> +	struct xe_gt *gt = guc_to_gt(guc);
>  	int ret;
>  
>  	ret = xe_guc_realloc_post_hwconfig(guc);
> @@ -356,6 +361,11 @@ int xe_guc_init_post_hwconfig(struct xe_guc *guc)
>  
>  	guc_init_params_post_hwconfig(guc);
>  
> +	ret = xe_guc_pc_init(&guc->pc);
> +	if (ret)
> +		return ret;
> +	ret = drmm_add_action_or_reset(&gt_to_xe(gt)->drm, guc_fini_post_hwconfig, guc);
> +
>  	return xe_guc_ads_init_post_hwconfig(&guc->ads);
>  }
>  
> @@ -566,6 +576,9 @@ 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);
>  	if (ret)
>  		return ret;
> -- 
> 2.42.1
> 

  reply	other threads:[~2023-11-20 20:31 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 13:02 [Intel-xe] [PATCH v3 00/20] drm/xe: Probe tweaks and reordering Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 01/20] drm/xe: Skip calling drm_dev_put on probe error Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 02/20] drm/xe: Use managed pci_enable_device Michał Winiarski
2023-11-15 20:47   ` Matt Roper
2023-11-21 12:45     ` Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 03/20] drm/xe/irq: Don't call pci_free_irq_vectors Michał Winiarski
2023-11-15 20:49   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 04/20] drm/xe: Move xe_set_dma_info outside of MMIO setup Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 05/20] drm/xe: Move xe_mmio_probe_tiles " Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 06/20] drm/xe: Split xe_info_init Michał Winiarski
2023-11-20 19:47   ` Lucas De Marchi
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 07/20] drm/xe: Introduce xe_tile_init_early and use at earlier point in probe Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 08/20] drm/xe: Map the entire BAR0 and hold onto the initial mapping Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 09/20] drm/xe/device: Introduce xe_device_probe_early Michał Winiarski
2023-11-15 14:41   ` Matthew Brost
2023-11-15 21:31   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 10/20] drm/xe: Don't "peek" into GMD_ID Michał Winiarski
2023-11-15 14:45   ` Matthew Brost
2023-11-15 21:51   ` Matt Roper
2023-11-20 19:57     ` Lucas De Marchi
2023-11-21 13:27       ` Michał Winiarski
2023-11-21 16:54         ` Lucas De Marchi
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 11/20] drm/xe: Move system memory management init to earlier point in probe Michał Winiarski
2023-11-15 21:55   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 12/20] drm/xe: Move force_wake " Michał Winiarski
2023-11-15 21:59   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 13/20] drm/xe: Reorder GGTT " Michał Winiarski
2023-11-15 22:19   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 14/20] drm/xe/uc: Split xe_uc_fw_init Michał Winiarski
2023-11-15 22:28   ` Matt Roper
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 15/20] drm/xe/uc: Store firmware binary in system-memory backed BO Michał Winiarski
2023-11-15 22:34   ` Matt Roper
2023-11-20 20:04   ` Lucas De Marchi
2023-11-20 21:34     ` Daniele Ceraolo Spurio
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 16/20] drm/xe/uc: Extract xe_uc_sanitize_reset Michał Winiarski
2023-11-16 12:56   ` Matthew Brost
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 17/20] drm/xe/guc: Split GuC params used for "hwconfig" and "post-hwconfig" Michał Winiarski
2023-11-20 13:25   ` Matthew Brost
2023-11-20 20:09   ` Lucas De Marchi
2023-11-21 13:36     ` Michał Winiarski
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 18/20] drm/xe/guc: Allocate GuC data structures in system memory for initial load Michał Winiarski
2023-11-20 20:20   ` Lucas De Marchi
2023-11-21 13:42     ` Michał Winiarski
2023-11-21 16:49       ` Lucas De Marchi
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 19/20] drm/xe/guc: Move GuC power control init to "post-hwconfig" Michał Winiarski
2023-11-20 13:30   ` Matthew Brost [this message]
2023-11-14 13:02 ` [Intel-xe] [PATCH v3 20/20] drm/xe: Initialize GuC earlier during probe Michał Winiarski
2023-11-15 15:09   ` Matthew Brost
2023-11-21 16:07     ` Michał Winiarski
2023-11-14 13:07 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Probe tweaks and reordering (rev2) Patchwork
2023-11-14 13:08 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-11-14 13:09 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-14 13:16 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-14 13:16 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-14 13:18 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-14 13:51 ` [Intel-xe] ✓ CI.BAT: " 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=ZVtffjXpEMPMP4MN@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.winiarski@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.