Re: [PATCH] drm/i915: Show actual along side request frequency in debugfs/i915_rps_boost_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2018-10-02 12:02:26)
> 
> On 02/10/2018 09:36, Chris Wilson wrote:
> > Previously we hesitated in adding the hw probe for the actual GPU
> > frequency for rps_boost as it is quite cumbersome, but given some
> > surprising HW behaviour it would be useful to know both the RPS boost
> > state and the actual HW state in one location.
> > 
> > Reported-by: Tomi Sarvela <tomi.p.sarvela@xxxxxxxxx>
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > ---
> >   drivers/gpu/drm/i915/i915_debugfs.c | 19 +++++++++++++++++--
> >   1 file changed, 17 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index b4744a68cd88..ce17a53b3a66 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -2215,8 +2215,22 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
> >       struct drm_i915_private *dev_priv = node_to_i915(m->private);
> >       struct drm_device *dev = &dev_priv->drm;
> >       struct intel_rps *rps = &dev_priv->gt_pm.rps;
> > +     u32 act_freq = rps->cur_freq;
> >       struct drm_file *file;
> >   
> > +     if (intel_runtime_pm_get_if_in_use(dev_priv)) {
> > +             if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
> > +                     mutex_lock(&dev_priv->pcu_lock);
> > +                     act_freq = vlv_punit_read(dev_priv,
> > +                                               PUNIT_REG_GPU_FREQ_STS);
> 
> There is another read site for this reg which right shifts and masks 
> before passing to intel_gpu_freq. Who is right and who is wrong? :)

Considering that's where I copied from... Oops.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux