From: Carl Worth Subject: [bisected] commit 176f28eb breaks my Sandybridge Date: Thu, 04 Nov 2010 16:03:45 -0700 Message-ID: <87k4kspu7i.fsf@yoom.home.cworth.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from olra.theworths.org (u15218177.onlinehome-server.com [74.208.220.233]) by gabe.freedesktop.org (Postfix) with ESMTP id AC6159E759 for ; Thu, 4 Nov 2010 16:03:57 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org The commit below causes my Sandybridge system to fail at initial KMS initialization: Aug 27 18:58:04 livid kernel: [ 9.099032] i915 0000:00:02.0: irq 42 for MSI/M SI-X Aug 27 18:58:04 livid kernel: [ 9.099086] [drm:init_ring_common] *ERROR* render ring initialization failed ctl 00000000 head 00000000 tail 00000000 start 00000000 Aug 27 18:58:04 livid kernel: [ 9.099266] [drm:i915_driver_load] *ERROR* failed to init modeset Aug 27 18:58:04 livid kernel: [ 9.110257] PM: Removing info for No Bus:card0 Aug 27 18:58:04 livid kernel: [ 9.110304] PM: Removing info for No Bus:controlD64 Aug 27 18:58:04 livid kernel: [ 9.110326] i915: probe of 0000:00:02.0 failed with error -5 [Ignore the date/time---that really was from a boot today.] Chris, what can I do to help debug what the correct solution is here? -Carl commit 176f28ebf4303b4f7e3a5bd8be7842a8bbecd9c3 Author: Chris Wilson Date: Thu Oct 28 11:18:07 2010 +0100 drm/i915/ringbuffer: Check that we setup the ringbuffer Signed-off-by: Chris Wilson diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/inte index 8eaa60c..e88214e 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -176,9 +176,10 @@ static int init_ring_common(struct intel_ring_buffer *ring) ((ring->gem_object->size - PAGE_SIZE) & RING_NR_PAGES) | RING_NO_REPORT | RING_VALID); - head = I915_READ_HEAD(ring) & HEAD_ADDR; /* If the head is still not zero, the ring is dead */ - if (head != 0) { + if ((I915_READ_CTL(ring) & RING_VALID) == 0 || + I915_READ_START(ring) != obj_priv->gtt_offset || + (I915_READ_HEAD(ring) & HEAD_ADDR) != 0) { DRM_ERROR("%s initialization failed " "ctl %08x head %08x tail %08x start %08x\n", ring->name,