aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-07 06:50:02 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-07 08:19:40 -0500
commit629e894173c9de589913cf649deaadec4b0579bd (patch)
tree151112b1646ae39b6a0ccfa755158938b606f3f1 /drivers/gpu/drm/i915/intel_ringbuffer.c
parentae69b42a10dafe61adb016e0e52ec1e8d1ba11b4 (diff)
drm/i915/ringbuffer: Ignore failure to setup the ring on Sandybridge
The ring buffer registers return 0 whilst idle (for some values of idle) on early Sandybridge hw. Persevere even when all appears hopeless... Fortunately the head auto-reporting prevents most hangs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31370 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 9033697783b9..f5d6151c953f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -180,14 +180,30 @@ static int init_ring_common(struct intel_ring_buffer *ring)
180 if ((I915_READ_CTL(ring) & RING_VALID) == 0 || 180 if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
181 I915_READ_START(ring) != obj_priv->gtt_offset || 181 I915_READ_START(ring) != obj_priv->gtt_offset ||
182 (I915_READ_HEAD(ring) & HEAD_ADDR) != 0) { 182 (I915_READ_HEAD(ring) & HEAD_ADDR) != 0) {
183 DRM_ERROR("%s initialization failed " 183 if (IS_GEN6(ring->dev) && ring->dev->pdev->revision <= 8) {
184 "ctl %08x head %08x tail %08x start %08x\n", 184 /* Early revisions of Sandybridge do not like
185 ring->name, 185 * revealing the contents of the ring buffer
186 I915_READ_CTL(ring), 186 * registers whilst idle. Fortunately, the
187 I915_READ_HEAD(ring), 187 * auto-reporting mechanism prevents most hangs,
188 I915_READ_TAIL(ring), 188 * but this will bite us eventually...
189 I915_READ_START(ring)); 189 */
190 return -EIO; 190 DRM_DEBUG("%s initialization failed "
191 "ctl %08x head %08x tail %08x start %08x. Ignoring, hope for the best!\n",
192 ring->name,
193 I915_READ_CTL(ring),
194 I915_READ_HEAD(ring),
195 I915_READ_TAIL(ring),
196 I915_READ_START(ring));
197 } else {
198 DRM_ERROR("%s initialization failed "
199 "ctl %08x head %08x tail %08x start %08x\n",
200 ring->name,
201 I915_READ_CTL(ring),
202 I915_READ_HEAD(ring),
203 I915_READ_TAIL(ring),
204 I915_READ_START(ring));
205 return -EIO;
206 }
191 } 207 }
192 208
193 if (!drm_core_check_feature(ring->dev, DRIVER_MODESET)) 209 if (!drm_core_check_feature(ring->dev, DRIVER_MODESET))