From: sashiko-bot@kernel.org
To: "Vinay Belgaumkar" <vinay.belgaumkar@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6 2/2] drm/xe: Add sysfs to disable RPe
Date: Fri, 20 Nov 2026 23:04:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-226330@kernel.org> (raw)
In-Reply-To: <20261120225325.1460380-4-vinay.belgaumkar@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/xe: xe_guc_pc_get_min_freq_locked() ignores use_rpe
during MERT cap
--
commit 88335a79a8611de6a26a511f88173660a4613fa6
Author: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
drm/xe: Add sysfs to disable RPe
This commit adds a use_rpe sysfs attribute to control SLPC efficient
frequency elevation and disables RPe before stashing the minimum frequency
in pc_set_mert_freq_cap().
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index 7cbdb7985843d..2d4ae5bb48761 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
[ ... ]
> @@ -1103,12 +1120,23 @@ void xe_guc_pc_remove_flush_freq_limit(struct xe_guc_pc *pc)
> static int pc_set_mert_freq_cap(struct xe_guc_pc *pc)
> {
> int ret;
> + u32 mert_freq_cap;
>
> if (!XE_GT_WA(pc_to_gt(pc), 22019338487))
> return 0;
>
> guard(mutex)(&pc->freq_lock);
>
> + /*
> + * Disable the RPe floor so the min queried below reflects the real
> + * underlying minimum (RPn or user_requested_min) instead of a value
> + * GuC may have elevated to RPe. This stays disabled until
> + * xe_guc_pc_restore_stashed_freq() reinstates it.
> + */
> + ret = pc_set_ignore_eff_freq(pc, 1);
> + if (ret)
> + return ret;
> +
> /*
> * Get updated min/max and stash them.
> */
[Severity: Medium]
Does xe_guc_pc_get_min_freq_locked() report the un-elevated minimum
frequency instead of RPe while pc->mert_freq_cap_active and pc->use_rpe are
both true?
Because pc_set_mert_freq_cap() now disables RPe before querying
pc->stashed_min_freq, and pc_set_min_freq() no longer disables RPe when a
frequency below RPe is requested, both pc->stashed_min_freq and
pc->user_requested_min can be below RPe while pc->use_rpe is true. During
the MERT cap window, xe_guc_pc_get_min_freq_locked() returns that raw
value:
drivers/gpu/drm/xe/xe_guc_pc.c:xe_guc_pc_get_min_freq_locked() {
...
/* In the middle of a temporary freq cap, return stashed value */
if (XE_GT_WA(pc_to_gt(pc), 22019338487) && pc->mert_freq_cap_active) {
*freq = pc->user_requested_min ?: pc->stashed_min_freq;
return 0;
}
...
}
Reading min_freq via sysfs while the cap is active therefore returns the
un-elevated minimum (such as RPn) and then jumps back up to RPe once
xe_guc_pc_restore_stashed_freq() restores ignore_eff_freq and clears
pc->mert_freq_cap_active.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120225325.1460380-3-vinay.belgaumkar@intel.com?part=2
next prev parent reply other threads:[~2026-11-20 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 22:53 [PATCH v6 1/2] drm/xe: Disallow freq changes while mert cap is active Vinay Belgaumkar
2026-11-20 22:53 ` [PATCH v6 2/2] drm/xe: Add sysfs to disable RPe Vinay Belgaumkar
2026-11-20 23:04 ` sashiko-bot [this message]
2026-11-20 23:12 ` ✓ CI.KUnit: success for series starting with [v6,1/2] drm/xe: Disallow freq changes while mert cap is active 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=sashiko-outbox-226330@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--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