From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/rps: Centralize computation of freq caps
Date: Tue, 22 Mar 2022 11:55:29 -0700 [thread overview]
Message-ID: <87ils5lsv2.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220321181746.lg2rafbfvilfvfop@ldmartin-desk2>
On Mon, 21 Mar 2022 11:17:46 -0700, Lucas De Marchi wrote:
>
> On Mon, Mar 21, 2022 at 10:56:04AM -0700, Ashutosh Dixit wrote:
> > diff --git a/drivers/gpu/drm/i915/gt/intel_rps_types.h b/drivers/gpu/drm/i915/gt/intel_rps_types.h
> > index 3941d8551f52..5990df35b393 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_rps_types.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_rps_types.h
> > @@ -37,6 +37,13 @@ enum {
> > INTEL_RPS_TIMER,
> > };
> >
> > +/* Freq caps exposed by HW, in units of 16.67 MHz for recent gens */
>
> "recent gens" is probably too broad. Since we are exporting this struct
> to other parts of the driver and we are already abstracting the
> register location and bit position, maybe we should also already
> abstract the unit in the same place? i.e. just make it always be
> "units of 16.67 MHz", or even just make it a standard Hz unit.
>
> If this would rather make things more complicated for places that expect
> "hw units", then maybe just say in this comment the value is in "HW
> units" and intel_gpu_freq() should be used to convert to hz.
Fixed in v2. In v2 I've changed the comment to say values are in "hw units"
and intel_gpu_freq() should be used to convert to MHz.
I have also added a couple of hopefully clarifying comments to
intel_rps_get_freq_caps() in v2. Some of the history of this code was not
clear to me previously and I had to trace all the way back to cee991cb9323
to figure out what is happening.
Thanks.
--
Ashutosh
> > +struct intel_rps_freq_caps {
> > + u8 rp0_freq; /* Non-overclocked max frequency. */
> > + u8 rp1_freq; /* "less than" RP0 power/freqency */
> > + u8 min_freq; /* AKA RPn. Minimum frequency */
> > +};
> > +
> > struct intel_rps {
> > struct mutex lock; /* protects enabling and the worker */
> >
next prev parent reply other threads:[~2022-03-22 18:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 17:56 [Intel-gfx] [PATCH] drm/i915/rps: Centralize computation of freq caps Ashutosh Dixit
2022-03-21 18:17 ` Lucas De Marchi
2022-03-21 19:12 ` Dixit, Ashutosh
2022-03-22 18:55 ` Dixit, Ashutosh [this message]
2022-03-22 0:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-03-22 0:07 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-03-22 0:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-22 12:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2022-03-22 18:56 [Intel-gfx] [PATCH] " Ashutosh Dixit
2022-03-23 7:03 ` Nilawar, Badal
2022-03-23 19:56 ` Dixit, Ashutosh
2022-03-22 21:06 Ashutosh Dixit
2022-03-23 19:54 Ashutosh Dixit
2022-03-29 3:59 ` Nilawar, Badal
2022-04-06 10:09 ` Anshuman Gupta
2022-04-06 19:22 ` Dixit, Ashutosh
2022-04-06 19:18 Ashutosh Dixit
2022-04-07 13:22 ` Gupta, Anshuman
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=87ils5lsv2.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.