Message ID | 1423154508-24063-1-git-send-email-mika.kuoppala@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Feb 05, 2015 at 06:41:48PM +0200, Mika Kuoppala wrote: > We read the coherent current seqno and actual head from ring. > For hardware access we need to take runtime_pm reference. > > Get hardware specific values with runtime reference held > and print them first to emphasize hw state vs bookkeepping. > > v2: Reorder output according to hw access (Chris) > remove superfluous locking (Daniel) > > Testcase: igt/pm_rpm/debugfs-read > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88910 > Tested-by: Ding Heng <hengx.ding@intel.com> (v1) > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> I'm happy with that: Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5723
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -2 282/283 280/283
ILK 316/319 316/319
SNB 322/346 322/346
IVB 382/384 382/384
BYT 296/296 296/296
HSW +1-1 425/428 425/428
BDW 318/333 318/333
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
PNV igt_gen3_render_linear_blits FAIL(3, M7)CRASH(1, M23)PASS(4, M25M23) FAIL(1, M7)
PNV igt_gen3_render_mixed_blits FAIL(3, M7)PASS(1, M23) FAIL(1, M7)
PNV igt_gem_tiled_pread_pwrite FAIL(2, M7)PASS(1, M23) FAIL(1, M7)
*HSW igt_gem_pwrite_pread_uncached-copy-performance PASS(2, M20) DMESG_WARN(1, M20)
*HSW igt_pm_rpm_debugfs-read DMESG_WARN(3, M20) PASS(1, M20)
Note: You need to pay more attention to line start with '*'
On Thu, 05 Feb 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote: > On Thu, Feb 05, 2015 at 06:41:48PM +0200, Mika Kuoppala wrote: >> We read the coherent current seqno and actual head from ring. >> For hardware access we need to take runtime_pm reference. >> >> Get hardware specific values with runtime reference held >> and print them first to emphasize hw state vs bookkeepping. >> >> v2: Reorder output according to hw access (Chris) >> remove superfluous locking (Daniel) >> >> Testcase: igt/pm_rpm/debugfs-read >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88910 >> Tested-by: Ding Heng <hengx.ding@intel.com> (v1) >> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> > > I'm happy with that: > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Pushed to drm-intel-next-fixes, thanks for the patch and review. BR, Jani. > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9af17fb..2e1f723 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1223,8 +1223,11 @@ out: static int i915_hangcheck_info(struct seq_file *m, void *unused) { struct drm_info_node *node = m->private; - struct drm_i915_private *dev_priv = to_i915(node->minor->dev); + struct drm_device *dev = node->minor->dev; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine_cs *ring; + u64 acthd[I915_NUM_RINGS]; + u32 seqno[I915_NUM_RINGS]; int i; if (!i915.enable_hangcheck) { @@ -1232,6 +1235,15 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) return 0; } + intel_runtime_pm_get(dev_priv); + + for_each_ring(ring, dev_priv, i) { + seqno[i] = ring->get_seqno(ring, false); + acthd[i] = intel_ring_get_active_head(ring); + } + + intel_runtime_pm_put(dev_priv); + if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work)) { seq_printf(m, "Hangcheck active, fires in %dms\n", jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires - @@ -1242,14 +1254,14 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) for_each_ring(ring, dev_priv, i) { seq_printf(m, "%s:\n", ring->name); seq_printf(m, "\tseqno = %x [current %x]\n", - ring->hangcheck.seqno, ring->get_seqno(ring, false)); - seq_printf(m, "\taction = %d\n", ring->hangcheck.action); - seq_printf(m, "\tscore = %d\n", ring->hangcheck.score); + ring->hangcheck.seqno, seqno[i]); seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n", (long long)ring->hangcheck.acthd, - (long long)intel_ring_get_active_head(ring)); + (long long)acthd[i]); seq_printf(m, "\tmax ACTHD = 0x%08llx\n", (long long)ring->hangcheck.max_acthd); + seq_printf(m, "\tscore = %d\n", ring->hangcheck.score); + seq_printf(m, "\taction = %d\n", ring->hangcheck.action); } return 0;