From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <prashanth.kumar@intel.com>, <dnyaneshwar.bhadane@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
John Harrison <John.C.Harrison@Intel.com>
Subject: Re: [PATCH v3 01/13] drm/xe/psmi: Add GuC flag to enable PSMI
Date: Tue, 12 Aug 2025 17:38:14 -0700 [thread overview]
Message-ID: <1749abbd-5b10-4684-b1fb-c340fe57a215@intel.com> (raw)
In-Reply-To: <20250808-psmi-v3-1-a111e9f1e4b7@intel.com>
On 8/8/2025 10:29 AM, 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. For now everything
> is disabled through a check in configfs that is currently hardcoded to
> disabled.
>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_configfs.h | 2 ++
> drivers/gpu/drm/xe/xe_guc.c | 7 ++++++-
> drivers/gpu/drm/xe/xe_guc_fwif.h | 1 +
> 3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h
> index fb87640080896..c14588b86e833 100644
> --- a/drivers/gpu/drm/xe/xe_configfs.h
> +++ b/drivers/gpu/drm/xe/xe_configfs.h
> @@ -16,12 +16,14 @@ void xe_configfs_exit(void);
> bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
> void xe_configfs_clear_survivability_mode(struct pci_dev *pdev);
> u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
> +static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
> #else
> static inline int xe_configfs_init(void) { return 0; }
> static inline void xe_configfs_exit(void) { }
> static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
> static inline void xe_configfs_clear_survivability_mode(struct pci_dev *pdev) { }
> static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
> +static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
> #endif
>
> #endif
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 9e34401e4489f..cb757a53de856 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -16,6 +16,7 @@
> #include "regs/xe_guc_regs.h"
> #include "regs/xe_irq_regs.h"
> #include "xe_bo.h"
> +#include "xe_configfs.h"
> #include "xe_device.h"
> #include "xe_force_wake.h"
> #include "xe_gt.h"
> @@ -81,11 +82,15 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
>
> static u32 guc_ctl_feature_flags(struct xe_guc *guc)
> {
> + struct xe_device *xe = guc_to_xe(guc);
> u32 flags = GUC_CTL_ENABLE_LITE_RESTORE;
>
> - if (!guc_to_xe(guc)->info.skip_guc_pc)
> + if (!xe->info.skip_guc_pc)
> flags |= GUC_CTL_ENABLE_SLPC;
>
> + if (xe_configfs_get_psmi_enabled(to_pci_dev(xe->drm.dev)))
> + 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 ca9f999d38d1e..4dc000c977faf 100644
> --- a/drivers/gpu/drm/xe/xe_guc_fwif.h
> +++ b/drivers/gpu/drm/xe/xe_guc_fwif.h
> @@ -112,6 +112,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)
Should we have this as GUC_CTL_ENABLE_PSMI_LOGGING to match the GuC
nomenclature?
Thanks,
Vinay.
> #define GUC_CTL_DISABLE_SCHEDULER BIT(14)
>
> #define GUC_CTL_DEBUG 3
>
next prev parent reply other threads:[~2025-08-13 0:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 17:29 [PATCH v3 00/13] drm/xe: Add psmi support Lucas De Marchi
2025-08-08 17:29 ` [PATCH v3 01/13] drm/xe/psmi: Add GuC flag to enable PSMI Lucas De Marchi
2025-08-13 0:38 ` Belgaumkar, Vinay [this message]
2025-08-15 21:34 ` Lucas De Marchi
2025-08-08 17:29 ` [PATCH v3 02/13] drm/xe/psmi: Add debugfs interface for PSMI Lucas De Marchi
2025-08-13 1:41 ` Belgaumkar, Vinay
2025-08-13 10:42 ` Matthew Auld
2025-08-15 21:35 ` Lucas De Marchi
2025-08-08 17:29 ` [PATCH v3 03/13] drm/xe/rtp: Add match for psmi Lucas De Marchi
2025-08-14 21:28 ` Belgaumkar, Vinay
2025-08-08 17:29 ` [PATCH v3 04/13] drm/xe/psmi: Add Wa_14020001231 Lucas De Marchi
2025-08-13 17:44 ` Riana Tauro
2025-08-14 11:13 ` Lucas De Marchi
2025-08-08 17:29 ` [PATCH v3 05/13] drm/xe/psmi: Add Wa_16023683509 Lucas De Marchi
2025-08-13 11:15 ` Bhadane, Dnyaneshwar
2025-08-08 17:29 ` [PATCH v3 06/13] drm/xe/configfs: Simplify kernel doc Lucas De Marchi
2025-08-13 6:23 ` Riana Tauro
2025-08-08 17:29 ` [PATCH v3 07/13] drm/xe/configfs: Allow to enable PSMI Lucas De Marchi
2025-08-13 6:58 ` Riana Tauro
2025-08-13 11:23 ` Lucas De Marchi
2025-08-13 17:38 ` Riana Tauro
2025-08-08 17:29 ` [PATCH v3 08/13] drm/xe/configfs: Use guard() for dev->lock Lucas De Marchi
2025-08-12 10:23 ` Bhadane, Dnyaneshwar
2025-08-08 17:29 ` [PATCH v3 09/13] drm/xe/configfs: Block runtime attribute changes Lucas De Marchi
2025-08-13 11:03 ` Riana Tauro
2025-08-08 17:29 ` [PATCH v3 10/13] drm/xe/configfs: Use tree-like output in documentation Lucas De Marchi
2025-08-14 21:31 ` Bhadane, Dnyaneshwar
2025-08-08 17:29 ` [PATCH v3 11/13] drm/xe/configfs: Improve documentation steps Lucas De Marchi
2025-08-13 11:08 ` Riana Tauro
2025-08-08 17:29 ` [PATCH v3 12/13] drm/xe/configfs: Minor fixes to documentation Lucas De Marchi
2025-08-12 10:24 ` Bhadane, Dnyaneshwar
2025-08-08 17:29 ` [PATCH v3 13/13] drm/xe/configfs: Dump custom settings when binding Lucas De Marchi
2025-08-15 0:48 ` Belgaumkar, Vinay
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=1749abbd-5b10-4684-b1fb-c340fe57a215@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dnyaneshwar.bhadane@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=prashanth.kumar@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;
as well as URLs for NNTP newsgroup(s).