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)); } -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx