From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/pmu: Use correct requested freq for SLPC
Date: Tue, 07 Mar 2023 21:36:47 -0800 [thread overview]
Message-ID: <87ilfbn6s0.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <6c005534-9919-aad7-eb6c-fba0c8e12448@linux.intel.com>
On Mon, 06 Mar 2023 03:10:24 -0800, Tvrtko Ursulin wrote:
>
Hi Tvrtko,
> On 04/03/2023 01:27, Ashutosh Dixit wrote:
> > SLPC does not use 'struct intel_rps'. Use UNSLICE_RATIO bits from
>
> Would it be more accurate to say 'SLPC does not use rps->cur_freq' rather
> than it not using struct intel_rps?
No actually SLPC maintains a separate 'struct intel_guc_slpc' and does not
use 'struct intel_rps' at all so all of 'struct intel_rps' is 0.
> Fixes: / stable ? CI chances of catching this?
Same issue as Patch 1, I have answered this there.
> > GEN6_RPNSWREQ for SLPC. See intel_rps_get_requested_frequency.
> >
> > Bspec: 52745
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_pmu.c | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> > index f0a1e36915b8..5ee836610801 100644
> > --- a/drivers/gpu/drm/i915/i915_pmu.c
> > +++ b/drivers/gpu/drm/i915/i915_pmu.c
> > @@ -394,8 +394,13 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)
> > * frequency. Fortunately, the read should rarely fail!
> > */
> > val = intel_rps_get_cagf(rps, intel_rps_read_rpstat_fw(rps));
> > - if (!val)
> > - val = rps->cur_freq;
> > + if (!val) {
> > + if (intel_uc_uses_guc_slpc(>->uc))
> > + val = intel_rps_read_punit_req(rps) >>
> > + GEN9_SW_REQ_UNSLICE_RATIO_SHIFT;
> > + else
> > + val = rps->cur_freq;
> > + }
>
> That's a bunch of duplication from intel_rps.c so perhaps the appropriate
> helpers should be exported (some way) from there.
This is also addressed in the new series:
https://patchwork.freedesktop.org/series/114814/
> > add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT],
> > intel_gpu_freq(rps, val), period_ns / 1000);
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2023-03-08 5:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 1:27 [Intel-gfx] [PATCH 0/2] drm/i915/pmu: Freq sampling: Fix requested freq fallback Ashutosh Dixit
2023-03-04 1:27 ` [Intel-gfx] [PATCH 1/2] drm/i915/pmu: Use only freq bits for falling back to requested freq Ashutosh Dixit
2023-03-06 11:04 ` Tvrtko Ursulin
2023-03-08 5:36 ` Dixit, Ashutosh
2023-03-08 10:40 ` Tvrtko Ursulin
2023-03-04 1:27 ` [Intel-gfx] [PATCH 2/2] drm/i915/pmu: Use correct requested freq for SLPC Ashutosh Dixit
2023-03-06 11:10 ` Tvrtko Ursulin
2023-03-08 5:36 ` Dixit, Ashutosh [this message]
2023-03-08 10:52 ` Tvrtko Ursulin
2023-03-04 2:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pmu: Freq sampling: Fix requested freq fallback Patchwork
2023-03-06 22:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87ilfbn6s0.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.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