Re: [PATCH] drm/i915: Take runtime pm reference on hangcheck_info

Chris Wilson
2015-02-05T10:25:07Z

On Thu, Feb 05, 2015 at 12:16:32PM +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, which brings in
> locking. As this debugfs entry is for debugging hangcheck behaviour,
> including locking problems, we need to be flexible on taking them.
>
> Try to see if we get a lock and if so, get seqno and actual head
> from hardware. If we don't have exclusive access, get lazy coherent
> seqno and print token acthd for which the user can see that the
> seqno is of different nature.
>
> Testcase: igt/pm_rpm/debugfs-read
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88910
> Tested-by: Ding Heng <hengx.ding@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>

It also has the nice effect of collating all the hw access into a single
block which makes it easier to spot the hw details vs bookkeeping. It
probably suggests we should reorder the output similarly?

Anyway,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

--
Chris Wilson, Intel Open Source Technology Centre