drm/i915: Include a little more information about why ring init fails
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Apr 2014 08:19:44 +0000 (09:19 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 May 2014 07:08:40 +0000 (09:08 +0200)
If we include the expected values for the failing ring register checks,
it makes it marginally easier to see which is the culprit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 7d99e84f76a329964c40cea35caccece3c02a539..8a2bd5a7ea9f56276637ae937fdcec6e50c847af 100644 (file)
@@ -523,12 +523,11 @@ static int init_ring_common(struct intel_ring_buffer *ring)
                     I915_READ_START(ring) == i915_gem_obj_ggtt_offset(obj) &&
                     (I915_READ_HEAD(ring) & HEAD_ADDR) == 0, 50)) {
                DRM_ERROR("%s initialization failed "
-                               "ctl %08x head %08x tail %08x start %08x\n",
-                               ring->name,
-                               I915_READ_CTL(ring),
-                               I915_READ_HEAD(ring),
-                               I915_READ_TAIL(ring),
-                               I915_READ_START(ring));
+                         "ctl %08x (valid? %d) head %08x tail %08x start %08x [expected %08lx]\n",
+                         ring->name,
+                         I915_READ_CTL(ring), I915_READ_CTL(ring) & RING_VALID,
+                         I915_READ_HEAD(ring), I915_READ_TAIL(ring),
+                         I915_READ_START(ring), (unsigned long)i915_gem_obj_ggtt_offset(obj));
                ret = -EIO;
                goto out;
        }