drm/i915: Fix 945GM regression in e259befd
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Sep 2010 18:10:44 +0000 (19:10 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Sep 2010 09:30:57 +0000 (10:30 +0100)
A minor typo caused a single fence register to be incorrectly
programmed, resulting in occassional tiling corruption.

Reported-and-tested-by: Hans de Bruin <bruinjm@xs4all.nl>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18962
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
drivers/gpu/drm/i915/i915_gem.c

index cf4ffbee1c00633a809a624a165a359082386975..bced9b25c71e2bc5819c3b02dfde055909937323 100644 (file)
@@ -2400,7 +2400,7 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj)
                I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0);
                break;
        case 3:
-               if (obj_priv->fence_reg > 8)
+               if (obj_priv->fence_reg >= 8)
                        fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg - 8) * 4;
                else
        case 2: