Commit 6fd0d56e authored by Chris Wilson's avatar Chris Wilson

drm/i915/ringbuffer: Only print an error on the second attempt to reset head

There's not much we can do here but hope for the best. However the first
failure happens quite frequently and if often remedied by the second
attempt to reset HEAD. So only print the error if that attempt also
fails.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=19802Reported-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
parent bbf0c6b3
...@@ -156,7 +156,7 @@ static int init_ring_common(struct drm_device *dev, ...@@ -156,7 +156,7 @@ static int init_ring_common(struct drm_device *dev,
/* G45 ring initialization fails to reset head to zero */ /* G45 ring initialization fails to reset head to zero */
if (head != 0) { if (head != 0) {
DRM_ERROR("%s head not reset to zero " DRM_DEBUG_KMS("%s head not reset to zero "
"ctl %08x head %08x tail %08x start %08x\n", "ctl %08x head %08x tail %08x start %08x\n",
ring->name, ring->name,
I915_READ_CTL(ring), I915_READ_CTL(ring),
...@@ -166,7 +166,8 @@ static int init_ring_common(struct drm_device *dev, ...@@ -166,7 +166,8 @@ static int init_ring_common(struct drm_device *dev,
I915_WRITE_HEAD(ring, 0); I915_WRITE_HEAD(ring, 0);
DRM_ERROR("%s head forced to zero " if (I915_READ_HEAD(ring) & HEAD_ADDR) {
DRM_ERROR("failed to set %s head to zero "
"ctl %08x head %08x tail %08x start %08x\n", "ctl %08x head %08x tail %08x start %08x\n",
ring->name, ring->name,
I915_READ_CTL(ring), I915_READ_CTL(ring),
...@@ -174,6 +175,7 @@ static int init_ring_common(struct drm_device *dev, ...@@ -174,6 +175,7 @@ static int init_ring_common(struct drm_device *dev,
I915_READ_TAIL(ring), I915_READ_TAIL(ring),
I915_READ_START(ring)); I915_READ_START(ring));
} }
}
I915_WRITE_CTL(ring, I915_WRITE_CTL(ring,
((ring->gem_object->size - PAGE_SIZE) & RING_NR_PAGES) ((ring->gem_object->size - PAGE_SIZE) & RING_NR_PAGES)
......
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