[Bug 99671] [v4.10 snb] weird seqno/request tracking

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 3 21:56:37 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99671

--- Comment #34 from Chris Wilson <chris at chris-wilson.co.uk> ---
dmesg & error are just what I need. (If I need anything else, the goal is to
add it to the error state.)

Onto the next theory, a few more asserts:

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c
b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 4ffa35f..5a7c140 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -44,6 +44,7 @@ static int __intel_ring_space(int head, int tail, int size)
        int space = head - tail;
        if (space <= 0)
                space += size;
+       GEM_BUG_ON(space <= I915_RING_FREE_SPACE);
        return space - I915_RING_FREE_SPACE;
 }

@@ -1682,6 +1683,8 @@ u32 *intel_ring_begin(struct drm_i915_gem_request *req,
int num_dwords)
                wait_bytes = total_bytes;
        }

+       GEM_BUG_ON(ring->space > __intel_ring_space(ring->head & HEAD_ADDR,
+                                                   ring->tail, ring->size));
        if (wait_bytes > ring->space) {
                int ret = wait_for_space(req, wait_bytes);
                if (unlikely(ret))
@@ -1698,6 +1701,7 @@ u32 *intel_ring_begin(struct drm_i915_gem_request *req,
int num_dwords)
                ring->space -= remain_actual;
        }

+       GEM_BUG_ON(bytes > ring->space);
        GEM_BUG_ON(ring->tail > ring->size - bytes);
        cs = ring->vaddr + ring->tail;
        ring->tail += bytes;

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20170303/8a44f0c1/attachment.html>


More information about the intel-gfx-bugs mailing list