[Intel-gfx] [PATCH 2/2] drm/i915/gt: Use the RPM config register to determine clk frequencies

Chris Wilson chris at chris-wilson.co.uk
Thu Apr 16 20:33:52 UTC 2020


Quoting Andi Shyti (2020-04-16 21:31:10)
> Hi Chris,
> 
> > For many configuration details within RC6 and RPS we are programming
> > intervals for the internal clocks. From gen11, these clocks are
> > configuration via the RPM_CONFIG and so for convenience, we would like
> > to convert to/from more natural units (ns).
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Andi Shyti <andi.shyti at intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/Makefile           |  1 +
> >  drivers/gpu/drm/i915/gt/debugfs_gt_pm.c | 27 +++++----
> >  drivers/gpu/drm/i915/gt/intel_gt_clk.c  | 76 +++++++++++++++++++++++++
> >  drivers/gpu/drm/i915/gt/intel_gt_clk.h  | 21 +++++++
> >  drivers/gpu/drm/i915/gt/intel_rps.c     | 37 +++++++-----
> >  drivers/gpu/drm/i915/gt/selftest_rps.c  |  6 +-
> >  drivers/gpu/drm/i915/i915_debugfs.c     | 34 +++++++----
> >  drivers/gpu/drm/i915/i915_reg.h         | 25 --------
> >  8 files changed, 161 insertions(+), 66 deletions(-)
> >  create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_clk.c
> >  create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_clk.h
> 
> I like the patch, it's a nice refactoring but the file name is
> misleading. When I see a *clk.[ch] file I think of a clock device
> rather than a set of utilities for frequency and interval
> conversion.
> 
> Can we call the file intel_gt_timing.[ch] or clk_utils.[ch]?

clk_utils.c

It started off with the idea of just doing the clock probing, but the
utility routines were more practical.
-Chris


More information about the Intel-gfx mailing list