(In reply to comment #45)
> (In reply to comment #44)
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index 5a74986348c6..b46b3e928a7f 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -530,6 +530,17 @@ static int init_ring_common(struct intel_ring_buffer
> > *ring)
> > ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
> > | RING_VALID);
> >
> > + if (I915_READ_START(ring) != i915_gem_obj_ggtt_offset(obj)) {
> > + printk(KERN_ERR
> > + "%s initialization failed"
> > + " [%08x != %08x], fudging\n",
> > + ring->name,
> > + I915_READ_START(ring),
> > + i915_gem_obj_ggtt_offset(obj));
> > + I915_WRITE_START(ring, i915_gem_obj_ggtt_offset(obj));
> > + POSTING_READ(ring);
> > + }
> > +
> > iowrite32(MI_NOOP, ring->virtual_start + 0);
> > iowrite32(MI_NOOP, ring->virtual_start + 4);
> > ring->write_tail(ring, 8);
>
> What is a baseline I should apply this on top of, please? The surrounding
> code in my tree (with all the patches provided so far apples) is
>
> [ ... ]
> I915_WRITE_CTL(ring,
> ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
> | RING_VALID);
> if (wait_for(I915_READ_CTL(ring) & RING_VALID, 1000)) {
> DRM_ERROR("%s initialization failed ctl %08x (valid? %d)\n",
> ring->name,
> I915_READ_CTL(ring),
> !!(I915_READ_CTL(ring) & RING_VALID));
> ret = -EIO;
> goto out;
> }
> I915_WRITE_HEAD(ring, 0);
> ring->write_tail(ring, 0);
>
> iowrite32(MI_NOOP, ring->virtual_start + 0);
> iowrite32(MI_NOOP, ring->virtual_start + 4);
> ring->write_tail(ring, 8);
> [ ... ]
>
> (i.e. it has the extra I915_WRITE_HEAD(ring, 0); ring->write_tail(ring, 0);,
> etc).
>
> I can of course easily apply the hunk just between the
>
> ring->write_tail(ring, 0);
>
> and
>
> iowrite32(MI_NOOP, ring->virtual_start + 0);
>
> if that's what you want me to do.
>
> Thanks.
Sorry, I threw away the preceding hack to try and keep the diff clean. Just plonk the write to set HEAD again after setting CTRL (and the wait_for(CTRL) if you have that).
Hmm, it appears we have drifted slightly in our assortment of patches, let me push my current collection of hacks so we can rebase.
(In reply to comment #45) gpu/drm/ i915/intel_ ringbuffer. c gpu/drm/ i915/intel_ ringbuffer. c .b46b3e928a7f 100644 gpu/drm/ i915/intel_ ringbuffer. c gpu/drm/ i915/intel_ ringbuffer. c common( struct intel_ring_buffer START(ring) != i915_gem_ obj_ggtt_ offset( obj)) { START(ring) , obj_ggtt_ offset( obj)); START(ring, i915_gem_ obj_ggtt_ offset( obj)); tail(ring, 8); CTL(ring, I915_READ_ CTL(ring) & RING_VALID, 1000)) { CTL(ring) , READ_CTL( ring) & RING_VALID)); HEAD(ring, 0); tail(ring, 0); tail(ring, 8); HEAD(ring, 0); ring->write_ tail(ring, 0);, tail(ring, 0);
> (In reply to comment #44)
> > diff --git a/drivers/
> > b/drivers/
> > index 5a74986348c6.
> > --- a/drivers/
> > +++ b/drivers/
> > @@ -530,6 +530,17 @@ static int init_ring_
> > *ring)
> > ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
> > | RING_VALID);
> >
> > + if (I915_READ_
> > + printk(KERN_ERR
> > + "%s initialization failed"
> > + " [%08x != %08x], fudging\n",
> > + ring->name,
> > + I915_READ_
> > + i915_gem_
> > + I915_WRITE_
> > + POSTING_READ(ring);
> > + }
> > +
> > iowrite32(MI_NOOP, ring->virtual_start + 0);
> > iowrite32(MI_NOOP, ring->virtual_start + 4);
> > ring->write_
>
> What is a baseline I should apply this on top of, please? The surrounding
> code in my tree (with all the patches provided so far apples) is
>
> [ ... ]
> I915_WRITE_
> ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
> | RING_VALID);
> if (wait_for(
> DRM_ERROR("%s initialization failed ctl %08x (valid? %d)\n",
> ring->name,
> I915_READ_
> !!(I915_
> ret = -EIO;
> goto out;
> }
> I915_WRITE_
> ring->write_
>
> iowrite32(MI_NOOP, ring->virtual_start + 0);
> iowrite32(MI_NOOP, ring->virtual_start + 4);
> ring->write_
> [ ... ]
>
> (i.e. it has the extra I915_WRITE_
> etc).
>
> I can of course easily apply the hunk just between the
>
> ring->write_
>
> and
>
> iowrite32(MI_NOOP, ring->virtual_start + 0);
>
> if that's what you want me to do.
>
> Thanks.
Sorry, I threw away the preceding hack to try and keep the diff clean. Just plonk the write to set HEAD again after setting CTRL (and the wait_for(CTRL) if you have that).
Hmm, it appears we have drifted slightly in our assortment of patches, let me push my current collection of hacks so we can rebase.