Skip to content

Commit 44cdd6d

Browse files
johnharr-inteldanvet
authored andcommitted
drm/i915: Convert 'ring_idle()' to use requests not seqnos
More seqno value to request structure conversions. Note, this change temporarily moves the 'get_seqno()' call inside ring_idle() but this will disappear again in a later patch when i915_seqno_passed() itself is converted. For: VIZ-4377 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 74328ee commit 44cdd6d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drivers/gpu/drm/i915/i915_irq.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,18 +2749,19 @@ static void gen8_disable_vblank(struct drm_device *dev, int pipe)
27492749
spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
27502750
}
27512751

2752-
static u32
2753-
ring_last_seqno(struct intel_engine_cs *ring)
2752+
static struct drm_i915_gem_request *
2753+
ring_last_request(struct intel_engine_cs *ring)
27542754
{
27552755
return list_entry(ring->request_list.prev,
2756-
struct drm_i915_gem_request, list)->seqno;
2756+
struct drm_i915_gem_request, list);
27572757
}
27582758

27592759
static bool
2760-
ring_idle(struct intel_engine_cs *ring, u32 seqno)
2760+
ring_idle(struct intel_engine_cs *ring)
27612761
{
27622762
return (list_empty(&ring->request_list) ||
2763-
i915_seqno_passed(seqno, ring_last_seqno(ring)));
2763+
i915_seqno_passed(ring->get_seqno(ring, false),
2764+
i915_gem_request_get_seqno(ring_last_request(ring))));
27642765
}
27652766

27662767
static bool
@@ -2980,7 +2981,7 @@ static void i915_hangcheck_elapsed(unsigned long data)
29802981
acthd = intel_ring_get_active_head(ring);
29812982

29822983
if (ring->hangcheck.seqno == seqno) {
2983-
if (ring_idle(ring, seqno)) {
2984+
if (ring_idle(ring)) {
29842985
ring->hangcheck.action = HANGCHECK_IDLE;
29852986

29862987
if (waitqueue_active(&ring->irq_queue)) {

0 commit comments

Comments
 (0)