Re: [PATCH] drm/i915: Update forcewake ack register used in debugfs

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

 



Quoting Chris Wilson (2017-12-22 22:19:01)
> Quoting Oscar Mateo (2017-12-22 22:10:00)
> > Different GENs have a different ACK register. Use the correct
> > one for each case.
> > 
> > Suggested-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> > Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
> > Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index e968aea..36f40ab 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -1465,8 +1465,21 @@ static int gen6_drpc_info(struct seq_file *m)
> >                 seq_puts(m, "RC information inaccurate because somebody "
> >                             "holds a forcewake reference \n");
> >         } else {
> > +               i915_reg_t reg_ack;
> > +
> > +               if (INTEL_GEN(dev_priv) >= 9)
> > +                       reg_ack = FORCEWAKE_ACK_RENDER_GEN9;
> > +               else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> > +                       reg_ack = FORCEWAKE_ACK_VLV;
> > +               else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
> > +                       reg_ack = FORCEWAKE_ACK_HSW;
> > +               else if (IS_IVYBRIDGE(dev_priv))
> > +                       reg_ack = FORCEWAKE_MT_ACK;
> > +               else
> > +                       reg_ack = FORCEWAKE_ACK;
> > +
> >                 /* NB: we cannot use forcewake, else we read the wrong values */
> > -               while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
> > +               while (count++ < 50 && (I915_READ_NOTRACE(reg_ack) & 1))
> >                         udelay(10);
> >                 seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));
> 
> Just delete the code. It's telling us whether we have forcewake enabled,
> which is the same as what the status register will tell us. Since it
> doesn't lock out fw anyway, it is worse than useless as it is
> misleading.

Further to the argument of just delete it, we aren't even checking the
right bits for MT forcewake (for the "accurate" picture).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux