From 9eaddb9d60d50832f5f4bb9aab5062708ef28b20 Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Wed, 25 Nov 2009 13:37:49 +0000 Subject: oopsy. don't fuck the offset when we wrap the ring with NOOPs. fixes the lockups for claudio. --- sys/dev/pci/drm/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 472f1647e66..e365ffd2b49 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -354,6 +354,8 @@ inteldrm_wrap_ring(struct drm_i915_private *dev_priv) inteldrm_wait_ring(dev_priv, rem) != 0) return; /* XXX */ + dev_priv->ring.space -= rem; + bus_space_set_region_4(dev_priv->bst, dev_priv->ring.bsh, dev_priv->ring.woffset, MI_NOOP, rem / 4); @@ -394,7 +396,7 @@ inteldrm_advance_ring(struct drm_i915_private *dev_priv) { INTELDRM_VPRINTF("%s: %x, %x\n", __func__, dev_priv->ring.wspace, dev_priv->ring.woffset); - I915_WRITE(PRB0_TAIL, dev_priv->ring.woffset); + I915_WRITE(PRB0_TAIL, dev_priv->ring.tail); } void -- cgit v1.2.3