[Intel-gfx] [PATCH] drm/i915: Update forcewake ack register used in debugfs
Chris Wilson
chris at chris-wilson.co.uk
Sat Dec 23 10:23:21 UTC 2017
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 at intel.com>
> > Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> > Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> > ---
> > 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
More information about the Intel-gfx
mailing list