Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Atwood <matthew.s.atwood@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	<intel-xe@lists.freedesktop.org>, <matthew.d.roper@intel.com>,
	<daniele.ceraolosuprio@intel.com>, <john.c.harrison@intel.com>,
	<brian.welty@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Matt Roper <matthew.d.roper@intel.com>,
	 Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	John Harrison <John.C.Harrison@intel.com>,
	Brian Welty <brian.welty@intel.com>
Subject: Re: [PATCH 1/4] drm/xe/psmi: Add setting of PSMI feature flag
Date: Thu, 21 Aug 2025 10:24:01 -0700	[thread overview]
Message-ID: <aKdWMWDsgQvCt_4U@msatwood-mobl> (raw)
In-Reply-To: <20250716-psmi-v1-1-674c13d7028e@intel.com>

On Wed, Jul 16, 2025 at 01:55:44PM -0700, Lucas De Marchi wrote:
> PSMI allows to capture data from the GPU useful for early
> validation. From the kernel side there isn't much to be done, just a few
> things:
> 
> 	1) Toggle the feature support in GuC
> 	2) Enable some additional WAs
> 	3) Allocate buffers
> 
> Here is the first step, with the next ones to follow.
> 
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Original-author: Brian Welty <brian.welty@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc.c      | 3 +++
>  drivers/gpu/drm/xe/xe_guc_fwif.h | 1 +
>  drivers/gpu/drm/xe/xe_module.c   | 3 +++
>  drivers/gpu/drm/xe/xe_module.h   | 1 +
>  4 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index b1d1d6da37581..a117300501247 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -86,6 +86,9 @@ static u32 guc_ctl_feature_flags(struct xe_guc *guc)
>  	if (!guc_to_xe(guc)->info.skip_guc_pc)
>  		flags |= GUC_CTL_ENABLE_SLPC;
>  
> +	if (xe_modparam.enable_psmi)
> +		flags |= GUC_CTL_ENABLE_PSMI;
> +
>  	return flags;
>  }
>  
> diff --git a/drivers/gpu/drm/xe/xe_guc_fwif.h b/drivers/gpu/drm/xe/xe_guc_fwif.h
> index 6f57578b07cb0..2a5256c24b9d8 100644
> --- a/drivers/gpu/drm/xe/xe_guc_fwif.h
> +++ b/drivers/gpu/drm/xe/xe_guc_fwif.h
> @@ -107,6 +107,7 @@ struct guc_update_exec_queue_policy {
>  #define GUC_CTL_FEATURE			2
>  #define   GUC_CTL_ENABLE_SLPC		BIT(2)
>  #define   GUC_CTL_ENABLE_LITE_RESTORE	BIT(4)
> +#define   GUC_CTL_ENABLE_PSMI		BIT(7)
>  #define   GUC_CTL_DISABLE_SCHEDULER	BIT(14)
>  
>  #define GUC_CTL_DEBUG			3
> diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
> index 064093bf1adca..2e6ac082f7bee 100644
> --- a/drivers/gpu/drm/xe/xe_module.c
> +++ b/drivers/gpu/drm/xe/xe_module.c
> @@ -57,6 +57,9 @@ module_param_named(probe_display, xe_modparam.probe_display, bool, 0444);
>  MODULE_PARM_DESC(probe_display, "Probe display HW, otherwise it's left untouched "
>  		 "[default=" __stringify(DEFAULT_PROBE_DISPLAY) "])");
>  
> +module_param_named(enable_psmi, xe_modparam.enable_psmi, bool, 0444);
> +MODULE_PARM_DESC(enable_psmi, "Enable PSMI capture support");
> +
>  module_param_named(vram_bar_size, xe_modparam.force_vram_bar_size, int, 0600);
>  MODULE_PARM_DESC(vram_bar_size, "Set the vram bar size in MiB (<0=disable-resize, 0=max-needed-size, >0=force-size "
>  		 "[default=" __stringify(DEFAULT_VRAM_BAR_SIZE) "])");
> diff --git a/drivers/gpu/drm/xe/xe_module.h b/drivers/gpu/drm/xe/xe_module.h
> index 5a3bfea8b7b4c..a84af8eccb91d 100644
> --- a/drivers/gpu/drm/xe/xe_module.h
> +++ b/drivers/gpu/drm/xe/xe_module.h
> @@ -12,6 +12,7 @@
>  struct xe_modparam {
>  	bool force_execlist;
>  	bool probe_display;
> +	bool enable_psmi;
>  	u32 force_vram_bar_size;
>  	int guc_log_level;
>  	char *guc_firmware_path;
> 
> -- 
> 2.49.0
> 

  reply	other threads:[~2025-08-21 17:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 20:55 [PATCH 0/4] drm/xe: Add psmi support Lucas De Marchi
2025-07-16 20:55 ` [PATCH 1/4] drm/xe/psmi: Add setting of PSMI feature flag Lucas De Marchi
2025-08-21 17:24   ` Matt Atwood [this message]
2025-07-16 20:55 ` [PATCH 2/4] drm/xe/psmi: Add debugfs interface for allocation of PSMI capture buffers Lucas De Marchi
2025-07-16 20:55 ` [PATCH 3/4] drm/xe/psmi: Enable GuC Wa_14020001231 Lucas De Marchi
2025-07-16 20:55 ` [PATCH 4/4] drm/xe/psmi: Add Wa_16023683509 Lucas De Marchi
2025-07-16 21:05 ` ✗ CI.checkpatch: warning for drm/xe: Add psmi support Patchwork
2025-07-16 21:07 ` ✓ CI.KUnit: success " Patchwork
2025-07-16 21:58 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-17 19:19 ` ✗ Xe.CI.Full: failure " Patchwork
2025-07-17 19:47 ` [PATCH 0/4] " 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=aKdWMWDsgQvCt_4U@msatwood-mobl \
    --to=matthew.s.atwood@intel.com \
    --cc=brian.welty@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=daniele.ceraolosuprio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=john.c.harrison@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox