Comment 15 for bug 583760

Revision history for this message
John Clemens (clemej) wrote : Re: Mouse cursor dissappears with nouveau

Still occurring with the latest Natty.

Fedora is now including the work around patch in their stock kernels (called drm-nouveau-evo-hang.patch). I've been running this patch on top of the stock ubuntu kernels for months now with no negative side effect. The impact of the patch is low, as its with an experimental driver anyway. Without it, the system becomes nearly unusable when enough cursor hides/unhides happen which cause the buffer to wrap. The only thing the workaround does is shrink the size of the buffer by a few entries.

While I would like a real fix, one doesn't appear to be coming from upstream anytime soon. The impact is low, the benefits are high, its an isolated patch that will only affect users with that hardware. Can we -please- get this workaround patch into a natty kernel update, or, at the very least into oneric's(sp?) kernel?

The patch ported from fedora would be in driver/gpu/drm/nouveau/nv50_evo.c, approx. lilne 184:

 /* enable error reporting on the channel */
 nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id);

 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;

original patch from fedora 14:

From d0301ece9e093c484f880893dc86d97848360892 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <email address hidden>
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 <email address hidden>
---
 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