From: Riana Tauro <riana.tauro@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
<rodrigo.vivi@intel.com>, <vinay.belgaumkar@intel.com>,
<aravind.iddamsetty@intel.com>, <john.c.harrison@intel.com>,
<ashutosh.dixit@intel.com>, <soham.purkait@intel.com>
Subject: Re: [PATCH 6/7] drm/xe/guc: Expose engine busyness only for supported GuC version
Date: Mon, 18 Nov 2024 13:07:32 +0530 [thread overview]
Message-ID: <8ceea4a6-96d2-432d-8375-73d968d068c4@intel.com> (raw)
In-Reply-To: <ZzaR7I1G+kuu/SCx@orsosgc001>
Hi Umesh
On 11/15/2024 5:42 AM, Umesh Nerlige Ramappa wrote:
> On Wed, Nov 13, 2024 at 10:25:48AM +0530, Riana Tauro wrote:
>> Engine busyness is supported only on GuC versions >= 70.32.0
>> Allow enabling/reading engine busyness only on supported
>> GuC versions. Warn once if not supported.
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_engine_activity.c | 22 ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_engine_activity.c b/drivers/gpu/
>> drm/xe/xe_engine_activity.c
>> index 7a2ae09d23de..fc34dcf3057a 100644
>> --- a/drivers/gpu/drm/xe/xe_engine_activity.c
>> +++ b/drivers/gpu/drm/xe/xe_engine_activity.c
>> @@ -236,6 +236,16 @@ static u32 gpm_timestamp_shift(struct xe_gt *gt)
>> return 3 - REG_FIELD_GET(RPM_CONFIG0_CTC_SHIFT_PARAMETER_MASK, reg);
>> }
>>
>> +static bool guc_engine_activity_supported(struct xe_guc *guc)
>> +{
>> + if (GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 32, 0))
>> + return true;
>> +
>> + drm_WARN_ON_ONCE(&guc_to_xe(guc)->drm,
>> + "Engine busyness not supported in this GuC version\n");
>> + return false;
>> +}
>> +
>> /**
>> * xe_engine_activity_get_active_ticks - Get engine active ticks
>> * @hwe: The hw_engine object
>> @@ -246,6 +256,9 @@ u64 xe_engine_activity_get_active_ticks(struct
>> xe_hw_engine *hwe)
>> {
>> struct xe_guc *guc = &hwe->gt->uc.guc;
>>
>> + if (!guc_engine_activity_supported(guc))
>> + return 0;
>> +
>> return get_engine_active_ticks(guc, hwe);
>> }
>>
>> @@ -259,6 +272,9 @@ u64 xe_engine_activity_get_total_ticks(struct
>> xe_hw_engine *hwe)
>> {
>> struct xe_guc *guc = &hwe->gt->uc.guc;
>>
>> + if (!guc_engine_activity_supported(guc))
>
> Hmm, not sure my response to this landed on the ML. Sending again..
>
> If GuC is an older version and UMDs have implemented the new interface,
> we could return CPU time in ticks here so that UMDs will still be able
> to use something in the denominator instead of a divide by zero. Busy
> value will still be 0. Thoughts?
We could do this. But shouldn't UMD only read total ticks if they see an
actual busyness? Busyness % will anyway be 0 even if we return the cpu
time in ticks
Thanks
Riana Tauro
>
> Umesh
>
>> + return 0;
>> +
>> return get_engine_total_ticks(guc, hwe);
>> }
next prev parent reply other threads:[~2024-11-18 7:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 4:55 [PATCH 0/7] Add PMU support for single engine busyness Riana Tauro
2024-11-13 4:55 ` [PATCH 1/7] [DO NOT REVIEW] drm/xe/pmu: Enable PMU interface Riana Tauro
2024-11-13 4:55 ` [PATCH 2/7] [DO NOT REVIEW] drm/xe/pmu: Add GT C6 events Riana Tauro
2024-11-13 4:55 ` [PATCH 3/7] [DO NOT REVIEW] drm/xe/pmu: Add GT frequency events Riana Tauro
2024-11-13 4:55 ` [PATCH 4/7] drm/xe: add function to convert xe hw engine class to user class Riana Tauro
2024-11-14 16:14 ` Umesh Nerlige Ramappa
2024-11-15 7:18 ` Riana Tauro
2024-11-14 17:46 ` Rodrigo Vivi
2024-11-15 7:21 ` Riana Tauro
2024-11-13 4:55 ` [PATCH 5/7] drm/xe: Add single engine busyness support Riana Tauro
2024-11-15 0:08 ` Umesh Nerlige Ramappa
2024-11-18 7:33 ` Riana Tauro
2024-11-13 4:55 ` [PATCH 6/7] drm/xe/guc: Expose engine busyness only for supported GuC version Riana Tauro
2024-11-14 21:12 ` Umesh Nerlige Ramappa
2024-11-15 0:12 ` Umesh Nerlige Ramappa
2024-11-18 7:37 ` Riana Tauro [this message]
2024-11-18 23:32 ` Umesh Nerlige Ramappa
2024-11-13 4:55 ` [PATCH 7/7] drm/xe/pmu: Add PMU support for engine busyness Riana Tauro
2024-11-13 14:41 ` ✓ CI.Patch_applied: success for Add PMU support for single " Patchwork
2024-11-13 14:42 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-13 14:43 ` ✓ CI.KUnit: success " Patchwork
2024-11-13 14:55 ` ✓ CI.Build: " Patchwork
2024-11-13 14:57 ` ✗ CI.Hooks: failure " Patchwork
2024-11-13 14:59 ` ✓ CI.checksparse: success " Patchwork
2024-11-13 15:19 ` ✗ CI.BAT: failure " Patchwork
2024-11-13 21:22 ` ✓ CI.FULL: success " 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=8ceea4a6-96d2-432d-8375-73d968d068c4@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
--cc=rodrigo.vivi@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