From d0301ece9e093c484f880893dc86d97848360892 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@redhat.com>
Date: Fri, 19 Nov 2010 18:50:57 +1000
Subject: [PATCH 2/2] drm-nouveau-evo-hang

On some GF8+ boards, the display engine will stop processing its push
buffer if a wrap-around occurs at a certain point.  The exact cause
is not known.

This patch by David Dillow (rhbz#537065) is a safe enough work-around
until it can be solved properly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
 drivers/gpu/drm/nouveau/nv50_display.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 11d366a..4e5402c 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -364,6 +364,7 @@ nv50_display_init(struct drm_device *dev)
 	nv_wr32(dev, 0x610300, nv_rd32(dev, 0x610300) & ~1);
 
 	evo->dma.max = (4096/4) - 2;
+	evo->dma.max &= ~7;
 	evo->dma.put = 0;
 	evo->dma.cur = evo->dma.put;
 	evo->dma.free = evo->dma.max - evo->dma.cur;
-- 
1.7.3.2

