Commit 79ee20dc authored by Mika Kuoppala's avatar Mika Kuoppala Committed by Daniel Vetter

drm/i915: pass seqno to i915_hangcheck_ring_idle

In preparation for next commit, pass seqno as a parameter
to i915_hangcheck_ring_idle as it will be used inside
i915_hangcheck_elapsed.
Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 526682e9
...@@ -2274,11 +2274,11 @@ ring_last_seqno(struct intel_ring_buffer *ring) ...@@ -2274,11 +2274,11 @@ ring_last_seqno(struct intel_ring_buffer *ring)
struct drm_i915_gem_request, list)->seqno; struct drm_i915_gem_request, list)->seqno;
} }
static bool i915_hangcheck_ring_idle(struct intel_ring_buffer *ring, bool *err) static bool i915_hangcheck_ring_idle(struct intel_ring_buffer *ring,
u32 ring_seqno, bool *err)
{ {
if (list_empty(&ring->request_list) || if (list_empty(&ring->request_list) ||
i915_seqno_passed(ring->get_seqno(ring, false), i915_seqno_passed(ring_seqno, ring_last_seqno(ring))) {
ring_last_seqno(ring))) {
/* Issue a wake-up to catch stuck h/w. */ /* Issue a wake-up to catch stuck h/w. */
if (waitqueue_active(&ring->irq_queue)) { if (waitqueue_active(&ring->irq_queue)) {
DRM_ERROR("Hangcheck timer elapsed... %s idle\n", DRM_ERROR("Hangcheck timer elapsed... %s idle\n",
...@@ -2395,7 +2395,10 @@ void i915_hangcheck_elapsed(unsigned long data) ...@@ -2395,7 +2395,10 @@ void i915_hangcheck_elapsed(unsigned long data)
memset(acthd, 0, sizeof(acthd)); memset(acthd, 0, sizeof(acthd));
idle = true; idle = true;
for_each_ring(ring, dev_priv, i) { for_each_ring(ring, dev_priv, i) {
idle &= i915_hangcheck_ring_idle(ring, &err); u32 seqno;
seqno = ring->get_seqno(ring, false);
idle &= i915_hangcheck_ring_idle(ring, seqno, &err);
acthd[i] = intel_ring_get_active_head(ring); acthd[i] = intel_ring_get_active_head(ring);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment