[Nouveau] [PATCH] fbcon/nv11-: correctly account for ring space usage

Ilia Mirkin imirkin at alum.mit.edu
Mon Jun 29 01:07:20 PDT 2015


The RING_SPACE macro accounts how much space is used up so it's
important to ask it for the right amount. Incorrect accounting of this
can cause page faults down the line as writes are attempted outside of
the ring.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: stable at vger.kernel.org
---
 drm/nouveau/nv04_fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drm/nouveau/nv04_fbcon.c b/drm/nouveau/nv04_fbcon.c
index 4ef602c..495c576 100644
--- a/drm/nouveau/nv04_fbcon.c
+++ b/drm/nouveau/nv04_fbcon.c
@@ -203,7 +203,7 @@ nv04_fbcon_accel_init(struct fb_info *info)
 	if (ret)
 		return ret;
 
-	if (RING_SPACE(chan, 49)) {
+	if (RING_SPACE(chan, 49 + (device->info.chipset >= 0x11 ? 4 : 0))) {
 		nouveau_fbcon_gpu_lockup(info);
 		return 0;
 	}
-- 
2.3.6



More information about the Nouveau mailing list