Skip to contentSkip to conversation

commit 176f28eb breaks my Sandybridge

bisected Carl Worth 3 participants 5 messages Nov 4, 2010 – Nov 7, 2010

Subsystems (2)
lore
Share & tools
lore

Carl Worth

author
#0 lore raw

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 <[email protected]>
Date:   Thu Oct 28 11:18:07 2010 +0100

drm/i915/ringbuffer: Check that we setup the ringbuffer

drivers/gpu/drm/i915/intel_ringbuffer.c +3 -2
index 8eaa60c..e88214e 100644
@@ -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,
#1 lore raw
Quoted 8 lines · Carl Worth

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

Chris, what can I do to help debug what the correct solution is here?

Find a hw engineer, and ask him nicely why his ringbuffer registers return 0 *most* of the time. You can comment out the check as we have a workaround in place (auto-reporting of the HEAD) and under certain circumstances /sys/kernel/debug/dri/0/i915_*ringbuffer_info do report the correct values. I haven't worked out when they do report the correct values, it appears to be only when the rings themselves are busy (but not always). Having the error there was to make sure people noticed and I could find out just how many SNB revisions failed. I presume you have a rev 8?
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
author
#2 lore raw
Quoted 2 lines · Chris Wilson

Find a hw engineer, and ask him nicely why his ringbuffer registers return 0 *most* of the time.

Ugh.

Quoted 3 lines

Having the error there was to make sure people noticed and I could find out just how many SNB revisions failed. I presume you have a rev 8?

Yes, rev 8 here.

-Carl

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 6 lines · Carl Worth
Quoted 3 lines

Having the error there was to make sure people noticed and I could find out just how many SNB revisions failed. I presume you have a rev 8?

Yes, rev 8 here.

FYI, rev 9 desktop sandybridge doesn't show this issue so far. It just reads back correct values.

Signature · 3 lines
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 10 lines · Zhenyu Wang
Quoted 6 lines · Carl Worth
Quoted 3 lines

Having the error there was to make sure people noticed and I could find out just how many SNB revisions failed. I presume you have a rev 8?

Yes, rev 8 here.

FYI, rev 9 desktop sandybridge doesn't show this issue so far. It just reads back correct values.

Thanks, I've pushed a patch to -next to not throw an error for SNB rev <= 8 so those of us with the reticent hw can get back to finding bugs. -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre