From: Riana Tauro <riana.tauro@intel.com>
To: "Nilawar, Badal" <badal.nilawar@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <vinay.belgaumkar@intel.com>,
<matthew.d.roper@intel.com>
Subject: Re: [PATCH v3 1/2] drm/xe/xe_gt_idle: store powergate enable bits in gtidle
Date: Thu, 1 Aug 2024 18:40:18 +0530 [thread overview]
Message-ID: <fbc79914-d4cd-46bb-be28-7dc49c470467@intel.com> (raw)
In-Reply-To: <cfcf0bd5-6f45-4f82-9619-a5ca8dbc5e25@intel.com>
On 8/1/2024 3:37 PM, Nilawar, Badal wrote:
>
>
> On 01-08-2024 15:23, Riana Tauro wrote:
>> Have a copy of the value written to powergate enable
>> register. No functional changes
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_idle.c | 18 ++++++++++--------
>> drivers/gpu/drm/xe/xe_gt_idle_types.h | 2 ++
>> 2 files changed, 12 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c
>> b/drivers/gpu/drm/xe/xe_gt_idle.c
>> index 67aba4140510..7188542aea43 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_idle.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_idle.c
>> @@ -98,7 +98,7 @@ static u64 get_residency_ms(struct xe_gt_idle
>> *gtidle, u64 cur_residency)
>> void xe_gt_idle_enable_pg(struct xe_gt *gt)
>> {
>> struct xe_device *xe = gt_to_xe(gt);
>> - u32 pg_enable;
>> + struct xe_gt_idle *gtidle = >->gtidle;
>> int i, j;
>> if (IS_SRIOV_VF(xe))
>> @@ -110,12 +110,12 @@ void xe_gt_idle_enable_pg(struct xe_gt *gt)
>> xe_device_assert_mem_access(gt_to_xe(gt));
>> - pg_enable = RENDER_POWERGATE_ENABLE | MEDIA_POWERGATE_ENABLE;
>> + gtidle->powergate_enable = RENDER_POWERGATE_ENABLE |
>> MEDIA_POWERGATE_ENABLE;
> Here I think we should have platform check. Like on MTL, LNL RPG
> applicable for only for GT (GT0) and Media PG is applicable only for
> Media GT (GT1) ?
We cannot have platform check for this as its applicable even for
products that do not have a separate media gt
Thanks,
Riana
>
> Regards,
> Badal
>> for (i = XE_HW_ENGINE_VCS0, j = 0; i <= XE_HW_ENGINE_VCS7; ++i,
>> ++j) {
>> if ((gt->info.engine_mask & BIT(i)))
>> - pg_enable |= (VDN_HCP_POWERGATE_ENABLE(j) |
>> - VDN_MFXVDENC_POWERGATE_ENABLE(j));
>> + gtidle->powergate_enable |= (VDN_HCP_POWERGATE_ENABLE(j) |
>> + VDN_MFXVDENC_POWERGATE_ENABLE(j));
>> }
>> XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
>> @@ -128,20 +128,22 @@ void xe_gt_idle_enable_pg(struct xe_gt *gt)
>> xe_mmio_write32(gt, RENDER_POWERGATE_IDLE_HYSTERESIS, 25);
>> }
>> - xe_mmio_write32(gt, POWERGATE_ENABLE, pg_enable);
>> + xe_mmio_write32(gt, POWERGATE_ENABLE, gtidle->powergate_enable);
>> XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FW_GT));
>> }
>> void xe_gt_idle_disable_pg(struct xe_gt *gt)
>> {
>> + struct xe_gt_idle *gtidle = >->gtidle;
>> +
>> if (IS_SRIOV_VF(gt_to_xe(gt)))
>> return;
>> xe_device_assert_mem_access(gt_to_xe(gt));
>> - XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
>> -
>> - xe_mmio_write32(gt, POWERGATE_ENABLE, 0);
>> + gtidle->powergate_enable = 0;
>> + XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
>> + xe_mmio_write32(gt, POWERGATE_ENABLE, gtidle->powergate_enable);
>> XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FW_GT));
>> }
>> diff --git a/drivers/gpu/drm/xe/xe_gt_idle_types.h
>> b/drivers/gpu/drm/xe/xe_gt_idle_types.h
>> index f99b447534f3..7a8e63f2ebcc 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_idle_types.h
>> +++ b/drivers/gpu/drm/xe/xe_gt_idle_types.h
>> @@ -23,6 +23,8 @@ enum xe_gt_idle_state {
>> struct xe_gt_idle {
>> /** @name: name */
>> char name[16];
>> + /** powergate_enable: copy of powergate enable bits*/
>> + u32 powergate_enable;
>> /** @residency_multiplier: residency multiplier in ns */
>> u32 residency_multiplier;
>> /** @cur_residency: raw driver copy of idle residency */
next prev parent reply other threads:[~2024-08-01 13:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 9:53 [PATCH v3 0/2] drm/xe/xe_gt_idle: add debugfs entry for powergating info Riana Tauro
2024-08-01 9:45 ` ✓ CI.Patch_applied: success for drm/xe/xe_gt_idle: add debugfs entry for powergating info (rev3) Patchwork
2024-08-01 9:45 ` ✓ CI.checkpatch: " Patchwork
2024-08-01 9:46 ` ✓ CI.KUnit: " Patchwork
2024-08-01 9:53 ` [PATCH v3 1/2] drm/xe/xe_gt_idle: store powergate enable bits in gtidle Riana Tauro
2024-08-01 10:07 ` Nilawar, Badal
2024-08-01 13:10 ` Riana Tauro [this message]
2024-08-06 11:18 ` Nilawar, Badal
2024-08-01 9:53 ` [PATCH v3 2/2] drm/xe/xe_gt_idle: add debugfs entry for powergating info Riana Tauro
2024-08-01 10:03 ` Nilawar, Badal
2024-08-01 13:16 ` Riana Tauro
2024-08-06 11:59 ` Nilawar, Badal
2024-08-20 10:34 ` Riana Tauro
2024-08-21 6:54 ` Nilawar, Badal
2024-08-01 9:58 ` ✓ CI.Build: success for drm/xe/xe_gt_idle: add debugfs entry for powergating info (rev3) Patchwork
2024-08-01 10:00 ` ✗ CI.Hooks: failure " Patchwork
2024-08-01 10:01 ` ✓ CI.checksparse: success " Patchwork
2024-08-01 10:21 ` ✓ CI.BAT: " Patchwork
2024-08-01 11:35 ` ✗ 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=fbc79914-d4cd-46bb-be28-7dc49c470467@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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