From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Riana Tauro <riana.tauro@intel.com>, intel-xe@lists.freedesktop.org
Cc: anshuman.gupta@intel.com, umesh.nerlige.ramappa@intel.com,
lucas.demarchi@intel.com, vinay.belgaumkar@intel.com,
soham.purkait@intel.com,
John Harrison <John.C.Harrison@Intel.com>
Subject: Re: [PATCH v7 3/5] drm/xe/guc: Expose engine activity only for supported GuC version
Date: Fri, 14 Feb 2025 12:32:27 +0100 [thread overview]
Message-ID: <d8fb6e6d-bba6-4b89-93e3-f2e8030a5cd2@intel.com> (raw)
In-Reply-To: <20250214100819.798544-4-riana.tauro@intel.com>
On 14.02.2025 11:08, Riana Tauro wrote:
> Engine activity is supported only on GuC submission version >= 1.14.1
> Allow enabling/reading engine activity only on supported
> GuC versions. Warn once if not supported.
>
> v2: use guc interface version (John)
> v3: use debug log (Umesh)
> v4: use variable for supported and use gt logs
> use a friendlier log message (Michal)
> v5: fix kernel-doc
> do not continue in init if not supported (Michal)
> v6: remove hardcoding values (Michal)
>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_engine_activity.c | 51 ++++++++++++++++++-
> drivers/gpu/drm/xe/xe_guc_engine_activity.h | 1 +
> .../gpu/drm/xe/xe_guc_engine_activity_types.h | 3 ++
> 3 files changed, 53 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_engine_activity.c b/drivers/gpu/drm/xe/xe_guc_engine_activity.c
> index a424527eddb6..2a457dcf31d5 100644
> --- a/drivers/gpu/drm/xe/xe_guc_engine_activity.c
> +++ b/drivers/gpu/drm/xe/xe_guc_engine_activity.c
> @@ -95,6 +95,29 @@ static void free_engine_activity_buffers(struct engine_activity_buffer *buffer)
> xe_bo_unpin_map_no_vm(buffer->activity_bo);
> }
>
> +static bool is_engine_activity_supported(struct xe_guc *guc)
> +{
> + struct xe_uc_fw_version *version = &guc->fw.versions.found[XE_UC_FW_VER_COMPATIBILITY];
> + struct xe_uc_fw_version required = { 1, 14, 1 };
nit: could use designated initializers to always be on the safe side
> + struct xe_gt *gt = guc_to_gt(guc);
> +
> + if (IS_SRIOV_VF(gt_to_xe(gt))) {
> + xe_gt_info(gt, "engine activity stats not supported on VFs\n");
> + return false;
> + }
> +
> + /* engine activity stats is supported from GuC interface version (1.14.1) */
> + if (GUC_SUBMIT_VER(guc) < MAKE_GUC_VER_STRUCT(required)) {
> + xe_gt_info(gt,
> + "engine activity stats unsupported in GuC interface v%u.%u.%u, need v%u.%u.%u or higher\n",
> + version->major, version->minor, version->patch, required.major,
> + required.minor, required.patch);
> + return false;
> + }
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
next prev parent reply other threads:[~2025-02-14 11:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 10:08 [PATCH v7 0/5] PMU support for engine activity Riana Tauro
2025-02-14 9:54 ` ✓ CI.Patch_applied: success for PMU support for engine activity (rev3) Patchwork
2025-02-14 9:55 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-14 9:56 ` ✓ CI.KUnit: success " Patchwork
2025-02-14 10:08 ` [PATCH v7 1/5] drm/xe: Add engine activity support Riana Tauro
2025-02-14 10:08 ` [PATCH v7 2/5] drm/xe/trace: Add trace for engine activity Riana Tauro
2025-02-14 10:08 ` [PATCH v7 3/5] drm/xe/guc: Expose engine activity only for supported GuC version Riana Tauro
2025-02-14 11:32 ` Michal Wajdeczko [this message]
2025-02-14 10:08 ` [PATCH v7 4/5] drm/xe/xe_pmu: Add PMU support for engine activity Riana Tauro
2025-02-14 10:08 ` [PATCH v7 5/5] drm/xe/xe_pmu: Acquire forcewake on event init for engine events Riana Tauro
2025-02-14 9:50 ` Ghimiray, Himal Prasad
2025-02-20 21:46 ` Lucas De Marchi
2025-02-21 1:14 ` Umesh Nerlige Ramappa
2025-02-21 4:45 ` Lucas De Marchi
2025-02-21 6:26 ` Riana Tauro
2025-02-21 6:26 ` Lucas De Marchi
2025-02-21 6:32 ` Riana Tauro
2025-02-21 17:42 ` Umesh Nerlige Ramappa
2025-02-14 10:12 ` ✓ CI.Build: success for PMU support for engine activity (rev3) Patchwork
2025-02-14 10:15 ` ✓ CI.Hooks: " Patchwork
2025-02-14 10:16 ` ✓ CI.checksparse: " Patchwork
2025-02-14 10:35 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-15 6:36 ` ✗ 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=d8fb6e6d-bba6-4b89-93e3-f2e8030a5cd2@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=riana.tauro@intel.com \
--cc=soham.purkait@intel.com \
--cc=umesh.nerlige.ramappa@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